private void btnAdd_Click(object sender, EventArgs e) { try { StoreProcedure.spd_update_mdHistoryByPatID(pat_id, md_id, cboMdStatus.SelectedItem.ToString(), txtMdDes.Text); this.Hide(); GlobalVariable._isMSB = true; } catch (Exception t) { GlobalMethod.HandleException("frm_Edit_Patient_Md / btnAdd_Click " + t.Message); } }
private void btnInactive_Click(object sender, EventArgs e) { string md_status, pat_id, md_id; pat_id = txtId.Text; md_id = dgvMd.CurrentRow.Cells["md_id"].Value.ToString(); if (dgvMd.CurrentRow.Cells["md_status"].Value.ToString() == "Inactive") { dgvMd.CurrentRow.Cells["md_status"].Value = "Active"; md_status = "Active"; } else { dgvMd.CurrentRow.Cells["md_status"].Value = "Inactive"; md_status = "Inactive"; } GlobalMethod.getGreenRed("md_status", dgvMd, "Inactive"); StoreProcedure.spd_update_mdHistoryByPatID(int.Parse(pat_id), int.Parse(md_id), md_status); }