Example #1
0
 public ActionResult AdminIndex(int? CouponType)
 {
     if (CouponType == null) CouponType = (int)Enums.enmCoupontype.Usable;
     CouponAdminIndexModel customCouponModel = new CouponAdminIndexModel();
     customCouponModel.CouponType = (int)CouponType;
     if (CouponType == (int)Enums.enmCoupontype.Usable) {
         customCouponModel.Title = "Usable";
         customCouponModel.Coupons = new tCouponModelCustom {
             TableName = "couponsUsable",
             CouponType = (int)Enums.enmCoupontype.Usable
         };
         //CouponList = _couponRepository.GetCouponsUsable(),
     }
     if (CouponType == (int)Enums.enmCoupontype.Used) {
         customCouponModel.Title = "Used";
         customCouponModel.Coupons = new tCouponModelCustom {
             TableName = "couponsUsable",
             CouponType = (int)Enums.enmCoupontype.Used
         };
     }
     if (CouponType == (int)Enums.enmCoupontype.Expired) {
         customCouponModel.Title = "Expired";
         customCouponModel.Coupons = new tCouponModelCustom {
             TableName = "couponsUsable",
             CouponType = (int)Enums.enmCoupontype.Expired
         };
     }
     return View(customCouponModel);
 }
Example #2
0
        public ActionResult AdminIndex(int?CouponType)
        {
            if (CouponType == null)
            {
                CouponType = (int)Enums.enmCoupontype.Usable;
            }
            CouponAdminIndexModel customCouponModel = new CouponAdminIndexModel();

            customCouponModel.CouponType = (int)CouponType;
            if (CouponType == (int)Enums.enmCoupontype.Usable)
            {
                customCouponModel.Title   = "Usable";
                customCouponModel.Coupons = new tCouponModelCustom {
                    TableName  = "couponsUsable",
                    CouponType = (int)Enums.enmCoupontype.Usable
                };
                //CouponList = _couponRepository.GetCouponsUsable(),
            }
            if (CouponType == (int)Enums.enmCoupontype.Used)
            {
                customCouponModel.Title   = "Used";
                customCouponModel.Coupons = new tCouponModelCustom {
                    TableName  = "couponsUsable",
                    CouponType = (int)Enums.enmCoupontype.Used
                };
            }
            if (CouponType == (int)Enums.enmCoupontype.Expired)
            {
                customCouponModel.Title   = "Expired";
                customCouponModel.Coupons = new tCouponModelCustom {
                    TableName  = "couponsUsable",
                    CouponType = (int)Enums.enmCoupontype.Expired
                };
            }
            return(View(customCouponModel));
        }