Example #1
0
 public SheetDef(SheetTypeEnum sheetType)
 {
     SheetType      = sheetType;
     PageCount      = 1;
     Parameters     = SheetParameter.GetForType(sheetType);
     SheetFieldDefs = new List <SheetFieldDef>();
 }
Example #2
0
 ///<summary>Sheetdefs and sheetfielddefs are archived separately.
 ///So when we need to use a sheetdef, we must run this method to pull all the associated fields from the archive.
 ///Then it will be ready for printing, copying, etc.</summary>
 public static void GetFieldsAndParameters(SheetDef sheetdef)
 {
     //No need to check RemotingRole; no call to db.
     //images first
     sheetdef.SheetFieldDefs = SheetFieldDefs.GetWhere(x => x.SheetDefNum == sheetdef.SheetDefNum && x.FieldType == SheetFieldType.Image);
     //then all other fields
     sheetdef.SheetFieldDefs.AddRange(SheetFieldDefs.GetWhere(x => x.SheetDefNum == sheetdef.SheetDefNum &&
                                                              x.FieldType != SheetFieldType.Image &&
                                                              x.FieldType != SheetFieldType.Parameter));//Defs never store parameters. Fields store filled parameters, but that's different.
     sheetdef.Parameters = SheetParameter.GetForType(sheetdef.SheetType);
 }