// GET: Dish public ActionResult Index(Dish KeySearch, int?FromCost, int?ToCost, int page = 1, int pageSize = 10) { DishRequestModel model = new DishRequestModel(); model = _dishRepo.GetAllDish(KeySearch, FromCost, ToCost, page, pageSize); return(View(model)); }
public decimal getDishUnitPrice(int itemId) { DishRepository objDishRepository = new DishRepository(); List <Dish> dishes = objDishRepository.GetAllDish(); decimal UnitPrice = dishes[itemId - 1].DishPrice; return(UnitPrice); }
public ActionResult Index() { TableRepository objTableRepository = new TableRepository(); DishRepository objDishRepository = new DishRepository(); objDishRepository.GetAllDish(); objTableRepository.GetAllTable(); // var objMultipleModels = new Tuple<IEnumerable<SelectListItem>, IEnumerable<SelectListItem>> // (objTableRepository.GetAllTable(), objDishRepository.GetAllDish()); return(View()); }