From edf7c15dbbf79825222ddc585fe80664a762623b Mon Sep 17 00:00:00 2001 From: John Date: Wed, 11 Jan 2012 13:51:14 +0000 Subject: [PATCH] If the plant format does not have PMode set, then it should default to 2 column mode. (according to 16-bit code) --- .../VEPROMS.CSLA.Library/Config/SectionConfig.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs index ba610e74..eb19e262 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs @@ -435,16 +435,21 @@ namespace VEPROMS.CSLA.Library // If there is no parent value, then use the volian default if (s == string.Empty) { + int rval = 0; if (MyFormat != null) { - int rval = (int)MyFormat.MyStepSectionLayoutData.PMode; - return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default + rval = (int)MyFormat.MyStepSectionLayoutData.PMode; + //int rval = (int)MyFormat.MyStepSectionLayoutData.PMode; + //return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default } else { - int rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode; - return (SectionColumnMode)rval; + //int rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode; + rval = (int)MyDefaultFormat.MyStepSectionLayoutData.PMode; + //return (SectionColumnMode)rval; } + if (rval == 0) rval = 2; + return (SectionColumnMode)rval; } else return (SectionColumnMode)int.Parse(s); @@ -472,7 +477,8 @@ namespace VEPROMS.CSLA.Library } else rval =(int)MyFormat.MyStepSectionLayoutData.PMode; - parval = ((SectionColumnMode)rval).ToString(); + 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(); }