private void save_data() { US_GD_QUYET_DINH v_us_gd_qd = new US_GD_QUYET_DINH(); form_2_us_gd_qd(v_us_gd_qd); switch (m_e_form_mode) { case DataEntryFormMode.InsertDataState: v_us_gd_qd.BeginTransaction(); v_us_gd_qd.Insert(); v_us_gd_qd.CommitTransaction(); break; case DataEntryFormMode.UpdateDataState: v_us_gd_qd.BeginTransaction(); v_us_gd_qd.Update(); v_us_gd_qd.CommitTransaction(); break; default: break; } }
private void save_data() { US_GD_QUYET_DINH v_us_gd_qd = new US_GD_QUYET_DINH(); form_2_us_gd_qd(v_us_gd_qd); try { switch (m_e_form_mode) { case DataEntryFormMode.InsertDataState: v_us_gd_qd.BeginTransaction(); v_us_gd_qd.Insert(); v_us_gd_qd.CommitTransaction(); break; case DataEntryFormMode.UpdateDataState: v_us_gd_qd.dcID = CIPConvert.ToDecimal(m_grv_quyet_dinh.GetRowCellValue(m_grv_quyet_dinh.FocusedRowHandle, "ID")); v_us_gd_qd.BeginTransaction(); v_us_gd_qd.Update(); v_us_gd_qd.CommitTransaction(); break; default: break; } } catch (Exception v_e) { throw v_e; } }