private void btnAdd_Click(object sender, EventArgs e) { try { frmDescriptionAdd frm = new frmDescriptionAdd(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 lDescriptionID = LBConverter.ToInt64(this.grdMain.Rows[this.grdMain.SelectedCells[0].RowIndex].Cells["DescriptionID"].Value); frmDescriptionAdd frm = new frmDescriptionAdd(lDescriptionID); LBShowForm.ShowDialog(frm); LoadDataSource(); }