public ProjectsVM() { projectsBL = new ProjectsBL(); personalManagerProjectsList = new ObservableCollection <ProjectVM>(); personalParticipantProjectsList = new ObservableCollection <ProjectVM>(); Init(); }
public CriticalPathVM(List <int> projectsId) { Project p; criticalPath = new CriticalPath(); Data = new List <ProjectChartItem>(); projectsBL = new ProjectsBL(); foreach (var item in projectsId) { p = projectsBL.GetProjectEntityById(item); if (p.EndDate != DateTime.MinValue) { Data.Add(new ProjectChartItem() { Name = p.Name, Common = Duration(p.StartDate, p.EndDate), Desirable = criticalPath.CalcLongestPath(item) }); } } }
public ManagedProjectPage(ProjectVM pvm) { InitializeComponent(); projectBL = new ProjectsBL(); missionsBL = new MissionsBL(); ProjectDoneBtn.IsEnabled = true; Project p = new Project(); p.Code = pvm.Code; foreach (var mission in missionsBL.GetAllMissions(p)) { if (mission.StatusId != 3) { ProjectDoneBtn.IsEnabled = false; } } Cache.Instance.currentProject = pvm; Cache.Instance.isManagerOfCurrentProject = true; this.vm = pvm; this.DataContext = vm; if (vm.EndDate == "01/01/0001")//default null date { this.msgEndDateLbl.Visibility = Visibility.Visible; this.msgEndDateLbl.Content = "The project is still running"; this.endDateLbl.Visibility = Visibility.Collapsed; this.endDateVal.Visibility = Visibility.Collapsed; } //שצריך לסדר שבהתחברות המשתמש יהיה במדוייק כמו המשתמש שיצרו if (pvm.Manager.UserName == Cache.Instance.username) { editProjectBtn.Visibility = Visibility.Visible; } else { editProjectBtn.Visibility = Visibility.Collapsed; } }
public CriticalPathForAProjectPage() { InitializeComponent(); projectsBL = new ProjectsBL(); CriticalPathVM vm; vm = new CriticalPathVM(new List <int>(projectsBL.GetPersonalManagerProjects(Cache.Instance.username).Select(p => p.Code))); SeriesCollection = new SeriesCollection(); ChartValues <double> DesirableValues = new ChartValues <double>(); ChartValues <double> CommonValues = new ChartValues <double>(); foreach (var item in vm.Data) { CommonValues.Add(item.Common); DesirableValues.Add(item.Desirable); } SeriesCollection.Add( new RowSeries { Title = "Desirable", Values = DesirableValues } ); //adding series will update and animate the chart automatically SeriesCollection.Add(new RowSeries { Title = "Common", Values = CommonValues }); // Labels = new[] { "Maria", "Susan", "Charles", "Frida" }; Labels = vm.Data.Select(item => item.Name).ToArray(); Formatter = value => value.ToString("N"); DataContext = this; }
public AddProjectPage() { InitializeComponent(); projectsBL = new ProjectsBL(); startDateCalendar.SelectedDate = DateTime.Today; }
public ProjectParticipantsVM(ProjectVM pvm) { projectsBL = new ProjectsBL(); this.ProjectVM = pvm; initParticipantsView(); }
public void TestTearDown() { projectBL = null; projectsController = null; }
public void TestSetUp() { projectBL = new MockProjectBL(); projectsController = new ProjectController(projectBL); }
/// <summary> /// Parameterized COnstructor /// </summary> /// <param name="projectBL"></param> public ProjectController(IProjectsBL projectBL) { _projectBL = projectBL; }
/// <summary> /// Project Controller Constructor /// </summary> public ProjectController() { _projectBL = new ProjectBL(); }