//Constructor for ProjectReportViewModel public ProjectReportViewModel(ProjectReport projectReport, EmployeeNameViewModel projectManager, List <EmployeeNameViewModel> engineers, List <WorkPackageReportSnapshot> lowWpStatus, List <WorkPackageReportSnapshot> highWpStatus) { ProjectReportId = projectReport.ProjectReportId; ProjectId = projectReport.ProjectId; ProjectCode = projectReport.ProjectCode; ProjectName = projectReport.ProjectName; ReportDate = DateTime.Now; StartDate = projectReport.StartDate; EndDate = projectReport.EndDate; ProjectManager = projectManager; Engineers = engineers; LowWpStatus = new List <LowWorkPackage>(); HighWpStatus = new List <HighWorkPackage>(); foreach (WorkPackageReportSnapshot wp in lowWpStatus) { LowWpStatus.Add(new LowWorkPackage(wp)); } foreach (WorkPackageReportSnapshot wp in highWpStatus) { HighWpStatus.Add(new HighWorkPackage(wp)); } //Inner class totals totals = new Totals(LowWpStatus); }
public EmployeeChildrenListViewModel(Employee emp, EmployeeNameViewModel timesheetApprover) { this.EmployeeId = emp.EmployeeId; this.EmpCode = emp.EmployeeCode; this.EmpFirstName = emp.EmployeeFirstName; this.EmpLastName = emp.EmployeeLastName; this.TimesheetApprover = timesheetApprover; }
public EmployeeProjectViewModel(int projectId, string projectName, EmployeeNameViewModel projectManager, DateTime startDate, DateTime endDate, bool isClosed) { this.ProjectId = projectId; this.ProjectName = projectName; this.ProjectManager = projectManager; this.StartDate = startDate; this.EndDate = endDate; this.IsClosed = isClosed; }
public ProjectViewModel(int projectId, string projectName, int projectCode, double budget, string description, bool isClosed, DateTime startDate, DateTime endDate, EmployeeNameViewModel projectManager, List <EmployeeNameViewModel> employees) { ProjectId = projectId; ProjectName = projectName; ProjectCode = projectCode; Budget = budget; Description = description; IsClosed = isClosed; StartDate = startDate; EndDate = endDate; ProjectManager = projectManager; Employees = employees; }
public EmployeeDetailsViewModel(Employee emp, Credential cred, LabourGradeViewModel labourGrade, EmployeeNameViewModel timesheetApprover, EmployeeNameViewModel supervisor) { this.EmployeeId = emp.EmployeeId; this.EmpUsername = cred.CredentialId; this.EmpCode = emp.EmployeeCode; this.EmpFirstName = emp.EmployeeFirstName; this.EmpLastName = emp.EmployeeLastName; this.IsActivated = emp.IsActivated; this.IsProjectManager = emp.IsProjectManager; this.IsAdmin = emp.IsAdmin; this.IsHumanResources = emp.IsHumanResources; this.LabourGrade = labourGrade; if (timesheetApprover != null) { this.TimesheetApprover = timesheetApprover; } if (supervisor != null) { this.Supervisor = supervisor; } }
//Used for getAllWpByEmpId public WorkPackageViewModel(WorkPackage wp, string parentWpCode, Project proj, EmployeeNameViewModel re) { this.WorkPackageId = wp.WorkPackageId; this.ProjectCode = proj.ProjectCode; this.ProjectName = proj.ProjectName; this.WorkPackageCode = wp.WorkPackageCode; this.WorkPackageTitle = wp.Name; this.Contractor = wp.Contractor; this.IssueDate = wp.IssueDate; this.IsClosed = wp.IsClosed; this.ParentWorkPackageCode = parentWpCode; this.ResponsibleEngineer = re; }
//Used for GET,PUT,POST public WorkPackageViewModel(WorkPackage wp, string parentWpCode, Project proj, EmployeeNameViewModel re, IList <EmployeeNameViewModel> emps, IList <PmPlanningViewModel> pmPlannings) { this.WorkPackageId = wp.WorkPackageId; this.ProjectCode = proj.ProjectCode; this.ProjectName = proj.ProjectName; this.WorkPackageCode = wp.WorkPackageCode; this.WorkPackageTitle = wp.Name; this.Contractor = wp.Contractor; this.IssueDate = wp.IssueDate; this.IsClosed = wp.IsClosed; this.ParentWorkPackageCode = parentWpCode; this.ResponsibleEngineer = re; this.Employees = emps; this.PmPlannings = pmPlannings; }