Fix bug in vesp_ListUnlinkedItems (getting item when only 1 proc in working draft) & added vesp_PurgeEnhancedDocVersionsAndChildren
Allow insert of HLS before/after Enhanced: User interface for removing links of an enhanced document Enhanced: CSLA interface to unlinking docversion & contents (returns contentlist of affected items) Enhanced: Unlink DocVersion
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -513,6 +513,26 @@ namespace VEPROMS
|
||||
cbxEnhVersions.SelectedIndex = 0;
|
||||
cbxEnhVersions.Enabled = false;
|
||||
btnNewEnh.Visible = false;
|
||||
|
||||
// when in an enhanced doc version, make visible the button that allows user to unlink, need to get its 'title'
|
||||
// from the source.
|
||||
DocVersionInfo srcDVInfo = DocVersionInfo.Get(_DocVersionConfig.MyEnhancedDocuments[0].VersionID);
|
||||
DocVersionConfig srcDVConfig = srcDVInfo.MyConfig as DocVersionConfig;
|
||||
DVEnhancedDocuments dveds = srcDVConfig.MyEnhancedDocuments;
|
||||
string ename = null;
|
||||
foreach (DVEnhancedDocument dved in dveds)
|
||||
{
|
||||
if (dved.VersionID == _DocVersionConfig.MyDocVersion.VersionID)
|
||||
{
|
||||
ename = dved.Name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ename != null)
|
||||
{
|
||||
btnUnlinkDocVersion.Visible = true;
|
||||
btnUnlinkDocVersion.Text = string.Format("Remove All {0} Links", ename);
|
||||
}
|
||||
}
|
||||
else if (hasEnhancedPO)
|
||||
{
|
||||
@@ -520,6 +540,7 @@ namespace VEPROMS
|
||||
_Enhanced = new List<EnhancedMiniConfig>();
|
||||
lbEnhanced.Visible = true;
|
||||
lblEnhSet.Visible = true;
|
||||
btnUnlinkDocVersion.Visible = false; // no unlink button when on a Source Document
|
||||
foreach (DVEnhancedDocument dved in _DocVersionConfig.MyEnhancedDocuments)
|
||||
{
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(dved.VersionID);
|
||||
@@ -1401,6 +1422,19 @@ namespace VEPROMS
|
||||
btnNewEnh.Enabled = false; // for now, only do 1 at a time.
|
||||
_Initializing = 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)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
_DocVersionConfig.MyDocVersion.MyDocVersionInfo.DoUnlinkEnhancedDocVersion();
|
||||
ProcessButtonClick(tiGeneral, btnGeneral);
|
||||
tiEnhanced.Visible = false;
|
||||
btnEnhanced.Visible = false;
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
}
|
||||
[XmlRoot("Enhanced")]
|
||||
public class EnhancedMiniConfig
|
||||
|
Reference in New Issue
Block a user