public ActionResult AddRoom() { var typeMsg = ""; var blockMsg = ""; var types = _roomTypeService.GetRoomTypes(); var hotelBlocks = _hotelBlockService.GetAll(); typeMsg = !types.Any() ? "يجب إضافة نوع غرفة" :""; blockMsg = !hotelBlocks.Any() ? "يجب إضافة كتلة بنائية " : ""; ViewBag.blockMsg = blockMsg; ViewBag.typeMsg = typeMsg; return(View()); }
public ActionResult getAllHotelBlock(int BlockNum = -100, string BlockName = "") { List <HotelBlockDto> list = _hotelBlockService.GetAll().OrderByDescending(x => x.Id).ToList(); if (Request.IsAjaxRequest()) { if (BlockNum != -100) { list = list.Where(x => x.BlockNum == BlockNum.ToString()).ToList(); } if (!string.IsNullOrWhiteSpace(BlockName)) { list = list.Where(x => x.BlockName.Contains(BlockName)).ToList(); } } return(View(list)); }
public ActionResult getHotelBlocks() { var result = _IHotelBlockService.GetAll().OrderByDescending(x => x.Id); return(View(result)); }