The FindSectionStart function will now auto correct an invalid value that resulted from the Copy Procedure function
This commit is contained in:
parent
18e8d73d70
commit
7d1441c999
@ -818,7 +818,25 @@ namespace Volian.Controls.Library
|
||||
int sectstartid = -1;
|
||||
string ss = pc == null ? null : pc.SectionStart;
|
||||
if (ss != null && ss != "") sectstartid = System.Convert.ToInt32(ss);
|
||||
return sectstartid;
|
||||
SectionInfo si = SectionInfo.Get(sectstartid);
|
||||
if (si == null) return -1;
|
||||
if (si.MyProcedure.ItemID == prcitm.ItemID) return sectstartid;
|
||||
foreach (SectionInfo si1 in prcitm.Sections)
|
||||
{
|
||||
if (si.DisplayNumber == si1.DisplayNumber && si.DisplayText == si1.DisplayText)
|
||||
{
|
||||
using (Procedure p = Procedure.Get(prcitm.ItemID))
|
||||
{
|
||||
if (p.ProcedureConfig.SectionStart != si1.ItemID.ToString())
|
||||
{
|
||||
p.ProcedureConfig.SectionStart = si1.ItemID.ToString();
|
||||
p.Save();
|
||||
}
|
||||
}
|
||||
return si1.ItemID;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
private void cbTranProcs_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user