///////////////////////////////////////////////////////requisition // GET: DepManager public ActionResult PendingRequisitionList() { List <SRequisition> lsr = new List <SRequisition>(); int depId = EmployeeData.FindDepIdByUsername((string)Session["username"]); lsr = SrequisitionData.FindAllPendingByDepId(depId); ViewBag.listreq = lsr; return(View()); }
public JsonResult approveReq(int reqId, string remark) { SrequisitionData.ApproveRequisition(reqId, remark); string emailaddress = SrequisitionData.FindEmpEmailById(reqId); Task task = Task.Run(() => { EmailNotification.SendNotificationEmailToEmployee(emailaddress, "Stationary Requisition Status Changed", "Your Stationary Requisition was approved"); }); object n = new { amt = 0 }; return(Json(n, JsonRequestBehavior.AllowGet)); }
public ActionResult SubmitReqForm() { SRequisition sr = (SRequisition)Session["reqform"]; SrequisitionData.SaveReq(sr); Employee e = EmployeeData.FindByUserName((string)Session["username"]); Employee manager = EmployeeData.FindEmpById(e.department.DepHeadId); Task task = Task.Run(() => { EmailNotification.SendNotificationEmailToEmployee(manager.EmailAdd, "New Stationary Requisition Reminder", "There is a new Stationary Requistion for your approval."); }); Session.Remove("reqform"); return(RedirectToAction("RequisitionList")); }
// GET: DepEmp public ActionResult RequisitionList() { List <SRequisition> lreq = new List <SRequisition>(); string user = (string)Session["username"]; bool dele = EmployeeData.GetDelegateStatusByUserName(user); ViewBag.delestatus = dele; if (dele) { Session["sessionRole"] = "DeleManager"; } lreq = SrequisitionData.FindAllByUsername(user); ViewBag.listreq = lreq; return(View()); }
public ActionResult deleteReq(int id) { SrequisitionData.deleteReqById(id); return(RedirectToAction("RequisitionList")); }