C2025-023 - Electronic Procedures - Modifications to PROMS
Working on multiunit for DB Sequence
This commit is contained in:
parent
b9fc9748c7
commit
2784b57a05
@ -18,31 +18,34 @@ namespace VEPROMS
|
|||||||
#pragma warning restore S101 // Types should be named in PascalCase
|
#pragma warning restore S101 // Types should be named in PascalCase
|
||||||
{
|
{
|
||||||
private readonly AnnotationTypeInfo _AnnotationType;
|
private readonly AnnotationTypeInfo _AnnotationType;
|
||||||
|
private readonly int _UnitIndex;
|
||||||
private readonly string multiseparator = ",";
|
private readonly string multiseparator = ",";
|
||||||
|
|
||||||
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
|
private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]");
|
||||||
|
|
||||||
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0)
|
public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
|
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
|
Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}";
|
||||||
}
|
}
|
||||||
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0)
|
||||||
{
|
{
|
||||||
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
_AnnotationType = AnnotationTypeInfo.Get(annotationTypeId);
|
||||||
|
_UnitIndex = unitIndex;
|
||||||
_ExportBothConvertedandNot = true;
|
_ExportBothConvertedandNot = true;
|
||||||
DocReplace = new Dictionary<int, byte[]>();
|
DocReplace = new Dictionary<int, byte[]>();
|
||||||
FormClosed += OnClose;
|
FormClosed += OnClose;
|
||||||
@ -242,7 +245,10 @@ namespace VEPROMS
|
|||||||
//return a db sequence string from an ItemInfo
|
//return a db sequence string from an ItemInfo
|
||||||
private string dbSeq(ItemInfo ii)
|
private string dbSeq(ItemInfo ii)
|
||||||
{
|
{
|
||||||
return $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.DBSequence}";
|
if (_UnitIndex > 0) ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex;
|
||||||
|
string rtnval = $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}";
|
||||||
|
ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
|
return rtnval;
|
||||||
}
|
}
|
||||||
|
|
||||||
//For Exporting an RO that is an image
|
//For Exporting an RO that is an image
|
||||||
|
@ -713,7 +713,7 @@ namespace VEPROMS
|
|||||||
//form for exporting Electronic Procedures from FolderInfo
|
//form for exporting Electronic Procedures from FolderInfo
|
||||||
if (args.AnnotationTypeId > 0)
|
if (args.AnnotationTypeId > 0)
|
||||||
{
|
{
|
||||||
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId);
|
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||||
dlg.ShowDialog(this);
|
dlg.ShowDialog(this);
|
||||||
|
|
||||||
MySessionInfo.CheckInItem(ownerid);
|
MySessionInfo.CheckInItem(ownerid);
|
||||||
@ -763,7 +763,7 @@ namespace VEPROMS
|
|||||||
//form for exporting Electronic Procedures from DocVersionInfo
|
//form for exporting Electronic Procedures from DocVersionInfo
|
||||||
if (args.AnnotationTypeId > 0)
|
if (args.AnnotationTypeId > 0)
|
||||||
{
|
{
|
||||||
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId);
|
dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||||
dlg.MyNewProcedure = null;
|
dlg.MyNewProcedure = null;
|
||||||
dlg.ExternalTransitionItem = null;
|
dlg.ExternalTransitionItem = null;
|
||||||
dlg.ShowDialog(this);
|
dlg.ShowDialog(this);
|
||||||
@ -813,7 +813,7 @@ namespace VEPROMS
|
|||||||
//form for exporting Electronic Procedures from ProcedureInfo
|
//form for exporting Electronic Procedures from ProcedureInfo
|
||||||
if (args.AnnotationTypeId > 0)
|
if (args.AnnotationTypeId > 0)
|
||||||
{
|
{
|
||||||
dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId);
|
dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId, args.UnitIndex);
|
||||||
dlg.ShowDialog(this);
|
dlg.ShowDialog(this);
|
||||||
|
|
||||||
MySessionInfo.CheckInItem(ownerid);
|
MySessionInfo.CheckInItem(ownerid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user