public int Update(List <COMPANIES_RMAGDC> objCOMPANIES_RMAGs) { int updatedCount = 0; DBConnection objConnection = new DBConnection(); COMPANIES_RMAGDA objCOMPANIES_RMAGDA = new COMPANIES_RMAGDA(); try { objConnection.Open(true); updatedCount = objCOMPANIES_RMAGDA.Update(objConnection, objCOMPANIES_RMAGs); IsDirty = objCOMPANIES_RMAGDA.IsDirty; if (IsDirty) { objConnection.Rollback(); } else { objConnection.Commit(); } } catch (Exception ex) { objConnection.Rollback(); throw ex; } finally { objConnection.Close(); } return(updatedCount); }
public List <COMPANIEDC> GetCompaniesByRmagsAndInvitedCompanies(String Rmags, int EventId) { DBConnection objConnection = new DBConnection(); COMPANIES_RMAGDA objCOMPANIES_RMAGDA = new COMPANIES_RMAGDA(); List <COMPANIEDC> objCOMPANIEDC = null; try { objConnection.Open(false); objCOMPANIEDC = objCOMPANIES_RMAGDA.GetCompaniesByRmagsAndInvitedCompanies(Rmags, EventId, objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objCOMPANIEDC); }
public COMPANIES_RMAGDC LoadByPrimaryKey(int COMPANY_RMAG_ID) { DBConnection objConnection = new DBConnection(); COMPANIES_RMAGDA objCOMPANIES_RMAGDA = new COMPANIES_RMAGDA(); COMPANIES_RMAGDC objCOMPANIES_RMAGDC = null; try { objConnection.Open(false); objCOMPANIES_RMAGDC = objCOMPANIES_RMAGDA.LoadByPrimaryKey(objConnection, COMPANY_RMAG_ID); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objCOMPANIES_RMAGDC); }
public List <COMPANIES_RMAGDC> LoadAll() { DBConnection objConnection = new DBConnection(); COMPANIES_RMAGDA objCOMPANIES_RMAGDA = new COMPANIES_RMAGDA(); List <COMPANIES_RMAGDC> objCOMPANIES_RMAGDC = null; try { objConnection.Open(false); objCOMPANIES_RMAGDC = objCOMPANIES_RMAGDA.LoadAll(objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objCOMPANIES_RMAGDC); }
public int Insert(List <COMPANIES_RMAGDC> objCOMPANIES_RMAGs) { int insertedCount = 0; DBConnection objConnection = new DBConnection(); COMPANIES_RMAGDA objCOMPANIES_RMAGDA = new COMPANIES_RMAGDA(); try { objConnection.Open(true); insertedCount = objCOMPANIES_RMAGDA.Insert(objConnection, objCOMPANIES_RMAGs); objConnection.Commit(); } catch (Exception ex) { objConnection.Rollback(); throw ex; } finally { objConnection.Close(); } return(insertedCount); }