public void LoadViewBagPromotion( int Hotelid) { DropDownListsRepository DrpRep = new DropDownListsRepository(); NewPromotionRepository NewProm = new NewPromotionRepository(); ViewBag.PricePolicies = DrpRep.GetPricePlicy(); ViewBag.HotelRooms = NewProm.GetHotelRooms(Hotelid); ViewBag.DaysDetails = NewProm.GetDay(); int MinimumPromotionDiscountPercentage = NewProm.GetParameterValue("MinimumPromotionDiscountPercentage"); int MaximumPromotionDiscountPercentage = NewProm.GetParameterValue("MaximumPromotionDiscountPercentage"); ViewBag.MinimumPromotionDiscountPercentage = MinimumPromotionDiscountPercentage; ViewBag.MaximumPromotionDiscountPercentage = MaximumPromotionDiscountPercentage; ViewBag.DefaultPromotionDiscountPercentage = NewProm.GetParameterValue("DefaultPromotionDiscountPercentage"); ViewBag.MaximumDayCountForMinimumStayPromotion = NewProm.GetParameterValue("MaximumDayCountForMinimumStayPromotion"); ViewBag.MaximumHourCountForMinimumStayPromotion = NewProm.GetParameterValue("MaximumHourCountForMinimumStayPromotion"); ViewBag.DiscountPercentValidation = Resources.Resources.RangeWarning + " " + Resources.Resources.MinimumValue + ": " + MinimumPromotionDiscountPercentage + " ," + Resources.Resources.MaximumValue + ": " + MaximumPromotionDiscountPercentage; }
public JsonResult GetRoomsByHotel() { BizContext = (BizContext)Session["GBAdminBizContext"]; int id = BizContext.HotelID; Session["GBAdminBizContext"] = BizContext; NewPromotionRepository model = new NewPromotionRepository(); return Json(model.GetHotelRooms(id), JsonRequestBehavior.AllowGet); }
public void LoadViewBagValues() { AssignBizContext(); int HotelID = BizContext.HotelID; NewPromotionRepository NewProm = new NewPromotionRepository(); ViewBag.CurrencyName = BizContext.CurrencyName; //if (CultureCode == "ar-SA") //{ ViewBag.StartDate = dateconvert(DateTime.Now.ToString("dd/MM/yyyy")); ViewBag.EndDate = dateconvert(DateTime.Now.AddDays(30).ToString("dd/MM/yyyy")); ViewBag.EndDate90 = dateconvert(DateTime.Now.AddDays(90).ToString("dd/MM/yyyy")); //} //else //{ // ViewBag.StartDate = DateTime.Now.ToString("dd/MM/yyyy"); // ViewBag.EndDate = DateTime.Now.AddDays(30).ToString("dd/MM/yyyy"); // ViewBag.EndDate90 = DateTime.Now.AddDays(90).ToString("dd/MM/yyyy"); //} }
public JsonResult GetComission() { DropDownListsRepository model = new DropDownListsRepository(); NewPromotionRepository NewProm = new NewPromotionRepository(); int HotelMinumumComissionRate = NewProm.GetParameterValue("HotelMinumumComissionRate"); return Json(model.GetComission(HotelMinumumComissionRate).OrderBy(o => o.Comission).Select(c => new { Comission = c.Comission }).OrderBy(o => o.Comission), JsonRequestBehavior.AllowGet); }