Esempio n. 1
0
        /// <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();
        }
Esempio n. 2
0
        public ActionResult GetProjectListByDeveloper(TaskPresenter taskPresenter, string developerId)
        {
            if (taskPresenter != null)
            {
                taskPresenter.SelectedDeveloper = Convert.ToInt32(developerId, CultureInfo.CurrentCulture);
                taskPresenter.AssignProjectsByDeveloperId(this.taskService.RetrieveProjectByDeveloperId(taskPresenter.SelectedDeveloper, SessionData.Instance.UserInfo.Developer.DeveloperID));

                return this.Json(taskPresenter);
            }

            return this.Json(string.Empty);
        }