public IActionResult Grid(TaskSearchModel model) { model = InitializeModel(model); var result = _taskApiClient.GetTasks(model).Result; return(PartialView(result)); }
public ActionResult Clear() { var m = new TaskSearchModel(); m.Search.ClearPreference(); return(Redirect("/TaskSearch")); }
public ActionResult OriginatorNames(string term, string options) { var search = new TaskSearchModel(); var n = search.FindNames("Originator", term, 10, options); return(Json(n, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { Response.NoCache(); var m = new TaskSearchModel(); m.Search.GetPreference(); return View(m); }
public void ViewTasks() { var taskSearchModel = new TaskSearchModel() { Task = "Nunit Test" }; var results = taskManagerController.ViewTasks(taskSearchModel); }
public ActionResult Index() { Response.NoCache(); var m = new TaskSearchModel(); m.Search.GetPreference(); return(View(m)); }
public TaskListModel PrepareListTaskContractAcceptances(TaskSearchModel searchModel) { var items = _workTaskService.getallTaskHasContractAcceptance(searchModel.ContractId).ToList(); return(new TaskListModel { Data = items.Select(c => c.ToModel <TaskModel>()), Total = items.Count }); }
public ActionResult GetTasks([FromQuery] TaskSearchModel search) { var Rs = service.GetAll(search); if (Rs.status == false) { return(BadRequest()); } return(Ok(Rs)); }
// // GET: /Search/TaskSearch public ActionResult TaskSearch() { var model = new TaskSearchModel { Results = new List <DomainClasses.Task>(), DisplayNoResultsMessage = false, SearchModel = new QueryModel() }; return(View(model)); }
public IResponse GetAll(TaskSearchModel search) { var(result, totalRows) = UOW.Tasks.TasksFilter(search); response.pagesTotalRows = totalRows; float all_pages = (float)totalRows / search.pageSize; response.pagesTotalNumber = (int)Math.Ceiling(all_pages); response.pageSize = search.pageSize; response.pageNumber = search.pageNumber; response.data = result; return(response); }
public ActionResult GetMyTasks([FromQuery] TaskSearchModel search) { search.ResourcesIds = new List <int> { User.GetUserId() }; var Rs = service.GetAll(search); if (Rs.status == false) { return(BadRequest()); } return(Ok(Rs)); }
public ActionResult Search(TaskSearchModel searchModel) { TaskListModel model = new TaskListModel(); model.Tasks = _taskService.Search(new TaskSearchDto { ProjectId = searchModel.ProjectId, TaskStatusId = searchModel.TaskStatusId, UserId = searchModel.UserId }); return(PartialView("_List", model)); }
private string GetFilterString(TaskSearchModel searchModel) { var filterString = string.Empty; if (searchModel != null) { if (!string.IsNullOrWhiteSpace(searchModel.FilterText)) { filterString = ODataFilterConstant.Filter + $"contains(Name,'{searchModel.FilterText}') eq true"; } AddPageSizeNumberAndSortingInFilterString(searchModel, ref filterString); } return(filterString); }
public void ViewTasks() { try { var taskSearchModel = new TaskSearchModel() { Task = "Nunit Test" }; var results = taskMangerController.ViewTasks(taskSearchModel); } catch (Exception) { Assert.Fail("API Failed"); } }
public TaskListModel PrepareTaskListModel(TaskSearchModel searchModel) { var items = _workTaskService.getTasksByConTractId(searchModel.ContractId, searchModel.ParentId).Select(c => { var m = PrepareTaskModelList(c); m.taskStatusText = _localizationService.GetLocalizedEnum(c.taskStatus); return(m); }).ToList(); var model = new TaskListModel { Data = items, Total = items.Count }; return(model); }
public IEnumerable <TaskGroupViewModel> TasksMonthlyGroup(TaskSearchModel search) { var query = Context.Tasks.Include(t => t.Type).Where(t => (String.IsNullOrEmpty(search.keyWord) || t.Name.Contains(search.keyWord) || t.Description.Contains(search.keyWord)) && (search.TasksIds == null || search.TasksIds.Count == 0 || search.TasksIds.Contains(t.Id)) && (search.TypeIds == null || search.TypeIds.Count == 0 || search.TypeIds.Contains(t.TypeId)) && (search.TaskStateIds == null || search.TaskStateIds.Count == 0 || search.TaskStateIds.Contains(t.TaskStateId)) && (search.ResourcesIds == null || search.ResourcesIds.Count == 0 || search.ResourcesIds.Contains(t.ResourceId)) && (search.StateIds == null || search.StateIds.Count == 0 || search.StateIds.Contains(t.TaskStateId)) && (search.SpecificDate == null || (t.StartDate.Value.Date <= search.SpecificDate.Value.Date && search.SpecificDate.Value.Date < t.EndDate.Value.Date)) && (search.StartDate == null || t.StartDate.Value >= search.StartDate) && (search.EndDate == null || t.EndDate.Value <= search.EndDate) && (search.ApproveByMe == null || t.ApprovedByMe)) .Select(t => new TaskViewModel { TaskId = t.Id, Name = t.Name, Description = t.Description, ResourceId = t.ResourceId, ResourceName = t.Resource.UserName, ApprovedByResource = t.ApprovedByMe, StartDate = t.StartDate.Value, EndDate = t.EndDate.Value, TypeId = t.TypeId, TypeName = t.Type.Name, PrioityId = t.PriorityId, PrioityName = t.Priority.Name, TaskStateId = t.TaskStateId, TaskStateName = t.TaskState.Name, Comment = t.Comment, }); var dataGroupped = query.ToList().GroupBy(g => new { g.StartDate.Year, g.StartDate.Month }).Select(s => new TaskGroupViewModel { Start = s.First().StartDate.Date, Month = s.First().StartDate.Month, Year = s.First().StartDate.Year, TotalTasks = s.Count(), Pending = s.Count(wh => wh.TaskStateId == 1), Rejected = s.Count(wh => wh.TaskStateId == 2), Approved = s.Count(wh => wh.TaskStateId == 3), }).OrderBy(or => or.Year).ThenBy(or => or.Month); return(dataGroupped); }
public ActionResult TaskSearch(TaskSearchModel model) { try { int backlogId = Int32.Parse(Session["BacklogId"].ToString()); var taskRepo = new TaskRepository(); var results = taskRepo.QueryTasks(backlogId, model.SearchModel.Title, model.SearchModel.TaskPriority, model.SearchModel.TaskStatus, model.SearchModel.TaskType); var returnModel = new TaskSearchModel() { DisplayNoResultsMessage = results.Count < 1, SearchModel = model.SearchModel, Results = results }; return(View(returnModel)); } catch { return(View()); } }
private TaskSearchModel InitializeModel(TaskSearchModel model) { if (model == null) { model = new TaskSearchModel { SortColumn = "Id", SortDirection = "Desc", PageSize = 8, PageNumber = 1 }; } else { if (string.IsNullOrWhiteSpace(model.SortColumn)) { model.SortColumn = "Id"; model.SortDirection = "Desc"; } } model.TargetGridId = "TaskGrid"; return(model); }
public (IEnumerable <TaskViewModel>, int) TasksFilter(TaskSearchModel search) { var query = Context.Tasks.Include(t => t.Type).Where(t => (String.IsNullOrEmpty(search.keyWord) || t.Name.Contains(search.keyWord) || t.Description.Contains(search.keyWord)) && (search.TasksIds == null || search.TasksIds.Count == 0 || search.TasksIds.Contains(t.Id)) && (search.TypeIds == null || search.TypeIds.Count == 0 || search.TypeIds.Contains(t.TypeId)) && (search.TaskStateIds == null || search.TaskStateIds.Count == 0 || search.TaskStateIds.Contains(t.TaskStateId)) && (search.ResourcesIds == null || search.ResourcesIds.Count == 0 || search.ResourcesIds.Contains(t.ResourceId)) && (search.StateIds == null || search.StateIds.Count == 0 || search.StateIds.Contains(t.TaskStateId)) && (search.SpecificDate == null || (t.StartDate.Value.Date <= search.SpecificDate.Value.Date && search.SpecificDate.Value.Date < t.EndDate.Value.Date)) && (search.StartDate == null || t.StartDate.Value >= search.StartDate) && (search.EndDate == null || t.EndDate.Value <= search.EndDate) && (search.ApproveByMe == null || t.ApprovedByMe)) .Select(t => new TaskViewModel { TaskId = t.Id, Name = t.Name, Description = t.Description, ResourceId = t.ResourceId, ResourceName = t.Resource.UserName, ApprovedByResource = t.ApprovedByMe, StartDate = t.StartDate.Value, EndDate = t.EndDate.Value, TypeId = t.TypeId, TypeName = t.Type.Name, PrioityId = t.PriorityId, PrioityName = t.Priority.Name, TaskStateId = t.TaskStateId, TaskStateName = t.TaskState.Name, Comment = t.Comment, }); var count = query.Count(); var data = query.OrderBy(t => t.TaskId).Skip((search.pageNumber - 1) * search.pageSize).Take(search.pageSize); return(data, count); }
public ActionResult Results(TaskSearchModel m) { m.Search.SavePreference(); return(View(m)); }
public ActionResult Complete(TaskSearchModel m) { m.Complete(); m.Search.SavePreference(); return(Redirect("/TaskSearch")); }
public async Task <TaskSearchModel> GetTasks(TaskSearchModel model) { return(await _calendarTaskApiClient.GetTasks(model)); }
public List <TaskDetailsModel> GetTaskDetails(TaskSearchModel taskSearchModel) { return(_iTaskDataRepository.GetTaskDetails(taskSearchModel)); }
public ActionResult Delegate(int id, TaskSearchModel m) { m.Delegate(id); m.Search.SavePreference(); return(Redirect("/TaskSearch")); }
public ActionResult GetGrouped([FromQuery] TaskSearchModel search) { var Rs = service.GetGrouped(search); return(Ok(Rs)); }
public List <TaskDetailsModel> ViewTasks(TaskSearchModel taskSearchModel) { return(_ITaskMaintenance.GetTaskDetails(taskSearchModel)); }
public ActionResult Clear() { var m = new TaskSearchModel(); m.Search.ClearPreference(); return Redirect("/TaskSearch"); }
public ActionResult UnArchive(TaskSearchModel m) { m.Archive(); m.Search.SavePreference(); return Redirect("/TaskSearch"); }
public ActionResult Results(TaskSearchModel m) { m.Search.SavePreference(); return View(m); }
public ActionResult AboutNames(string term, string options) { var n = TaskSearchModel.FindNames("About", term, 10, options); return(Json(n, JsonRequestBehavior.AllowGet)); }
public virtual IActionResult List(TaskSearchModel searchmodel) { var items = _taskModelFactory.PrepareTaskListModel(searchmodel); return(Json(items)); }
public ActionResult UnArchive(TaskSearchModel m) { m.Archive(); m.Search.SavePreference(); return(Redirect("/TaskSearch")); }
public virtual IActionResult _ContractTaskChild(TaskSearchModel searchmodel) { var model = _taskModelFactory.PrepareTaskListModel(searchmodel); return(PartialView(model)); }
public TaskSearchModel PrepareTaskSearchModel(TaskSearchModel searchModel) { throw new NotImplementedException(); }
public ActionResult Delegate(int id, TaskSearchModel m) { m.Delegate(id); m.Search.SavePreference(); return Redirect("/TaskSearch"); }