Beispiel #1
0
        public ActionResult InventoryTransfer(long?id, int?inventoryType, string type)
        {
            InventoryTransferModel inventoryTransferModel = new InventoryTransferModel();

            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true || UserRolePermissionForPage.View == true)
            {
                if (id > 0)
                {
                    ViewBag.ActionType = type;
                    long purchaseId = Convert.ToInt64(id);
                    inventoryTransferModel = _inventoryTransferService.GetInventoryTransferById(purchaseId);
                }
                else
                {
                    inventoryTransferModel.Date          = DateTime.UtcNow.AddMinutes(LoginInfo.Timeoffset);
                    inventoryTransferModel.ReferenceNo   = _inventoryTransferService.ReferenceNumber().ToString();
                    inventoryTransferModel.InventoryType = Convert.ToInt32(inventoryType);
                }
                inventoryTransferModel.FromStoreList  = _iDropDownService.GetStoreList();
                inventoryTransferModel.ToStoreList    = _iDropDownService.GetStoreList();
                inventoryTransferModel.EmployeeList   = _iDropDownService.GetEmployeeList();
                inventoryTransferModel.IngredientList = _iDropDownService.GetIngredientList();
                inventoryTransferModel.AssetItemList  = _iDropDownService.GetAssetItemList();
                inventoryTransferModel.FoodMenuList   = _iDropDownService.GetFoodMenuListByFoodmenuType(-1);
                return(View(inventoryTransferModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
Beispiel #2
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"));
            }
        }
        public ActionResult InventoryAdjustment(long?id, int?inventoryType, int?consumptionStatus, string type)
        {
            InventoryAdjustmentModel inventoryAdjustmentModel = new InventoryAdjustmentModel();

            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true || UserRolePermissionForPage.View == true)
            {
                if (id > 0)
                {
                    ViewBag.ActionType = type;
                    long purchaseId = Convert.ToInt64(id);
                    inventoryAdjustmentModel = _inventoryAdjustmentService.GetInventoryAdjustmentById(purchaseId);
                }
                else
                {
                    inventoryAdjustmentModel.Date              = DateTime.UtcNow.AddMinutes(LoginInfo.Timeoffset);
                    inventoryAdjustmentModel.ReferenceNo       = _inventoryAdjustmentService.ReferenceNumber().ToString();
                    inventoryAdjustmentModel.InventoryType     = Convert.ToInt32(inventoryType);
                    inventoryAdjustmentModel.ConsumptionStatus = Convert.ToInt32(consumptionStatus);
                }
                inventoryAdjustmentModel.StoreList = _iDropDownService.GetStoreList();
                ViewBag.SelectedStore = inventoryAdjustmentModel.StoreList.Where(x => x.Selected == true).Select(x => x.Value).SingleOrDefault();
                inventoryAdjustmentModel.EmployeeList   = _iDropDownService.GetEmployeeList();
                inventoryAdjustmentModel.IngredientList = _iDropDownService.GetIngredientList();
                inventoryAdjustmentModel.AssetItemList  = _iDropDownService.GetAssetItemList();
                inventoryAdjustmentModel.FoodMenuList   = _iDropDownService.GetFoodMenuListByFoodmenuType(-1);
                return(View(inventoryAdjustmentModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
        // GET: Purchase/Create
        public ActionResult Purchase(long?id)
        {
            PurchaseModel purchaseModel = new PurchaseModel();

            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true)
            {
                if (id > 0)
                {
                    long purchaseId = Convert.ToInt64(id);
                    purchaseModel = _iPurchaseService.GetPurchaseById(purchaseId);
                }
                else
                {
                    purchaseModel.Date        = DateTime.UtcNow.AddMinutes(LoginInfo.Timeoffset);
                    purchaseModel.ReferenceNo = _iPurchaseService.ReferenceNumber().ToString();
                }
                purchaseModel.SupplierList   = _iDropDownService.GetSupplierList();
                purchaseModel.StoreList      = _iDropDownService.GetStoreList();
                purchaseModel.EmployeeList   = _iDropDownService.GetEmployeeList();
                purchaseModel.IngredientList = _iDropDownService.GetIngredientList();
                return(View(purchaseModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
Beispiel #5
0
        // GET: Waste
        public ActionResult WasteList(int?foodMenuId, int?ingredientId)
        {
            _iCommonService.GetPageWiseRoleRigths("Waste");
            WasteListViewModel wasteListViewModel = new WasteListViewModel();

            wasteListViewModel.FoodMenuList    = _iDropDownService.GetFoodMenuList();
            wasteListViewModel.IngredientList  = _iDropDownService.GetIngredientList();
            wasteListViewModel.WasteListModels = _iWasteService.GetWasteList(Convert.ToInt32(foodMenuId), Convert.ToInt32(ingredientId)).ToList();
            return(View(wasteListViewModel));
        }
        public ActionResult GetIngredientList()
        {
            PurchaseModel purchaseModel = new PurchaseModel();

            purchaseModel.IngredientList = _iDropDownService.GetIngredientList();
            return(Json(new { purchaseModel.IngredientList }));
        }
        public ActionResult ProductionEntry(int?id, int?foodMenuType, int?productionFormulaId, string type)
        {
            if (UserRolePermissionForPage.Add == true || UserRolePermissionForPage.Edit == true || UserRolePermissionForPage.View == true)
            {
                ProductionEntryModel productionEntryModel = new ProductionEntryModel();
                TempData["foodMenuType"] = foodMenuType;

                if (id > 0)
                {
                    ViewBag.ActionType   = type;
                    productionEntryModel = _iProductionEntryService.GetProductionEntryById(Convert.ToInt32(id));
                }
                else
                {
                    if (Convert.ToInt32(productionFormulaId) > 0)
                    {
                        productionEntryModel = _iProductionEntryService.GetProductionFormulaById(Convert.ToInt32(productionFormulaId));
                    }
                    productionEntryModel.ProductionDate = DateTime.UtcNow.AddMinutes(LoginInfo.Timeoffset);
                    productionEntryModel.FoodmenuType   = Convert.ToInt32(foodMenuType);
                }
                productionEntryModel.ProductionFormulaList = _iDropDownService.GetProductionFormulaList(Convert.ToInt32(foodMenuType));
                productionEntryModel.FoodMenuList          = _iDropDownService.GetFoodMenuListByFoodmenuType(3);
                productionEntryModel.IngredientList        = _iDropDownService.GetIngredientList();
                productionEntryModel.StoreList             = _iDropDownService.GetStoreList();
                ViewBag.SelectedStore = productionEntryModel.StoreList.Where(x => x.Selected == true).Select(x => x.Value).SingleOrDefault();

                return(View(productionEntryModel));
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
        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"));
            }
        }
        public ActionResult InventoryAlteration(int?id, int?inventoryType)
        {
            _iCommonService.GetPageWiseRoleRigths("InventoryAlteration");
            InventoryAlterationModel inventoryAlterationModel = new InventoryAlterationModel();

            inventoryAlterationModel.FoodMenuList   = _iDropDownService.GetFoodMenuList();
            inventoryAlterationModel.IngredientList = _iDropDownService.GetIngredientList();
            inventoryAlterationModel.AssetItemList  = _iDropDownService.GetAssetItemList();
            inventoryAlterationModel.StoreList      = _iDropDownService.GetStoreList();
            inventoryAlterationModel.ReferenceNo    = _inventoryAlterationService.ReferenceNumberInventoryAlteration();
            inventoryAlterationModel.InventoryType  = Convert.ToInt32(inventoryType);
            return(View(inventoryAlterationModel));
        }
        public IActionResult Index(int?foodMenuId)
        {
            _iCommonService.GetPageWiseRoleRigths("FoodMenuIngredient");
            FoodMenuIngredientModel foodMenuIngredientModel = new FoodMenuIngredientModel();

            if (Convert.ToInt32(foodMenuId) > 0)
            {
                foodMenuIngredientModel = _iFoodMenuIngredientService.GetFoodMenuIngredientList(Convert.ToInt32(foodMenuId));
            }
            foodMenuIngredientModel.FoodCategoryList = _iDropDownService.GetFoodMenuCategoryList();
            foodMenuIngredientModel.FoodMenuList     = _iDropDownService.GetFoodMenuList();
            foodMenuIngredientModel.IngredientList   = _iDropDownService.GetIngredientList();
            return(View(foodMenuIngredientModel));
        }