示例#1
0
        public QueryResult GetAllBrandRequest(BrandRequestQueryFilter query)
        {
            int TotalCount;
            var datatable = ObjectFactory <IBrandRequestDA> .Instance.GetAllBrandRequest(query, out TotalCount);

            return(new QueryResult()
            {
                Data = datatable,
                TotalCount = TotalCount
            });
        }
示例#2
0
        /// <summary>
        ///根据query得到所有待审核的品牌信息
        /// </summary>
        /// <param name="query"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public DataTable GetAllBrandRequest(BrandRequestQueryFilter query, out int totalCount)
        {
            DataCommand cmd = DataCommandManager.GetDataCommand("GetAllBrandRequest");

            cmd.SetParameterValue("@PageSize", query.PagingInfo.PageSize);
            cmd.SetParameterValue("@PageCurrent", query.PagingInfo.PageIndex);
            cmd.SetParameterValue("@SortField", query.PagingInfo.SortBy);
            cmd.SetParameterValue("@Status", "O");
            DataTable dt = new DataTable();

            dt         = cmd.ExecuteDataTable();
            totalCount = (int)cmd.GetParameterValue("@TotalCount");
            return(dt);
        }
示例#3
0
        /// <summary>
        /// 获取待审核的所有品牌
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="SortField"></param>
        /// <param name="callback"></param>
        public void GetAllBrandRequest(int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            BrandRequestQueryFilter query = new BrandRequestQueryFilter()
            {
                PagingInfo = new PagingInfo()
                {
                    PageIndex = PageIndex,
                    PageSize  = PageSize,
                    SortBy    = SortField
                }
            };

            restClient.QueryDynamicData(GetAllBrandRequestUrl, query, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(obj, args);
            });
        }