private void btnAdd_Click(object sender, EventArgs e) { try { frmCustomerTypeAdd frm = new frmCustomerTypeAdd(0); LBShowForm.ShowDialog(frm); LoadDataSource(); } catch (Exception ex) { LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex); } }
private void ShowEdit() { if (this.grdMain.SelectedCells.Count == 0) { LB.WinFunction.LBCommonHelper.ShowCommonMessage("请选择需要编辑的行!"); return; } long lCustomerTypeID = LBConverter.ToInt64(this.grdMain.Rows[this.grdMain.SelectedCells[0].RowIndex].Cells["CustomerTypeID"].Value); frmCustomerTypeAdd frm = new frmCustomerTypeAdd(lCustomerTypeID); LBShowForm.ShowDialog(frm); LoadDataSource(); }