public ActionResult List() { var tasks = new TaskModel(); UpdateModel(tasks); DbUtil.LogActivity("Tasks"); return View(tasks); }
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); }
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); }
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; }
public ActionResult Row(int id) { var tasks = new TaskModel(); return PartialView(tasks.FetchTask(id)); }
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; }
public ActionResult Accept(int id) { var tasks = new TaskModel { Id = id.ToString() }; tasks.AcceptTask(id); return Content("Done"); }
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)); }
public ActionResult IncompleteTasksGrid(int id) { var m = new CmsWeb.Models.TaskModel(); return(View(m.IncompleteTasksList(id))); }
public ActionResult Accept(int id) { var tasks = new TaskModel { Id = id.ToString() }; tasks.AcceptTask(id); return PartialView("Detail", tasks.FetchTask(id)); }
public ActionResult AddList(string ListName) { var model = new TaskModel(); model.AddList(ListName); return View("TabsOptions", model); }
public ActionResult ChangeAbout(int id, int peopleid) { TaskModel.SetWhoId(id, peopleid); var tasks = new TaskModel(); return PartialView("Detail", tasks.FetchTask(id)); }
public ActionResult ChangeOwner(int id, int peopleid) { var tasks = new TaskModel(); tasks.ChangeOwner(id, peopleid); return PartialView("Detail", tasks.FetchTask(id)); }
public ActionResult IncompleteTasksGrid(int id) { var m = new TaskModel(); return View(m.IncompleteTasksList(id)); }
public ActionResult PendingTasksGrid(int id) { var m = new TaskModel(); return View(m.TasksAboutList(id)); }
public ActionResult AddTask(string description) { var model = new TaskModel(); var tid = model.AddTask(model.PeopleId, 0, description); return Content(tid.ToString()); }
public ActionResult Detail(int id) { var tasks = new TaskModel(); return View("Detail", tasks.FetchTask(id)); }
public ActionResult Decline(int id, string reason) { var tasks = new TaskModel(); tasks.DeclineTask(id, reason); return Redirect($"/Task/Detail/{id}"); }
public ActionResult SetComplete(int id) { var tasks = new TaskModel { Id = id.ToString() }; tasks.CompleteTask(id); return PartialView("Columns", tasks.FetchTask(id)); }
public JsonResult CompleteWithContact(int id) { var tasks = new TaskModel(); var contactid = tasks.AddCompletedContact(id); return Json(new { ContactId = contactid }); }
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); }
public ActionResult Delegate(int id, int peopleid) { var tasks = new TaskModel(); tasks.Delegate(id, peopleid); return PartialView("Detail", tasks.FetchTask(id)); }
public ActionResult Update(int id) { var m = new TaskModel(); var t = m.FetchTask(id); UpdateModel(t); t.UpdateTask(); return RedirectToAction("Detail", new { id = id }); }
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); }
public ActionResult AddSourceContact(int id, int contactid) { var tasks = new TaskModel(); tasks.AddSourceContact(id, contactid); return PartialView("Detail", tasks.FetchTask(id)); }
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); }
public TaskDetail GetDetail() { var m = new TaskModel(); return m.FetchTask(Id); }
public ActionResult Edit(int id) { var m = new TaskModel(); return PartialView(m.FetchTask(id)); }
public ActionResult PendingTasksGrid(int id) { var m = new CmsWeb.Models.TaskModel(); return(View(m.TasksAboutList(id))); }
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); }
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)); }
public ActionResult SetComplete(int id) { var tasks = new TaskModel { Id = id.ToString() }; tasks.CompleteTask(id); return Content("Done"); }