//get all departments public void FillComboxDepartments() { List <DepartmentUser> departments = DepartmentRequest.GetAllDepartments(); cmbx_department.DisplayMember = "Department"; cmbx_department.Items.AddRange((departments.ToArray())); }
private void GetDepartment() { List <DepartmentUser> departments = DepartmentRequest.GetAllDepartments(); if (departments != null) { cmb_department.Items.AddRange(departments.Select(p => new RadListDataItem() { Tag = p, Text = p.Department })); } }