public static void CreateDiscount(DiscountTypes discount, int subTypes, Decimal amount, DateTime expiryDate, String voucherCode, int chargeType, int showId)
 {
     ShowDiscounts showDiscount = new ShowDiscounts();
     showDiscount.Amount = amount;
     showDiscount.DiscountType = (int)discount;
     showDiscount.Subtype = (int)subTypes;
     showDiscount.VoucherCode = voucherCode;
     showDiscount.ChargeType = chargeType;
     showDiscount.Showid = showId;
     showDiscount.Save();
 }
 public JsonResult AddShowDiscounts(DiscountChargesDto DiscountCharges)
 {
     ShowDiscounts sc = new ShowDiscounts(DiscountCharges.ClsId);
     sc.DiscountType = DiscountCharges.DiscountId;
     sc.Subtype = DiscountCharges.SubTypes;
     sc.ChargeType = DiscountCharges.ChargeTypeId;
     sc.Amount = DiscountCharges.Amount;
     sc.Showid = DiscountCharges.ShowId;
     return Json(new
     {
         Status = 0,
         ClsId = sc.Save()
     });
 }