public ActionResult ProductionFormula(int?id, int?foodMenuType, string type)
        {
            ProductionFormulaModel productionFormulaModel = new ProductionFormulaModel();

            TempData["foodMenuType"] = foodMenuType;
            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true || UserRolePermissionForPage.View == true)
            {
                if (id > 0)
                {
                    ViewBag.ActionType     = type;
                    productionFormulaModel = _iProductionFormulaService.GetProductionFormulaById(Convert.ToInt32(id));
                }
                else
                {
                    productionFormulaModel.FoodmenuType = (int)foodMenuType;
                    productionFormulaModel.IsActive     = true;
                }
                productionFormulaModel.FoodMenuList       = _iDropDownService.GetFoodMenuListByFoodmenuType((int)foodMenuType);
                productionFormulaModel.IngredientList     = _iDropDownService.GetIngredientList();
                productionFormulaModel.BatchSizeUnitsList = _iDropDownService.GetUnitList();

                return(View(productionFormulaModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
Beispiel #2
0
        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"));
            }
        }
Beispiel #4
0
        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"));
            }
        }