private void dm_grid2us_object(US_GD_DE_XUAT i_us , int i_grid_row) { DataRow v_dr; v_dr = (DataRow)m_grv_de_xuat.Rows[i_grid_row].UserData; m_obj_trans.GridRow2DataRow(i_grid_row, v_dr); i_us.DataRow2Me(v_dr); }
private void delete_v_gd_de_xuat_vpp() { if (!CGridUtils.IsThere_Any_NonFixed_Row(m_grv_de_xuat)) return; if (!CGridUtils.isValid_NonFixed_RowIndex(m_grv_de_xuat, m_grv_de_xuat.Row)) return; if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted) return; US_GD_DE_XUAT v_us = new US_GD_DE_XUAT(); dm_grid2us_object(v_us, m_grv_de_xuat.Row); try { v_us.BeginTransaction(); v_us.Delete(); v_us.CommitTransaction(); m_grv_de_xuat.Rows.Remove(m_grv_de_xuat.Row); } catch (Exception v_e) { v_us.Rollback(); CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e, new CDBClientDBExceptionInterpret()); v_objErrHandler.showErrorMessage(); } }