예제 #1
0
        public string UpdateStatus(int id, string status)
        {
            object result    = null;
            string strReturn = string.Empty;

            try
            {
                ePromoCode obj = new ePromoCode();
                obj = BL_PromoCode.GetSingleRecordById(id);
                obj.dtActionDate = DateTime.Now;
                obj.cStatus      = status;
                obj.iActionBy    = ((OneFineRateBLL.BL_Login.UserDetails)Session["UserDetails"]).iUserId;
                int i = BL_PromoCode.UpdateRecord(obj);
                if (i == 1)
                {
                    result = new { st = 1, msg = clsUtils.ErrorMsg("Promo Code", 4, status) };
                }
                else
                {
                    result = new { st = 0, msg = clsUtils.ErrorMsg("", 3) };
                }
            }
            catch (Exception)
            {
                result = new { st = 0, msg = clsUtils.ErrorMsg("", 3) };
            }
            strReturn = OneFineRateAppUtil.clsUtils.ConvertToJson(result);
            return(strReturn);
        }
예제 #2
0
        public ActionResult Edit(int Id)
        {
            ePromoCode obj = new ePromoCode();

            obj         = BL_PromoCode.GetSingleRecordById(Id);
            obj.heading = "Modify Promo Code";
            obj.Mode    = "Edit";
            if (obj.dtStayFrom != null)
            {
                obj.StayFrom = String.Format("{0:dd/MM/yyyy}", obj.dtStayFrom);
            }
            if (obj.dtStayTo != null)
            {
                obj.StayTo = String.Format("{0:dd/MM/yyyy}", obj.dtStayTo);
            }
            if (obj.dtBookingFrom != null)
            {
                obj.BookingFrom = String.Format("{0:dd/MM/yyyy}", obj.dtBookingFrom);
            }
            if (obj.dtBookingTo != null)
            {
                obj.BookingTo = String.Format("{0:dd/MM/yyyy}", obj.dtBookingTo);
            }
            return(PartialView("_PromoCode", obj));
        }
예제 #3
0
 public ActionResult SetData()
 {
     try
     {
         int    a         = 0;
         string Entrytype = "E";
         if (HttpContext.Request.Params["Entrytype"] != null)
         {
             Entrytype = HttpContext.Request.Params["Entrytype"];
         }
         if (HttpContext.Request.Params["id"] != null)
         {
             a = Convert.ToInt32(HttpContext.Request.Params["id"]);
         }
         ePromoCode prop = new ePromoCode();
         prop      = BL_PromoCode.GetSingleRecordById(a);
         prop.Mode = "E";
         return(View("Index", prop));//RedirectToAction("Index", "PromoCode", prop);
     }
     catch (Exception)
     {
         throw;
     }
 }