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; }