0
我实现下面的方法来获得部门阵列结合DROPDOWNLIST插入对象
public object[] GetDepartmentOptions()
{
var departments = from p in context.per_Departments
where p.active == true
select new { DisplayText = p.departmentNameEn,
Value = p.departmentId };
return departments.ToArray();
}
我想将其绑定
object =new { DisplayText = "Choose", Value = 0 };
谢谢你的帮助 –