Beispiel #1
0
        public IActionResult AssetEvent(int?id, string type)
        {
            AssetEventModel assetEventModel = new AssetEventModel();

            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true || UserRolePermissionForPage.View == true)
            {
                if (id > 0)
                {
                    ViewBag.ActionType = type;
                    assetEventModel    = _iAssetEventService.GetAssetEventById(Convert.ToInt32(id));
                }
                else
                {
                    assetEventModel.EventDatetime = DateTime.UtcNow.AddMinutes(LoginInfo.Timeoffset);
                    assetEventModel.ReferenceNo   = _iAssetEventService.ReferenceNumberAssetEvent().ToString();
                }
                assetEventModel.StoreList       = _iDropDownService.GetStoreList();
                assetEventModel.AssetItemList   = _iDropDownService.GetAssetItemList();
                assetEventModel.FoodMenuList    = _iDropDownService.GetProductionFormulaFoodMenuList();
                assetEventModel.IngredientList  = _iDropDownService.GetIngredientList();
                assetEventModel.MissingNoteList = _iDropDownService.GetCateringFoodMenuGlobalStatus();
                return(View(assetEventModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }