public void RemoveDepartment(string departmentName) { if (mProject != null) { ArrayList usingUsers = mProject.GetDepartmentUsers(departmentName); if (usingUsers != null && usingUsers.Count > 0) { MOG_Prompt.PromptMessage("Problem removing department", "This department cannot be removed because there are users still assigned to it."); } else { if (mProject.UserDepartmentRemove(departmentName)) { ListViewItem item = DepartmentList.FindItemWithText(departmentName); if (item != null) { DepartmentList.Items.Remove(item); } } } } }