public IActionResult Index()
        {
            if (!(HttpContext.Session.GetString("role") == EmployeeRole.EMPLOYEE || HttpContext.Session.GetString("role") == EmployeeRole.DEPTREP))
            {
                return(RedirectToAction(HttpContext.Session.GetString("role"), "Home"));
            }

            ViewData["CategoryData"]  = inventoryItemService.CategoryList();
            ViewData["InventoryData"] = inventoryItemService.ItemList();
            return(View());
        }
예제 #2
0
        public IActionResult AddInventoryItem()
        {
            if (!(HttpContext.Session.GetString("role") == Enums.EmployeeRole.STORECLERK || HttpContext.Session.GetString("role") == Enums.EmployeeRole.STORESUPERVISOR || HttpContext.Session.GetString("role") == Enums.EmployeeRole.STOREMANAGER))
            {
                return(RedirectToAction(HttpContext.Session.GetString("role"), "Home"));
            }
            List <ItemCategory> catList     = invService.CategoryList();
            List <string>       catNameList = new List <string>();

            foreach (ItemCategory cat in catList)
            {
                catNameList.Add(cat.Name);
            }

            if (TempData["alertMsg"] != null)
            {
                ViewData["alertMsg"] = TempData["alertMsg"];
            }

            ViewBag.categoryList = catNameList;
            return(View());
        }
예제 #3
0
        public IActionResult AddAdjustmentVoucher()
        {
            if (HttpContext.Session.GetString("role") == EmployeeRole.STORESUPERVISOR || HttpContext.Session.GetString("role") == EmployeeRole.STOREMANAGER)
            {
                List <Employee> clerkList = es.GetAllClerks();
                ViewData["clerkList"]          = clerkList;
                ViewData["InventoryItem"]      = invService.ItemList();
                ViewData["SupplierStationery"] = supService.SupplierStationeryList();
                ViewData["ItemCategory"]       = invService.CategoryList();

                if (TempData["Msg"] != null)
                {
                    ViewData["Msg"] = TempData["Msg"];
                }
                return(View());
            }
            return(RedirectToAction("Index", "Home"));
        }