B2022-083: Support Conditional RO Values
This commit is contained in:
@@ -197,11 +197,13 @@ namespace VEPROMS
|
||||
{
|
||||
OwnerInfo oi = OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure);
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = _MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||
|
||||
if (clbMore.Items.Contains(pi.DisplayNumber))
|
||||
{
|
||||
if (!dpl.Contains(pi.DisplayNumber)) dpl.Add(pi.DisplayNumber); //C2020-036 add to duplicate proc number list
|
||||
continue;
|
||||
}
|
||||
|
||||
// B2018-083: check for null MySessionInfo.
|
||||
if (oi != null && MySessionInfo != null && oi.SessionID != MySessionInfo.SessionID)
|
||||
{
|
||||
@@ -210,17 +212,22 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
clbMore.Items.Add(pi.DisplayNumber);
|
||||
|
||||
tmpProcedures.Add(pi.DisplayNumber, pi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dpl.Count > 0) return false; // C2018-025 cannot load list of procedure - duplicate proc numbers
|
||||
|
||||
for (int i = 0; i < clbMore.Items.Count; i++)
|
||||
{
|
||||
ProcedureInfo pi = GetProcedureInfoByKey(clbMore.Items[i].ToString());
|
||||
clbMore.SetItemChecked(i, _MyApproval.ProcedureExists(pi));
|
||||
}
|
||||
|
||||
lblMore.Text = string.Format("{0} Procedures, {1} Selected", clbMore.Items.Count, clbMore.CheckedItems.Count);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -247,20 +254,23 @@ namespace VEPROMS
|
||||
setupLablesAndSwitches(); // C2018-008 redesign of user interface
|
||||
SetupMyApproval();
|
||||
}
|
||||
|
||||
private Dictionary<string, ProcedureInfo> tmpProcedures = new Dictionary<string, ProcedureInfo>();
|
||||
private ProcedureInfo GetProcedureInfoByKey(string key)
|
||||
{
|
||||
private ProcedureInfo GetProcedureInfoByKey(string key)
|
||||
{
|
||||
if (key.Contains(" Checked out to "))
|
||||
key = key.Substring(0, key.IndexOf(" Checked out to "));
|
||||
// B2019-048: after running consistency check - inconsistency text was added to string in dialog. Remove that text
|
||||
// if in key so that it can be used to find procedure in procedure list (was crashing):
|
||||
if (key.Contains(" - ("))
|
||||
key = key.Substring(0, key.LastIndexOf(" - ("));
|
||||
|
||||
if (tmpProcedures.ContainsKey(key))
|
||||
return tmpProcedures[key];
|
||||
else
|
||||
return tmpProcedures[GetDisplayNumberOnly(key)];
|
||||
}
|
||||
return tmpProcedures[key];
|
||||
else
|
||||
return tmpProcedures[GetDisplayNumberOnly(key)];
|
||||
}
|
||||
|
||||
public dlgApproveProcedure(DocVersionInfo myDocVersion, bool selectSome, frmVEPROMS myFrmVEPROMS) // approve some procedures
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
@@ -280,7 +290,8 @@ namespace VEPROMS
|
||||
InitializePanelSelect();
|
||||
_initializing = false;
|
||||
}
|
||||
public dlgApproveProcedure(ProcedureInfo myProcedure, frmVEPROMS myFrmVEPROMS) // approve sigle (selected from tree view)
|
||||
|
||||
public dlgApproveProcedure(ProcedureInfo myProcedure, frmVEPROMS myFrmVEPROMS) // approve single (selected from tree view)
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
@@ -332,6 +343,7 @@ namespace VEPROMS
|
||||
approvalProcedureBindingSource.ResetBindings(false);
|
||||
//this.ConsistencyPrintRequest -= new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
|
||||
}
|
||||
|
||||
private string GetMaxRevNumber()
|
||||
{
|
||||
string mrn = string.Empty;
|
||||
@@ -343,6 +355,7 @@ namespace VEPROMS
|
||||
}
|
||||
return mrn;
|
||||
}
|
||||
|
||||
void dlgApproveProcedure_ConsistencyPrintRequest(object sender, ConsistencyReportArgs args)
|
||||
{
|
||||
foreach (ProcedureInfo pi in args.MyItems)
|
||||
@@ -350,6 +363,7 @@ namespace VEPROMS
|
||||
PDFConsistencyCheckReport rpt = new PDFConsistencyCheckReport(args.ReportName, args.MyItems, args.MyDocVersion); //B2020-020 needed to pass in DocVersion to get paper size from format
|
||||
rpt.BuildReport();
|
||||
}
|
||||
|
||||
private void SetupComboBoxes()
|
||||
{
|
||||
RevTypes rt = new RevTypes();
|
||||
@@ -362,6 +376,7 @@ namespace VEPROMS
|
||||
revTypeBindingSource.DataSource = rt;
|
||||
stageInfoBindingSource.DataSource = StageInfoList.Get();
|
||||
}
|
||||
|
||||
private void btnApprove_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
@@ -369,6 +384,7 @@ namespace VEPROMS
|
||||
this.DialogResult = DialogResult.None;
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
// C2018-008 redesign of user interface
|
||||
// -- Note that the Revison Type data source is still connected (revTypeBindingSource) - commented out for documentatin purposes
|
||||
//private void cmbRevisionType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -376,11 +392,13 @@ namespace VEPROMS
|
||||
// RevType rt = cmbRevisionType2.SelectedItem as RevType;
|
||||
// _MyApproval.RevType = rt.TypeID;
|
||||
//}
|
||||
|
||||
private void cmbRevisionStage_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
StageInfo si = cmbRevisionStage2.SelectedItem as StageInfo;
|
||||
_MyApproval.RevStage = si.StageID;
|
||||
}
|
||||
|
||||
private void clbMore_ItemCheck(object sender, ItemCheckEventArgs e)
|
||||
{
|
||||
ProcedureInfo pi = GetProcedureInfoByKey(clbMore.Items[e.Index].ToString());
|
||||
@@ -397,6 +415,7 @@ namespace VEPROMS
|
||||
btnCheckMore.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateMyApproval()
|
||||
{
|
||||
SetupComboBoxes();
|
||||
@@ -419,10 +438,12 @@ namespace VEPROMS
|
||||
SetupMyApproval();
|
||||
RefreshCount(); // B2021-015: select/clear all not populating left panel & count not refreshed.
|
||||
}
|
||||
|
||||
private void btnCheck_Click(object sender, EventArgs e)
|
||||
{
|
||||
UpdateClbMore();
|
||||
}
|
||||
|
||||
private ItemInfoList _MyItemInfoList;
|
||||
private void UpdateClbMore()
|
||||
{
|
||||
@@ -510,18 +531,21 @@ namespace VEPROMS
|
||||
}
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
private void btnAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < clbMore.Items.Count; i++)
|
||||
clbMore.SetItemChecked(i, true);
|
||||
UpdateMyApproval(); // B2021-015: select/clear all not populating left panel & count not refreshed.
|
||||
}
|
||||
|
||||
private void btnClear_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int i = 0; i < clbMore.Items.Count; i++)
|
||||
clbMore.SetItemChecked(i, false);
|
||||
UpdateMyApproval(); // B2021-015: select/clear all not populating left panel & count not refreshed.
|
||||
}
|
||||
|
||||
private int _LastIndex = -1;
|
||||
private void clbMore_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
@@ -563,6 +587,7 @@ namespace VEPROMS
|
||||
s = s.Substring(0, d); //B2018-109 remvoed the call ".Trim()". had a procedure that began with a space and was being used as such everywhere else in the approveal logic
|
||||
return s;
|
||||
}
|
||||
|
||||
private bool _DoingConsistencyCheck = false; // C2018-008 redesign of user interface
|
||||
private void btnCheckMore_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -574,6 +599,7 @@ namespace VEPROMS
|
||||
btnCheckMore.Enabled = false;
|
||||
|
||||
}
|
||||
|
||||
private void btnReportMore_Click(object sender, EventArgs e)
|
||||
{
|
||||
OnConsistencyPrintRequest(new ConsistencyReportArgs(Volian.Base.Library.VlnSettings.TemporaryFolder + @"\MyConsistency.pdf", _MyItemInfoList, _MyDocVersion)); //B2020-020 needed to pass in DocVersion to get paper size from format
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user