Ejemplo n.º 1
0
        private HomeModel getHomeList(int accountId)
        {
            DbAccess   dbAccess = new DbAccess();
            SqlCommand cmd      = dbAccess.sqlCon.CreateCommand();

            try
            {
                HomeDao   dao      = new HomeDao();
                HomeModel homeList = dao.getHomeList(dbAccess, cmd, accountId);

                dbAccess.close();
                return(homeList);
            }
            catch (DbException)
            {
                dbAccess.close();
                throw;
            }
        }
Ejemplo n.º 2
0
        private List <HomeModel> getHomeList()
        {
            DbAccess   dbAccess = new DbAccess();
            SqlCommand cmd      = dbAccess.sqlCon.CreateCommand();

            try
            {
                HomeDao          dao      = new HomeDao();
                List <HomeModel> homeList = dao.getHomeList(dbAccess, cmd);

                dbAccess.close();
                return(homeList);
            }
            catch (DbException)
            {
                dbAccess.close();
                throw;
            }
        }