コード例 #1
0
ファイル: ARWindowFacade.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 查询跟踪单责任人列表
        /// </summary>
        /// <param name="query"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="sortField"></param>
        /// <param name="callback"></param>
        public void QueryResponsibleUser(ResponsibleUserQueryVM query, int pageSize, int pageIndex, string sortField, Action <ResponsibleUserQueryResultVM> callback)
        {
            ResponsibleUserQueryFilter filter = query.ConvertVM <ResponsibleUserQueryVM, ResponsibleUserQueryFilter>();

            filter.PagingInfo = new PagingInfo()
            {
                PageIndex = pageIndex,
                PageSize  = pageSize,
                SortBy    = sortField
            };

            string relativeUrl = "/InvoiceService/ResponsibleUser/Query";

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                ResponsibleUserQueryResultVM result = new ResponsibleUserQueryResultVM();
                result.ResultList = DynamicConverter <ResponsibleUserVM> .ConvertToVMList(args.Result.Rows);
                result.TotalCount = args.Result.TotalCount;
                callback(result);
            });
        }
コード例 #2
0
ファイル: ARWindowFacade.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 导出跟踪单责任人
        /// </summary>
        /// <param name="queryVM"></param>
        /// <param name="columnSet"></param>
        public void ExportResponsibleUserExcelFile(ResponsibleUserQueryVM queryVM, ColumnSet[] columnSet)
        {
            ResponsibleUserQueryFilter queryFilter = queryVM.ConvertVM <ResponsibleUserQueryVM, ResponsibleUserQueryFilter>();

            queryFilter.PagingInfo = new PagingInfo
            {
                PageSize  = ECCentral.Portal.Basic.ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = "sr.SysNo desc"
            };
            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InvoiceService/ResponsibleUser/Query";

            restClient.ExportFile(relativeUrl, queryFilter, columnSet);
        }