private void btnCreateKnife_Click(object sender, EventArgs e) { frmAddEditKnife frm = new frmAddEditKnife(cGlobalVariables.Add); if (frm.ShowDialog() == DialogResult.OK) { cbShowUnavailable_CheckedChanged(null, null); } }
private void btnEditKnife_Click(object sender, EventArgs e) { int id = TextUtils.ToInt(gvKnife.GetFocusedRowCellValue(colID)); if (id == 0) { return; } prevRow = gvKnife.GetSelectedRows()[0]; KnifeDetailListModel model = (KnifeDetailListModel)KnifeDetailListBO.Instance.FindByPK(id); frmAddEditKnife frm = new frmAddEditKnife(cGlobalVariables.Edit); frm.knifeDetailListModel = model; if (frm.ShowDialog() == DialogResult.OK) { cbShowUnavailable_CheckedChanged(null, null); gvKnife.FocusedRowHandle = prevRow; } }