private void BindDepartments() { ddlDepartments.DataSource = BLLStaff.GetAllDepartments(); ddlDepartments.DataTextField = "DepartmentName"; ddlDepartments.DataValueField = "DepartmentID"; ddlDepartments.DataBind(); }
private void BindDepartments() { List <Department> list = BLLStaff.GetAllDepartments(); gvDepartments.DataSource = list; gvDepartments.DataBind(); }