// GET: IngredientCategoryController/Details/5 public ActionResult IngredientCategory(int?id) { IngredientCategoryModel ingredientCategoryModel = new IngredientCategoryModel(); if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true) { if (id > 0) { int ingredientCategroyId = Convert.ToInt32(id); ingredientCategoryModel = _iIngredientCategoryService.GetIngredientCategoryById(ingredientCategroyId); } ingredientCategoryModel.RawMaterialList = _iDropDownService.GetRawMaterialList(); return(View(ingredientCategoryModel)); } else { return(RedirectToAction("NotFound", "Error")); } }