B2016-122: from Document Version Properties form: click OK crashes if remove enhanced links done first.
B2016-122: Added a DocVersion.GetFromDB to get data directly from db (not from cache) Support subsections when setting context menu items for enhanced links
This commit is contained in:
@@ -213,6 +213,12 @@ namespace VEPROMS
|
||||
DialogResult = DialogResult.OK;
|
||||
_DocVersionConfig.MyDocVersion.Config = _DocVersionConfig.ToString();
|
||||
_DocVersionConfig.MyDocVersion.Save().Dispose();
|
||||
if (_EnhNeedToUnlink)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.DoUnlinkEnhancedDocVersion();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
|
||||
@@ -441,7 +447,7 @@ namespace VEPROMS
|
||||
|
||||
// the phone list button is only visible if the format has the print/phonelist format flag.
|
||||
btnPhoneList.Visible = _DocVersionConfig.MyDocVersion.MyDocVersionInfo.ActiveFormat.PlantFormat.FormatData.SectData.PrintPhoneList;
|
||||
|
||||
btnUnlinkDocVersion.Visible = false;
|
||||
InitEnhanced();
|
||||
_Initializing = false;
|
||||
}
|
||||
@@ -1422,17 +1428,12 @@ namespace VEPROMS
|
||||
btnNewEnh.Enabled = false; // for now, only do 1 at a time.
|
||||
_Initializing = false;
|
||||
}
|
||||
|
||||
private bool _EnhNeedToUnlink = false;
|
||||
private void btnUnlinkDocVersion_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(this, "Are you sure you want to Unlink? Your documents will no longer link to Enhanced.", "Unlink", MessageBoxButtons.YesNoCancel) == DialogResult.Yes)
|
||||
if (MessageBox.Show(this, "Are you sure you want to Unlink? Your documents will no longer link to Enhanced. NOTE that this processing occurs when 'OK' button is selected!", "Unlink", MessageBoxButtons.YesNoCancel) == DialogResult.Yes)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.DoUnlinkEnhancedDocVersion();
|
||||
ProcessButtonClick(tiGeneral, btnGeneral);
|
||||
tiEnhanced.Visible = false;
|
||||
btnEnhanced.Visible = false;
|
||||
this.Cursor = Cursors.Default;
|
||||
_EnhNeedToUnlink = true; // do the unlink when 'OK' button is selected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user