private void txtDepCode_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { FrmBaseList fList = new FrmBaseList(1); if (DialogResult.OK == fList.ShowDialog()) { txtDepCode.Text = fList.sID; txtDepName.Text = fList.sText; } }
private void ItemButtonEditDep_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { try { int iRow = 0; if (gridView1.RowCount > 0) { iRow = gridView1.FocusedRowHandle; } FrmBaseList fList = new FrmBaseList(1); fList.Text = "部门信息"; if (fList.ShowDialog() == DialogResult.OK) { gridView1.SetRowCellValue(iRow, gridColcDepCode, fList.sID); gridView1.SetRowCellValue(iRow, gridColcDepName, fList.sText); } } catch (Exception ee) { MessageBox.Show(ee.Message); } }