Added menu item handler for new menu items added to export or import docversions
This commit is contained in:
parent
193205abcb
commit
6c2555609e
@ -278,8 +278,32 @@ namespace VEPROMS
|
|||||||
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
|
tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo);
|
||||||
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
|
tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF);
|
||||||
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
|
displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged);
|
||||||
|
tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tv_ExportImportProcedureSets(object sender, vlnTreeEventArgs args)
|
||||||
|
{
|
||||||
|
FolderInfo fi = (args.Node as VETreeNode).VEObject as FolderInfo;
|
||||||
|
string msg = string.Empty;
|
||||||
|
bool ok = MySessionInfo.CanCheckOutItem(fi.FolderID, CheckOutType.Folder, ref msg);
|
||||||
|
if (!ok)
|
||||||
|
{
|
||||||
|
if(args.Index == 0)
|
||||||
|
MessageBox.Show(this, msg, "Export Procedure Set Unavailable");
|
||||||
|
else
|
||||||
|
MessageBox.Show(this, msg, "Import Procedure Set Unavailable");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Folder);
|
||||||
|
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi);
|
||||||
|
dlg.ShowDialog(this);
|
||||||
|
MySessionInfo.CheckInItem(ownerid);
|
||||||
|
tv.AddNewNode(dlg.MyNewFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void MakeDatabaseChanges()
|
private void MakeDatabaseChanges()
|
||||||
{
|
{
|
||||||
// September 2012: Decided to store roimages as zipped. Any previous data may not have them zipped.
|
// September 2012: Decided to store roimages as zipped. Any previous data may not have them zipped.
|
||||||
@ -771,6 +795,11 @@ namespace VEPROMS
|
|||||||
tmrCloseTabItems.Tick += new EventHandler(tmrCloseTabItems_Tick);
|
tmrCloseTabItems.Tick += new EventHandler(tmrCloseTabItems_Tick);
|
||||||
tmrCloseTabItems.Enabled = true;
|
tmrCloseTabItems.Enabled = true;
|
||||||
MySessionInfo = SessionInfo.BeginSession(Environment.MachineName, System.Diagnostics.Process.GetCurrentProcess().Id);
|
MySessionInfo = SessionInfo.BeginSession(Environment.MachineName, System.Diagnostics.Process.GetCurrentProcess().Id);
|
||||||
|
if (MySessionInfo == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("This database is locked by the Administrator. Please try again later", "PROMS is Locked");
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
tc.MySessionInfo = MySessionInfo;
|
tc.MySessionInfo = MySessionInfo;
|
||||||
tv.MySessionInfo = MySessionInfo;
|
tv.MySessionInfo = MySessionInfo;
|
||||||
System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false);
|
System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user