private void cmdNew_Click(object sender, EventArgs e) { try { frm_themmoi_benh frm = new frm_themmoi_benh(); frm.m_dtDisease = m_dtDiease; frm.grdDiease = grdDiease; frm.em_Action = action.Insert; frm.ShowDialog(); ModifyCommand(); }catch (Exception exception) { ModifyCommand(); } }
private void cmdEdit_Click(object sender, EventArgs e) { try { if (v_Disease_Id <= -1) return; frm_themmoi_benh frm = new frm_themmoi_benh(); frm.m_dtDisease = m_dtDiease; frm.grdDiease = grdDiease; frm.em_Action = action.Update; frm.txtDiease_ID.Text = v_Disease_Id.ToString(); frm.ShowDialog(); ModifyCommand(); } catch (Exception) { ModifyCommand(); } }
private void cmdEdit_Click(object sender, EventArgs e) { try { if (v_Disease_Id <= -1) { return; } frm_themmoi_benh frm = new frm_themmoi_benh(); frm.m_dtDisease = m_dtDiease; frm.grdDiease = grdDiease; frm.em_Action = action.Update; frm.txtDiease_ID.Text = v_Disease_Id.ToString(); frm.ShowDialog(); ModifyCommand(); } catch (Exception) { ModifyCommand(); } }
private void cmdNew_Click(object sender, EventArgs e) { try { frm_themmoi_benh frm = new frm_themmoi_benh(); frm.m_dtDisease = m_dtDiease; frm.grdDiease = grdDiease; frm.em_Action = action.Insert; frm.ShowDialog(); ModifyCommand(); }catch(Exception exception) { ModifyCommand(); } }