Look at procedure column mode setting before saving column mode.
This commit is contained in:
parent
7239a028fe
commit
87ab671908
@ -527,10 +527,10 @@ namespace VEPROMS.CSLA.Library
|
||||
// reset the data to use the parent value.
|
||||
|
||||
string parval = _Xp.ParentValue("Section", "ColumnMode"); // get the parent value
|
||||
|
||||
int rval = 0;
|
||||
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
|
||||
{
|
||||
int rval = 0;
|
||||
//int rval = 0;
|
||||
// Use Inherited Format (ActiveFormat for Section) if MyFormat is Null
|
||||
if (MyFormat == null)
|
||||
{
|
||||
@ -539,11 +539,30 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
else
|
||||
rval =(int)MyFormat.MyStepSectionLayoutData.PMode;
|
||||
parval = ((rval > 0)?((SectionColumnMode)rval).ToString() : "2"); // if PMode is zero default to 2 column mode
|
||||
//parval = ((SectionColumnMode)rval).ToString();
|
||||
//parval = ((int)(SectionColumnMode.Default)).ToString();
|
||||
//parval = ((rval > 0)?((SectionColumnMode)rval).ToString() : "2"); // if PMode is zero default to 2 column mode
|
||||
}
|
||||
|
||||
// if still no value found in inheritance, check if the procedure has a default. if so and value matches, clear out any config item.
|
||||
if (rval == 0)
|
||||
{
|
||||
SectionInfo si = _SectionInfo != null ? _SectionInfo : SectionInfo.Get(_Section.ItemID);
|
||||
if (si != null)
|
||||
{
|
||||
switch (si.MyProcedure.ProcedureConfig.Format_Columns)
|
||||
{
|
||||
case FormatColumns.OneColumn:
|
||||
rval = (int)SectionColumnMode.One;
|
||||
break;
|
||||
case FormatColumns.TwoColumn:
|
||||
rval = (int)SectionColumnMode.Two;
|
||||
break;
|
||||
default:
|
||||
rval = (int)SectionColumnMode.One;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
parval = ((rval > 0) ? ((SectionColumnMode)rval).ToString() : "2"); // if PMode is zero default to 2 column mode
|
||||
if (parval.Equals(((int)value).ToString()))
|
||||
_Xp["Section", "ColumnMode"] = string.Empty; // reset to parent value
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user