Exemplo n.º 1
0
        public Projects CreateProject(int id, string projectname, DateTimeOffset startdate, DateTimeOffset enddate, int statusid)
        {
            ProjectStatus.CreateProjectStatus();
            if (enddate < DateTimeOffset.Now)
            {
                Console.WriteLine("incorrect end date");
                return(null);
            }
            if (enddate < startdate)
            {
                Console.WriteLine("incorrect end date");
                return(null);
            }
            Projects project = new Projects(id, projectname, startdate, enddate, ProjectStatus.GetProjectStatusById(statusid));

            ProjectList.Add(project);
            return(project);
        }
Exemplo n.º 2
0
 public void ChangeProjectStatus(int projectid, int statusid)
 {
     ProjectList.Find(item => item.ProjectId == projectid).Status = ProjectStatus.GetProjectStatusById(statusid);
 }