Ejemplo n.º 1
0
        //For store employee to view and add catalogue
        public ActionResult All(string sessionId)
        {
            string desc = "";
            string cat  = "";

            desc = null == Request.Form["desSearch"] ? "" : Request.Form["desSearch"];
            cat  = null == Request.Form["catSearch"] ? "" : Request.Form["catSearch"];
            List <Inventory> catalogues = RequisitionService.ShowItems(desc, cat);
            List <string>    category   = new List <string>();

            category = RequisitionService.GetALLCategories();

            ViewData["catalogues"] = catalogues;
            ViewData["sessionId"]  = sessionId;
            ViewData["category"]   = category;
            return(View());
        }
Ejemplo n.º 2
0
        public ActionResult NewRequisition(string sessionId)
        {
            string desc = "";
            string cat  = "";

            desc = null == Request.Form["desSearch"]? "" : Request.Form["desSearch"];
            cat  = null == Request.Form["catSearch"] ? "" : Request.Form["catSearch"];
            Employee         emp      = EmployeeService.GetUserBySessionId(sessionId);
            List <Inventory> itemList = RequisitionService.ShowItems(desc, cat);
            List <string>    category = new List <string>();

            category              = RequisitionService.GetALLCategories();
            ViewData["desc"]      = desc;
            ViewData["cat"]       = cat;
            ViewData["emp"]       = emp;
            ViewData["sessionId"] = sessionId;
            ViewData["itemList"]  = itemList;
            ViewData["isRep"]     = (emp.EmpRole == "REPRESENTATIVE");
            ViewData["category"]  = category;

            return(View(itemList));
        }