private void btnNew_Click(object sender, EventArgs e) { frmWorkingDetailH frm = new frmWorkingDetailH(); frm.GroupID = TextUtils.ToInt(cboGroup.EditValue); frm.StepID = TextUtils.ToInt(grvData.GetFocusedRowCellValue(colStepID)); if (frm.ShowDialog() == DialogResult.OK) { loadWorking(); } }
private void btnEdit_Click(object sender, EventArgs e) { try { int id = TextUtils.ToInt(grvDetail.GetFocusedRowCellValue(colWorkingID)); if (id == 0) { return; } WorkingModel model = (WorkingModel)WorkingBO.Instance.GetObjectByID(id); frmWorkingDetailH frm = new frmWorkingDetailH(); frm.WorkingModel = model; if (frm.ShowDialog() == DialogResult.OK) { loadWorking(); } } catch (Exception) { } }