コード例 #1
0
        /// <summary>
        /// 查询我的收藏视图
        /// </summary>
        /// <param name="customerID">客户编号</param>
        /// <returns>收藏视图</returns>
        public View_Collection_CustomerInfo Get(int customerID)
        {
            int totalPage = 0;
            List<View_Collection_CustomerInfo> result;

            var queryConditions = new CollectionCustomerInfoQueryConditions() { CustomerID = customerID };
            CollectionCustomerInfoFunction collectionCustomerInfoFunction = new CollectionCustomerInfoFunction();
            collectionCustomerInfoFunction.QueryCollectionsCustomerInfo(queryConditions, out result, out totalPage);

            return result.FirstOrDefault();
        }
コード例 #2
0
        //查询客户信息页面收藏视图
        public int QueryCollectionsCustomerInfo(CollectionCustomerInfoQueryConditions queryConditions, out List<View_Collection_CustomerInfo> result, out int totalPage)
        {
            using (var db = new HouseMarketEntities())
            {
                totalPage = 0;

                var entities = db.View_Collection_CustomerInfo;
                var query = SetQuery(entities, queryConditions, out totalPage);
                result = query.ToList();

                return 0;
            }
        }
コード例 #3
0
        /// <summary>
        /// 查询我的收藏视图
        /// </summary>
        /// <returns>收藏视图,总页数</returns>
        public IEnumerable<object> Get()
        {
            int totalPage = 0;
            List<View_Collection_CustomerInfo> result;

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

            CollectionCustomerInfoFunction collectionCustomerInfoFunction = new CollectionCustomerInfoFunction();
            collectionCustomerInfoFunction.QueryCollectionsCustomerInfo(queryConditions, out result, out totalPage);

            List<object> objectResult = new List<object>() { result, new { totalPage = totalPage } };
            return objectResult;
        }