public int CheckCompanyAssociation(int CompanyID) { DBConnection objConnection = new DBConnection(); USERS_COMPANIEDA objUSERS_COMPANIEDA = new USERS_COMPANIEDA(); int rowCount = 0; try { objConnection.Open(false); rowCount = objUSERS_COMPANIEDA.CheckCompanyAssociation(CompanyID, objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(rowCount); }
public List <USERS_COMPANIEDC> LoadAll() { DBConnection objConnection = new DBConnection(); USERS_COMPANIEDA objUSERS_COMPANIEDA = new USERS_COMPANIEDA(); List <USERS_COMPANIEDC> objUSERS_COMPANIEDC = null; try { objConnection.Open(false); objUSERS_COMPANIEDC = objUSERS_COMPANIEDA.LoadAll(objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objUSERS_COMPANIEDC); }
public USERS_COMPANIEDC LoadByUserID(int USER_ID, string accessType) { DBConnection objConnection = new DBConnection(); USERS_COMPANIEDA objUSERS_COMPANIEDA = new USERS_COMPANIEDA(); USERS_COMPANIEDC objUSERS_COMPANIEDC = null; try { objConnection.Open(false); objUSERS_COMPANIEDC = objUSERS_COMPANIEDA.LoadByUserID(USER_ID, accessType, objConnection); } catch (Exception ex) { throw ex; } finally { objConnection.Close(); } return(objUSERS_COMPANIEDC); }
public int Insert(List <USERS_COMPANIEDC> objUSERS_COMPANIEs) { int insertedCount = 0; DBConnection objConnection = new DBConnection(); USERS_COMPANIEDA objUSERS_COMPANIEDA = new USERS_COMPANIEDA(); try { objConnection.Open(true); insertedCount = objUSERS_COMPANIEDA.Insert(objConnection, objUSERS_COMPANIEs); objConnection.Commit(); } catch (Exception ex) { objConnection.Rollback(); throw ex; } finally { objConnection.Close(); } return(insertedCount); }