public ActionResult ViewAllocation(TeamAllocationPresenter presenter) { this.AddBreadcrumbItem(Resources.Assignments, Url.AssignmentsAction()); this.AddBreadcrumbItem(Resources.ManageAllocation, Url.ViewAllocationAction()); if (presenter != null) { presenter.LeaveDays = this.RetireveLeavesDetails(presenter.DeveloperId.ToString()); this.SetProjectListInPresenter(presenter); if (!string.IsNullOrEmpty(presenter.SelectedProjectIds)) { List<string> ids = presenter.SelectedProjectIds.Split(CommaSeparatorCharConst).ToList(); presenter.AssignSelectedProjects(presenter.MasterProjects.Where(project => ids.Contains(project.ProjectID.ToString(CultureInfo.CurrentCulture))).ToList()); IList<DeveloperListItem> developerList = this.developerService.RetrieveList(null, null, SessionData.Instance.UserInfo.Developer.DeveloperID); presenter.AssignDeveloperList(developerList.Where(x => x.DeveloperID != presenter.DeveloperId).ToList()); } this.AssignTeamAllocationValues(presenter); } return this.View(ViewTeamAllocationConst, presenter); }
/// <summary> /// Views the allocation. /// </summary> /// <param name="developerId">The developer identifier.</param> /// <param name="date">The date.</param> /// <returns> /// View Allocation Page /// </returns> public ActionResult ViewAllocation(int developerId, string date) { this.AddBreadcrumbItem(Resources.Assignments, Url.AssignmentsAction()); this.AddBreadcrumbItem(Resources.ManageAllocation, Url.ViewAllocationAction()); TeamAllocationPresenter presenter = new TeamAllocationPresenter(); this.SetProjectListInPresenter(presenter); presenter.DeveloperId = developerId; IList<DeveloperListItem> developerList = this.developerService.RetrieveList(null, null, SessionData.Instance.UserInfo.Developer.DeveloperID); presenter.AssignDeveloperList(developerList.Where(x => x.DeveloperID != developerId).ToList()); presenter.SelectedDate = date.ConvertToSelectedDateTime(DateTimeHelper.RetrieveCurrentDateTime()); this.AssignTeamAllocationValues(presenter); presenter.AssignSelectedProjects(presenter.MasterProjects); presenter.LeaveDays = this.RetireveLeavesDetails(developerId.ToString()); return this.View(ViewTeamAllocationConst, presenter); }