private void btnNew_Click(object sender, EventArgs e) { frmWorkView frm = new frmWorkView(); if (frm.ShowDialog() == DialogResult.OK) { loadGrid(); } }
private void btnEdit_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colID)); if (id == 0) { return; } WorksModel model = (WorksModel)WorksBO.Instance.FindByPK(id); frmWorkView frm = new frmWorkView(); frm.Model = model; if (frm.ShowDialog() == DialogResult.OK) { loadGrid(); } }