//Detalji private void ProjectMenuDetailsButton_Click(object sender, EventArgs e) { var Projects = new List <Projects>(); foreach (var ProjectProperty in ProjectHistroylistBox.CheckedItems) { Projects.Add(ProjectList.GetProjectByName(ProjectProperty.ToString().GetProjectNameInCheck())); } if (Projects.Count == 0) { return; } var projectDetails = new ProjectsDetail(Projects); projectDetails.ShowDialog(); }
private bool RemoveUncheckedProjects() { foreach (var ProjectProperty in EmployeePositioncheckedListBox.Items) { if (EmployeePositioncheckedListBox.CheckedItems.Contains(ProjectProperty)) { continue; } if (!EmployeesOnProject.IsEmployeeOnProject(OldOIB, ProjectProperty.ToString().GetProjectNameInCheck())) { continue; } if (EmployeesOnProject.TryRemove(EmployeesOnProject.GetRelation(OldOIB, ProjectProperty.ToString().GetProjectNameInCheck()))) { continue; } EmployeeDeleteError LastEmp = new EmployeeDeleteError(); LastEmp.ShowDialog(); return(false); } return(true); }
public static Property FindProperty(this Project project, ProjectProperty projectProperty) { return(project.Properties.Cast <Property>().Where(property => property.Name == projectProperty.ToString()).Single()); }
public static Property FindProperty(this Project project,ProjectProperty projectProperty) { return project.Properties.Cast<Property>().Where(property => property.Name == projectProperty.ToString()).Single(); }