private void butLuu_Click(object sender, EventArgs e) { try { if (txtTen.Text.Trim() == "") { MessageBox.Show(this, lan.Change_language_MessageText("Nhập loại bệnh nhân !"), m_v.s_AppName, MessageBoxButtons.OK, MessageBoxIcon.Information); txtTen.Focus(); return; } if (m_id == "") { if (txtID.Text != "") { m_id = txtID.Text.Trim(); } else { m_id = m_v.get_id_v_loaibn.ToString(); } } else { if (m_id != txtID.Text.Trim()) { if (m_v.dadung_v_loaibn(m_id) == -1) { MessageBox.Show(this, lan.Change_language_MessageText("Hệ thống không cho sữa nội dung này!") + "\n" + lan.Change_language_MessageText("Liên hệ quản trị hệ thống để được trợ giúp!"), m_v.s_AppName, MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } } } m_v.upd_v_loaibn(decimal.Parse(m_id), txtTen.Text, chkReadonly.Checked ? 1 : 0, int.Parse(NumStt.Value.ToString())); f_Enable(false); f_Load_DG(); butMoi.Focus(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }