Enhanced tab: if no available docversions to link to from a source, hide ‘new’ button
Caching fix B2016-132 fix: don’t allow double click to insert RO when on enhanced step
This commit is contained in:
@@ -160,7 +160,7 @@ namespace VEPROMS
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
dved.PdfX = 0;
|
||||
dved.PdfX = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ namespace VEPROMS
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ipdfx = 0;
|
||||
ipdfx = (emc.PdfToken==null||emc.PdfToken=="")?0:10;
|
||||
}
|
||||
int itype = 0;
|
||||
try
|
||||
@@ -562,7 +562,22 @@ namespace VEPROMS
|
||||
if (cbxEnhVersions.Items.Count>0) cbxEnhVersions.SelectedIndex = 0;
|
||||
if (lbEnhanced.Items.Count > 0) lbEnhanced.SelectedIndex = 0;
|
||||
bsMiniEnhanced.DataSource = bsEnhanced.Current as EnhancedMiniConfig;
|
||||
btnNewEnh.Visible = true;
|
||||
|
||||
// only allow new if there are available non-linked 'enhanced format' docversions.
|
||||
int cntAvailForLinkEnh = 0;
|
||||
DocVersionInfoList nonenhdvs = DocVersionInfoList.GetNonEnhancedDocVersions();
|
||||
foreach (DocVersionInfo nonenhdv in nonenhdvs)
|
||||
{
|
||||
if (nonenhdv.VersionID != _DocVersionConfig.MyDocVersion.VersionID)
|
||||
{
|
||||
if (((nonenhdv.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds) ||
|
||||
((nonenhdv.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations))
|
||||
{
|
||||
cntAvailForLinkEnh++;
|
||||
}
|
||||
}
|
||||
}
|
||||
btnNewEnh.Visible = (cntAvailForLinkEnh > 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user