Esempio n. 1
0
 public ActionResult List()
 {
     var tasks = new TaskModel();
     UpdateModel(tasks);
     DbUtil.LogActivity("Tasks");
     return View(tasks);
 }
Esempio n. 2
0
        public ActionResult Action(int? id, string option, string items, string curtab)
        {
            var tasks = new TaskModel();
            tasks.CurTab = curtab;
            var a = items.SplitStr(",").Select(i => i.ToInt());

            if (option.StartsWith("M"))
            {
                var ToTab = option.Substring(1).ToInt();
                if (curtab == "t" + ToTab)
                    return new EmptyResult();
                tasks.MoveTasksToList(a, ToTab);
            }
            else if (option == "deletelist")
            {
                tasks.DeleteList(curtab);
                return PartialView("TabsOptionsRows", tasks);
            }
            else if (option == "delete")
                tasks.DeleteTasks(a);
            else if (option.StartsWith("P"))
                tasks.Priortize(a, option);
            else if (option == "archive")
                tasks.ArchiveTasks(a);

            return PartialView("Rows", tasks);
        }
Esempio n. 3
0
        public ActionResult Action(int? id, string option, string items, string curtab)
        {
            var tasks = new TaskModel();
            tasks.CurTab = curtab;
            var a = items.SplitStr(",").Select(i => i.ToInt());

            if (option == "delete")
                tasks.DeleteTasks(a);

            return PartialView("Rows", tasks);
        }
Esempio n. 4
0
        public ActionResult AcceptTask(string data)
        {
            var result = AuthenticateUser();
            if (!result.IsValid) return AuthorizationError(result);

            BaseMessage dataIn = BaseMessage.createFromString(data);

            var task = new TaskModel();
            task.AcceptTask(dataIn.argInt);

            BaseMessage br = new BaseMessage();
            br.count = 1;
            br.setNoError();

            return br;
        }
Esempio n. 5
0
 public ActionResult Row(int id)
 {
     var tasks = new TaskModel();
     return PartialView(tasks.FetchTask(id));
 }
Esempio n. 6
0
        public ActionResult FetchCompleteWithContactLink(string data)
        {
            var result = AuthenticateUser();
            if (!result.IsValid) return AuthorizationError(result);

            BaseMessage dataIn = BaseMessage.createFromString(data);

            var tasks = new TaskModel();
            var contactid = tasks.AddCompletedContact(dataIn.argInt);

            BaseMessage br = new BaseMessage();
            br.data = GetOneTimeLoginLink($"/Contact2/{contactid}?edit=true&{dataIn.getSourceQueryString()}", Util.UserName);
            br.count = 1;
            br.setNoError();
            return br;
        }
Esempio n. 7
0
 public ActionResult Accept(int id)
 {
     var tasks = new TaskModel { Id = id.ToString() };
     tasks.AcceptTask(id);
     return Content("Done");
 }
Esempio n. 8
0
 public ActionResult AddTask(string CurTab, string TaskDesc)
 {
     var model = new TaskModel { CurTab = CurTab };
     var listid = model.CurListId;
     if (listid == 0)
     {
         listid = TaskModel.InBoxId(model.PeopleId);
         var c = new HttpCookie("tasktab", model.CurTab);
         c.Expires = Util.Now.AddDays(360);
         Response.Cookies.Add(c);
     }
     var tid = model.AddTask(model.PeopleId, listid, TaskDesc);
     return PartialView("Row", model.FetchTask(tid));
 }
Esempio n. 9
0
        public ActionResult IncompleteTasksGrid(int id)
        {
            var m = new CmsWeb.Models.TaskModel();

            return(View(m.IncompleteTasksList(id)));
        }
Esempio n. 10
0
 public ActionResult Accept(int id)
 {
     var tasks = new TaskModel { Id = id.ToString() };
     tasks.AcceptTask(id);
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 11
0
 public ActionResult AddList(string ListName)
 {
     var model = new TaskModel();
     model.AddList(ListName);
     return View("TabsOptions", model);
 }
Esempio n. 12
0
 public ActionResult ChangeAbout(int id, int peopleid)
 {
     TaskModel.SetWhoId(id, peopleid);
     var tasks = new TaskModel();
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 13
0
 public ActionResult ChangeOwner(int id, int peopleid)
 {
     var tasks = new TaskModel();
     tasks.ChangeOwner(id, peopleid);
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 14
0
 public ActionResult IncompleteTasksGrid(int id)
 {
     var m = new TaskModel();
     return View(m.IncompleteTasksList(id));
 }
Esempio n. 15
0
 public ActionResult PendingTasksGrid(int id)
 {
     var m = new TaskModel();
     return View(m.TasksAboutList(id));
 }
Esempio n. 16
0
 public ActionResult AddTask(string description)
 {
     var model = new TaskModel();
     var tid = model.AddTask(model.PeopleId, 0, description);
     return Content(tid.ToString());
 }
Esempio n. 17
0
 public ActionResult Detail(int id)
 {
     var tasks = new TaskModel();
     return View("Detail", tasks.FetchTask(id));
 }
Esempio n. 18
0
 public ActionResult Decline(int id, string reason)
 {
     var tasks = new TaskModel();
     tasks.DeclineTask(id, reason);
     return Redirect($"/Task/Detail/{id}");
 }
Esempio n. 19
0
 public ActionResult SetComplete(int id)
 {
     var tasks = new TaskModel { Id = id.ToString() };
     tasks.CompleteTask(id);
     return PartialView("Columns", tasks.FetchTask(id));
 }
Esempio n. 20
0
 public JsonResult CompleteWithContact(int id)
 {
     var tasks = new TaskModel();
     var contactid = tasks.AddCompletedContact(id);
     return Json(new { ContactId = contactid });
 }
Esempio n. 21
0
 public ActionResult Update(int id)
 {
     var m = new TaskModel();
     var t = m.FetchTask(id);
     UpdateModel(t);
     t.UpdateTask();
     t = m.FetchTask(id);
     return View("Detail", t);
 }
Esempio n. 22
0
 public ActionResult Delegate(int id, int peopleid)
 {
     var tasks = new TaskModel();
     tasks.Delegate(id, peopleid);
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 23
0
 public ActionResult Update(int id)
 {
     var m = new TaskModel();
     var t = m.FetchTask(id);
     UpdateModel(t);
     t.UpdateTask();
     return RedirectToAction("Detail", new { id = id });
 }
Esempio n. 24
0
 public ActionResult DelegateAll(int id, string items)
 {
     var tasks = new TaskModel();
     var a = items.SplitStr(",").Select(i => i.ToInt());
     foreach (var tid in a)
     {
         var t = tasks.Delegate(tid, id);
         if (t != null)
             t.ForceCompleteWContact = true;
     }
     DbUtil.Db.SubmitChanges();
     return PartialView("Rows", tasks);
 }
Esempio n. 25
0
 public ActionResult AddSourceContact(int id, int contactid)
 {
     var tasks = new TaskModel();
     tasks.AddSourceContact(id, contactid);
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 26
0
        public ActionResult DelegateAll(int id, string items)
        {
            var tasks = new TaskModel();
            var tasksToAlter = items.SplitStr(",").Select(i => i.ToInt());

            tasks.DelegateAll(tasksToAlter, id);

            return PartialView("Rows", tasks);
        }
Esempio n. 27
0
 public TaskDetail GetDetail()
 {
     var m = new TaskModel();
     return m.FetchTask(Id);
 }
Esempio n. 28
0
 public ActionResult Edit(int id)
 {
     var m = new TaskModel();
     return PartialView(m.FetchTask(id));
 }
Esempio n. 29
0
        public ActionResult PendingTasksGrid(int id)
        {
            var m = new CmsWeb.Models.TaskModel();

            return(View(m.TasksAboutList(id)));
        }
Esempio n. 30
0
 public ActionResult List(string id)
 {
     var tasks = new TaskModel();
     UpdateModel<ITaskFormBindable>(tasks);
     DbUtil.LogActivity("Tasks");
     if (id == "0")
         return PartialView("Rows", tasks);
     return View(tasks);
 }
Esempio n. 31
0
 public ActionResult Detail(int id, int? rowid)
 {
     var tasks = new TaskModel();
     if (rowid.HasValue)
     {
         ViewData.Add("detailid", id);
         ViewData.Add("rowid", rowid);
         return PartialView("Detail2", tasks);
     }
     return PartialView("Detail", tasks.FetchTask(id));
 }
Esempio n. 32
0
 public ActionResult SetComplete(int id)
 {
     var tasks = new TaskModel { Id = id.ToString() };
     tasks.CompleteTask(id);
     return Content("Done");
 }