public void SelectEmp() { if (this.editStatus) { FrmSelectEmp frm = new FrmSelectEmp(); frm.SetDataSource(this.EmpList, this.gcEmp.DataSource as List <DataEmpDir>); if (frm.ShowDialog() == DialogResult.OK) { List <DataEmpDir> new_selected = frm.EmpSelected; gcEmp.DataSource = new_selected; } frm.Dispose(); } }
private void selectEmp() { if (this.empList == null) { this.empList = CommonDataHelper.GetEmpAll(); } FrmSelectEmp frm = new FrmSelectEmp(); frm.SetDataSource(this.empList, this.gcEmp.DataSource as List <DataEmpDir>); if (frm.ShowDialog() == DialogResult.OK) { List <DataEmpDir> new_selected = frm.EmpSelected; gcEmp.DataSource = new_selected; } frm.Dispose(); }