public ActionResult GetDeveloperListByProject(TaskPresenter taskPresenter, string projectId) { if (taskPresenter != null) { taskPresenter.SelectedProject = Convert.ToInt32(projectId, CultureInfo.CurrentCulture); taskPresenter.AssignDeveloperListByProjectId(this.taskService.RetrieveDeveloperByProjectId(taskPresenter.SelectedProject, SessionData.Instance.UserInfo.Developer.DeveloperID, TaskType)); return this.Json(taskPresenter); } return this.Json(string.Empty); }
/// <summary> /// Assigns the add task data. /// </summary> /// <param name="taskPresenter">The task presenter.</param> private void AssignAddTaskData(TaskPresenter taskPresenter) { if (taskPresenter.SelectedProject != DefaultValue) { taskPresenter.AssignDeveloperListByProjectId(this.taskService.RetrieveDeveloperByProjectId(taskPresenter.SelectedProject, SessionData.Instance.UserInfo.Developer.DeveloperID, TaskType)); } else { taskPresenter.AssignDeveloperList(this.developerService.RetrieveList(null, null, SessionData.Instance.UserInfo.Developer.DeveloperID)); } if (taskPresenter.SelectedDeveloper != DefaultValue) { taskPresenter.AssignProjectsByDeveloperId(this.taskService.RetrieveProjectByDeveloperId(taskPresenter.SelectedDeveloper, SessionData.Instance.UserInfo.Developer.DeveloperID)); } else { taskPresenter.AssignProjectsList(taskPresenter.IncludeInactive ? this.lookupService.RetrieveProjects(null, null, null, false, SessionData.Instance.UserInfo.Developer.DeveloperID) : this.lookupService.RetrieveProjects(null, null, false, false, SessionData.Instance.UserInfo.Developer.DeveloperID)); } taskPresenter.StartDate = DateTimeHelper.RetrieveCurrentDate(); }
/// <summary> /// Assigns the edit task data. /// </summary> /// <param name="taskPresenter">The task presenter.</param> private void AssignEditTaskData(TaskPresenter taskPresenter) { taskPresenter.AssignProjectsList(taskPresenter.IncludeInactive ? this.lookupService.RetrieveProjects(null, null, null, false, SessionData.Instance.UserInfo.Developer.DeveloperID) : this.lookupService.RetrieveProjects(null, null, false, false, SessionData.Instance.UserInfo.Developer.DeveloperID)); taskPresenter.AssignDeveloperListByProjectId(this.taskService.RetrieveDeveloperByProjectId(taskPresenter.TaskDetails.ProjectID, SessionData.Instance.UserInfo.Developer.DeveloperID, TaskType)); if (taskPresenter.TaskStatusFilterList.Count > 0) { if (taskPresenter.TaskDetails != null && taskPresenter.TaskDetails.Status == InProgressStatus) { taskPresenter.TaskStatusFilterList.Remove(taskPresenter.TaskStatusFilterList.FirstOrDefault(item => item.Name.Equals(DefaultNewStatus))); } } }