public ClassTypes(ClassTypes copy)
     : base()
 {
     _classesTypes = new Fpp.Data.ClassTypes(ModuleSettings);
     LongName = copy.LongName;
     ShortName = copy.ShortName;
     EntryTypeID = copy.EntryTypeID;
     OrdID = copy.OrdID;
     ChargeType = copy.ChargeType;
     ShowID = copy.ShowID;
     Save();
 }
 public JsonResult AddClassTypes(DiscountChargesDto DiscountCharges)
 {
     ClassTypes classTypes = new ClassTypes(DiscountCharges.ClsId);
     classTypes.LongName = DiscountCharges.LongName;
     classTypes.ShortName = DiscountCharges.ShortName;
     classTypes.ChargeType = DiscountCharges.ChargeTypeId;
     classTypes.EntryTypeID = DiscountCharges.EntryTypeId;
     classTypes.ShowID = DiscountCharges.ShowId;
     return Json(new
     {
         Status = 0,
         ClsId = classTypes.Save()
     });
 }
 public static ClassTypes CreateClassType(String longName, String shortName, EntryTypes entryType, int ordID, int chargeType, int showID)
 {
     ClassTypes classType = new ClassTypes();
     classType.LongName = longName;
     classType.ShortName = shortName;
     classType.EntryTypeID = (int)entryType;
     classType.OrdID = ordID;
     classType.ChargeType = chargeType;
     classType.ShowID = showID;
     classType.Save();
     return classType;
 }
 private List<Core.Models.CopyValue> CreateClassTypes(int oldid, int newid, List<Core.Models.CopyValue> showChargeMap)
 {
     List<Core.Models.CopyValue> res = new List<Core.Models.CopyValue>();
     List<ClassTypes> srcClassTypesList = ClassTypes.GetClassTypesForShow(oldid);
     foreach (ClassTypes item in srcClassTypesList)
     {
         item.ShowID = newid;
         var t = showChargeMap.Where(x => x.oldValue == item.ChargeType);
         if (t != null && t.Count() > 0)
         {
             item.ChargeType = t.First().newValue;
             var tmp = new ClassTypes(item);
             res.Add(new Core.Models.CopyValue(item.ID, tmp.ID));
         }
     }
     return res;
 }