Added a default column mode for the procedure

Logic to use the default column mode set in the format
Created a default column mode for the procedure
This commit is contained in:
John Jenko 2015-11-02 21:31:47 +00:00
parent 0f3c0bb5f1
commit e1d596e85f
4 changed files with 22 additions and 1 deletions

Binary file not shown.

View File

@ -222,6 +222,15 @@ namespace VEPROMS.CSLA.Library
return null;
}
}
public FormatInfo DefaultFormat
{
get
{
if (_Procedure != null && _Procedure.MyProcedureInfo.ActiveParent != null && _Procedure.MyProcedureInfo.ActiveParent.ActiveFormat != null) return FormatInfo.Get(_Procedure.MyProcedureInfo.ActiveParent.ActiveFormat.FormatID);
if (_ProcedureInfo != null && _ProcedureInfo.MyParent != null && _ProcedureInfo.MyParent.ActiveFormat != null) return _ProcedureInfo.MyParent.ActiveFormat;
return null;
}
}
public Procedure MyProcedure
{ get { return _Procedure; } }
#endregion
@ -262,7 +271,11 @@ namespace VEPROMS.CSLA.Library
s = _Xp.ParentValue("Format", "Columns"); // get the parent value
// If there is no parent value, then use the volian default
if (s == string.Empty || s == "t") // fnp aop1 had this (not sure about other fnp data)
return FormatColumns.TwoColumn;// At the procedure level, default to Two column
{
if (DefaultFormat != null)
return (FormatColumns) (DefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.ColumnMode??
(int)FormatColumns.TwoColumn);// At the procedure level, default to Two column
}
return (FormatColumns)int.Parse(s);
}

View File

@ -2935,6 +2935,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _PMode, "@PMode");
}
}
private LazyLoad<int?> _ColumnMode;
public int? ColumnMode
{
get
{
return LazyLoad(ref _ColumnMode, "@ColumnMode");
}
}
private LazyLoad<int?> _MaxRNO;
public int? MaxRNO
{