Use inheritance to get Format

This commit is contained in:
Rich 2010-09-27 16:23:11 +00:00
parent dc7eb108cb
commit a4e94054d2

View File

@ -460,7 +460,15 @@ namespace VEPROMS.CSLA.Library
if (parval.Equals(string.Empty)) // if the parent value is empty, then use the volian default
{
int rval = (int)MyFormat.MyStepSectionLayoutData.PMode;
int rval = 0;
// Use Inherited Format (ActiveFormat for Section) if MyFormat is Null
if (MyFormat == null)
{
FormatInfo myFormat = _Section == null ? _SectionInfo.ActiveFormat : SectionInfo.Get(_Section.ItemID).ActiveFormat;
rval = (int)myFormat.MyStepSectionLayoutData.PMode;
}
else
rval =(int)MyFormat.MyStepSectionLayoutData.PMode;
parval = ((SectionColumnMode)rval).ToString();
//parval = ((int)(SectionColumnMode.Default)).ToString();
}