Пример #1
0
 public bool Exists(ProjectModel project)
 {
     return (DatabaseModelContainer.Current.ProjectSet.Any(x =>
                        x.Name.Equals(project.Name) &&
                        x.StartDate.Equals(project.StartDate) &&
                        x.EndDate == (project.EndDate) && x.Id != project.Id));
 }
Пример #2
0
 public void Edit(ProjectModel project)
 {
     var editableProject = DatabaseModelContainer.Current.ProjectSet.FirstOrDefault(x => x.Id == project.Id);
     editableProject.Name = project.Name;
     editableProject.StartDate = project.StartDate;
     editableProject.EndDate = project.EndDate;
 }
Пример #3
0
 public void Add(ProjectModel project)
 {
     DatabaseModelContainer.Current.ProjectSet.Add(project);
 }
 public static bool isDateValid(ProjectModel project)
 {
     return (project.EndDate == null || !(project.StartDate > project.EndDate));
 }