public void BindGridViewDataSourece() //异步获取部门列表数据并绑定 { // Modify by gatieme at 2015-08-26 14:12 //List<Department> list = new List<Department>(); List <SDepartment> sdepList = _sc.QuerySDepartment(); if (sdepList != null) { List <Department> depList = new List <Department>(); List <MDepartment> mdepList = new List <MDepartment>(); // //SDepartment department = null; foreach (SDepartment department in sdepList) { depList.Add(department.ToDepartment()); mdepList.Add(department.ToMDepartment()); } UserHelper.DepList = depList; UserHelper.SDepList = sdepList; UserHelper.MDepList = mdepList; this.dataGridView1.DataSource = mdepList; this.SelectedDepartment.ValueMember = "Id"; this.SelectedDepartment.DisplayMember = "Name"; this.SelectedDepartment.DataSource = depList; } }