private void btnBatchBind_Click(object sender, EventArgs e) { var dlg = new ImportWizardDlg(new List <Tuple <string, CellType, bool> >() { ImportWizardDlg.MakeColumn("姓名", CellType.Text, true), ImportWizardDlg.MakeColumn("手机", CellType.Text, true), ImportWizardDlg.MakeColumn("客户经理", CellType.Text, true) }); dlg.StartPosition = FormStartPosition.CenterParent; dlg.RunSingle += (index, gridView) => { var d = new Dictionary <string, object>(); d["realName"] = gridView.Rows[index].Cells[0].Value; d["mobile"] = gridView.Rows[index].Cells[1].Value; d["u-name"] = gridView.Rows[index].Cells[2].Value; return(CrmInvestor.BatchBindMgrAndCrmInvestor(d).Result); }; if (dlg.ShowDialog(this) == DialogResult.Cancel) { UpdateTable1(); } }