public ActionResult FoodMenu(int?id) { FoodMenuModel foodMenuModel = new FoodMenuModel(); if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true) { if (id > 0) { int foodMenuId = Convert.ToInt32(id); foodMenuModel = _iFoodMenuService.GetFoodMenueById(foodMenuId); } foodMenuModel.FoodCategoryList = _iDropDownService.GetFoodMenuCategoryList(); foodMenuModel.FoodVatTaxList = _iDropDownService.GetTaxList(); foodMenuModel.UnitsList = _iDropDownService.GetUnitList(); return(View(foodMenuModel)); } else { return(RedirectToAction("NotFound", "Error")); } }
// GET: Ingredient/Ingredient public ActionResult Ingredient(int?id) { IngredientModel ingredientModel = new IngredientModel(); if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true) { if (id > 0) { int ingredientId = Convert.ToInt32(id); ingredientModel = _iIngredientService.GetIngredientById(ingredientId); } ingredientModel.IngredientCategoryList = _iDropDownService.GetIngredientCategoryList(); ingredientModel.UnitList = _iDropDownService.GetUnitList(); ingredientModel.TaxList = _iDropDownService.GetTaxList(); return(View(ingredientModel)); } else { return(RedirectToAction("NotFound", "Error")); } }
public ActionResult AssetItem(int?id) { AssetItemModel assetItemModel = new AssetItemModel(); if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true) { if (id > 0) { assetItemModel = _iAssetItemService.GetAssetItemById(Convert.ToInt32(id)); } assetItemModel.UnitList = _iDropDownService.GetUnitList(); assetItemModel.TaxList = _iDropDownService.GetTaxList(); assetItemModel.AssetCategoryList = _iDropDownService.GetAssetCategoryList(); return(View(assetItemModel)); } else { return(RedirectToAction("NotFound", "Error")); } }