public ProjectWork CreateProjectWorkWithWorkLoad(int id, int projectid, int employeeid, int projectroleid, int workload) { ProjectWork projectwork = new ProjectWork(id, Projects.GetProjectById(projectid), Employees.GetEmployeeById(employeeid), ProjectRoles.GetRoleById(projectroleid), workload); ProjectWorkList.Add(projectwork); return(projectwork); }
public ProjectWork CreateProjectWorkWithSchedule(int id, int projectid, int employeeid, int projectroleid, int scheduleid) { Schedule schedule = Schedule.CreateSchedule(scheduleid, scheduleid); ScheduleDays scheduleday = new ScheduleDays(); ProjectWork projectwork = new ProjectWork(id, Projects.GetProjectById(projectid), Employees.GetEmployeeById(employeeid), ProjectRoles.GetRoleById(projectroleid), scheduleday); ProjectWorkList.Add(projectwork); return(projectwork); }
public void ChangeRole(int workid, int roleid) { ProjectWorkList.Find(item => item.ProjectWorkId == workid).Role = ProjectRoles.GetRoleById(roleid); }