Ejemplo n.º 1
0
        //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));
        }
Ejemplo n.º 2
0
        public ActionResult AddNotification(string Notification)
        {
            NotificationsDisplay notifications = new NotificationsDisplay();

            notifications.CreateAnotification("Has finished the task New Data " + Notification, "Manager");
            return(RedirectToAction("Index", "Home"));
        }
Ejemplo n.º 3
0
        public ActionResult Assigntask(string inputask, string Employeerole)
        {
            NotificationsDisplay notifications = new NotificationsDisplay();

            notifications.CreateAnotification(inputask, Employeerole);

            return(RedirectToAction("ViewReport"));
        }
Ejemplo n.º 4
0
        public ActionResult DeleteNotification()
        {
            NotificationsDisplay notifications = new NotificationsDisplay("Delete");


            notifications.Delete(Convert.ToInt32(Session["notificationId"]));

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 5
0
        public ActionResult ViewNotification(int id)
        {
            NotificationsDisplay notifications = new NotificationsDisplay("Select");

            Session["notificationId"] = id;
            Notifications mynotificatin = notifications.GetNotificationsID(id);

            return(View(mynotificatin));
        }
Ejemplo n.º 6
0
        public ActionResult Delete(int taskId)
        {
            NotificationsDisplay notifications = new NotificationsDisplay();

            notifications.Delete(taskId);


            return(RedirectToAction("HomeIndex"));
        }
Ejemplo n.º 7
0
        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"));
        }
Ejemplo n.º 8
0
        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"));
        }
Ejemplo n.º 9
0
        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));
        }
Ejemplo n.º 10
0
        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 }));
        }
Ejemplo n.º 11
0
        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 }));;
        }
Ejemplo n.º 12
0
        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"));
        }