//home Index displalys notifications public ActionResult HomeIndex() { NotificationsDisplay notifications = new NotificationsDisplay("Select"); List <Notifications> pNotiList = new List <Notifications>(); pNotiList = notifications.dispalayNotifications(); List <Notifications> Mynotifications = new List <Notifications>(); foreach (var n in pNotiList) { if (n.RecieverRole == Session["UserRole"].ToString()) { Notifications notifications1 = new Notifications(); notifications1 = n; Mynotifications.Add(notifications1); } } autoclose(); return(View(Mynotifications)); }
public ActionResult AddNotification(string Notification) { NotificationsDisplay notifications = new NotificationsDisplay(); notifications.CreateAnotification("Has finished the task New Data " + Notification, "Manager"); return(RedirectToAction("Index", "Home")); }
public ActionResult Assigntask(string inputask, string Employeerole) { NotificationsDisplay notifications = new NotificationsDisplay(); notifications.CreateAnotification(inputask, Employeerole); return(RedirectToAction("ViewReport")); }
public ActionResult DeleteNotification() { NotificationsDisplay notifications = new NotificationsDisplay("Delete"); notifications.Delete(Convert.ToInt32(Session["notificationId"])); return(RedirectToAction("Index")); }
public ActionResult ViewNotification(int id) { NotificationsDisplay notifications = new NotificationsDisplay("Select"); Session["notificationId"] = id; Notifications mynotificatin = notifications.GetNotificationsID(id); return(View(mynotificatin)); }
public ActionResult Delete(int taskId) { NotificationsDisplay notifications = new NotificationsDisplay(); notifications.Delete(taskId); return(RedirectToAction("HomeIndex")); }
public ActionResult AddNotification(string Notification) { NotificationsDisplay notifications = new NotificationsDisplay(); notifications.CreateAnotification("A mantainance task is completed new readings : " + Notification, "Manager"); oasisTask updateTask = new oasisTask("Update"); updateTask.Update(staticTaskid); return(RedirectToAction("HomeIndex", "Home")); }
public ActionResult OasisTask(string NewTask, string id) { oasisTask MynewTask = new oasisTask("Insert_no_model"); MynewTask.NewTask(Convert.ToInt32(Session["userId"]), "oasisTask", NewTask); NotificationsDisplay notifications = new NotificationsDisplay(); notifications.Delete(Convert.ToInt32(id)); return(RedirectToAction("GetTask")); }
public ActionResult Colaboration(int TaskId) { Taskid = TaskId; Session.Remove("taskID"); NotificationsDisplay notifications = new NotificationsDisplay(); Coloboration coloborations = new Coloboration("Select"); pNotiList = coloborations.GetComments(TaskId); Session["taskID"] = TaskId; return(View(pNotiList)); }
public ActionResult addSaleData(int Quantity) { genericProduct genericProduct = new genericProduct(); List <Product> productList = new List <Product>(); int q = curentQ - Quantity; genericProduct.UpdateQuantity(prodid, q); if (q < 5) { NotificationsDisplay notifications = new NotificationsDisplay(); notifications.CreateAnotification("Only " + q + " products left for " + productname, "Packeger"); } return(RedirectToAction("addSaleData", new { id = prodid, curntQ = curentQ })); }
public ActionResult MyColaboration(string Comment, int idtask) { Coloboration coloborations = new Coloboration("Insert"); coloborations.SendCollab(Convert.ToInt32(Session["userId"]), Taskid, Comment, Session["taskDetail"].ToString()); NotificationsDisplay notifications = new NotificationsDisplay(); notifications.CreateAnotificationColaboration("A collaboration on a task with details of : ' " + Session["taskDetail"].ToString() + " ' has occured ", "Manager", idtask); notifications.CreateAnotificationColaboration("A collaboration on a task with details of : '" + Session["taskDetail"].ToString() + " ' has occured ", "ProccessAreaEmployee", idtask); notifications.CreateAnotificationColaboration("A collaboration on a task with details of : ' " + Session["taskDetail"].ToString() + " ' has occured ", "StorageAreaEmployee", idtask); notifications.CreateAnotificationColaboration("A collaboration on a task with details of ' " + Session["taskDetail"].ToString() + " ' has occured ", "FrontEndEmployee", idtask); notifications.CreateAnotificationColaboration("A collaboration on a task with details of ' " + Session["taskDetail"].ToString() + " ' has occured ", "ProccessMaintananceEmployee", idtask); Session.Remove("taskDetail"); return(RedirectToAction("Colaboration", new { Taskid = Taskid }));; }
public ActionResult Filltask(string Taksdetail) { oasisTask MynewTask = new oasisTask("Insert_no_model"); NotificationsDisplay notifications = new NotificationsDisplay(); MynewTask.NewTask(Convert.ToInt32(Session["userId"]), "assgined", Taksdetail); if (Session["userRole"].ToString() == "ProccessMaintananceEmployee") { notifications.CreateAnotification("A task with detail : " + Taksdetail + " has been established to fix checklist readings", "Manager"); } else { notifications.CreateAnotification("A task with detail : " + Taksdetail + " is fulfilled", "Manager"); } return(RedirectToAction("GetTask")); }