public IActionResult Post([FromBody] CustomRequestMobile data)
        {
            if (data.Category.Equals("Select Category"))
            {
                return(NotFound());
            }
            if (data.Description.Equals(""))
            {
                return(NotFound());
            }
            if (data.RequestQty.Equals(""))
            {
                return(NotFound());
            }

            string employeeId = data.EmployeeId.ToString();
            int    RequestId  = requestService.addRequest(employeeId);

            CustomRequestDetails crq = new CustomRequestDetails();

            crq.Category    = data.Category;
            crq.Description = data.Description;
            crq.Qty         = data.RequestQty;

            InventoryItem findItem = new InventoryItem();

            findItem   = inventService.GetItemByDescription(crq.Description);
            crq.ItemId = findItem.Id;
            requestService.AddRequestDetailsMobile(RequestId, crq);
            emailservice.sendrequestsubmitemailnotifitcation(data.EmployeeId);
            return(Ok(crq));
        }
        public IActionResult InsertRequests([FromBody] List <CustomRequestDetails> data)
        {
            if (!(HttpContext.Session.GetString("role") == EmployeeRole.EMPLOYEE || HttpContext.Session.GetString("role") == EmployeeRole.DEPTREP))
            {
                return(RedirectToAction(HttpContext.Session.GetString("role"), "Home"));
            }
            string employeeId = HttpContext.Session.GetString("id");
            int    RequestId  = requestService.addRequest(employeeId);

            requestService.AddRequestDetails(RequestId, data);
            //email notification to employee to indicate successful submission
            emailService.sendrequestsubmitemailnotifitcation(int.Parse(employeeId));
            //email notification to ActingHead or DepartmentHead to review request
            emailService.sendPendingApprovalEmailNotification(int.Parse(employeeId));

            return(View());
        }