public void LoadFromProject(MOG_Project project) { mProject = project; foreach (MOG_UserDepartment department in project.GetUserDepartments()) { AddDepartment(department.mDepartmentName); } foreach (ColumnHeader column in DepartmentList.Columns) { column.Width = DepartmentList.Width - 1; } }
private void PopulateDepartments() { if (mProject != null) { // Add all known user departments foreach (MOG_UserDepartment department in mProject.GetUserDepartments()) { if (!Departments.Items.Contains(department.mDepartmentName)) { Departments.Items.Add(department.mDepartmentName); } } Departments.SelectedIndex = 0; } }