示例#1
0
        /// <summary>
        /// 查询房屋
        /// </summary>
        /// <returns>房屋视图,总页数</returns>
        public IEnumerable<object> Get()
        {
            int totalPage = 0;
            List<View_HouseAddress> result = new List<View_HouseAddress>();

            var queryString = Request.GetQueryNameValuePairs();
            var queryConditions = new HouseQueryConditions();
            queryConditions.GetValues(queryString);

            HouseFunction houseFunction = new HouseFunction();
            houseFunction.QueryHouses(queryConditions, out result, out totalPage);

            List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } };
            return objectResult;
        }
示例#2
0
        /// <summary>
        /// 查询单个房屋
        /// </summary>
        /// <param name="houseID">房屋编号</param>
        /// <returns>房屋视图</returns>
        public View_HouseAddress Get(int houseID)
        {
            int totalPage = 0;
            List<View_HouseAddress> result = new List<View_HouseAddress>();

            HouseQueryConditions queryConditions = new HouseQueryConditions() { HouseID = houseID };
            HouseFunction houseFunction = new HouseFunction();
            houseFunction.QueryHouses(queryConditions, out result, out totalPage);

            return result.FirstOrDefault();
        }