if user selects a section to be ‘Default Step Section’, also set the procedure config ‘SectionStart’.

This commit is contained in:
Kathy Ruffing 2015-02-13 14:39:03 +00:00
parent 0d42827308
commit a956574892

View File

@ -132,9 +132,22 @@ namespace VEPROMS
{ {
ssav.SectionConfig.Section_OriginalSteps = "N"; ssav.SectionConfig.Section_OriginalSteps = "N";
ssav.Save(); ssav.Save();
ItemInfo.Refresh(ssav);
} }
} }
} }
// also need to set the procedure's config sectionstart to the selected section
// if it is not set:
using (Procedure p = Procedure.Get(_SectionConfig.MySection.MySectionInfo.MyProcedure.ItemID))
{
if (p.ProcedureConfig.SectionStart != _SectionConfig.MySection.MySectionInfo.ItemID.ToString())
{
p.ProcedureConfig.SectionStart = _SectionConfig.MySection.MySectionInfo.ItemID.ToString();
p.Save();
ItemInfo.Refresh(p);
}
}
} }
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();