public SelectDepartmentViewModel(List <string> list) { foreach (string s in list) { DepartmentsName.Add(s); } }
static void CreateDepartments(string[] peopleList) { for (var i = 0; i < peopleList.Length; i++) { var peopleInfo = peopleList[i].Split(';'); if (!DepartmentsName.Contains(peopleInfo[1])) { Departments.Add(new Department(peopleInfo[1])); DepartmentsName.Add(peopleInfo[1]); } } }