Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }