Example #1
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="query"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="sortField"></param>
        /// <param name="callback"></param>
        public void Query(AuditRefundQueryVM query, int pageSize, int pageIndex, string sortField, Action <AuditRefundQueryResultVM> callback)
        {
            AuditRefundQueryFilter filter = query.ConvertVM <AuditRefundQueryVM, AuditRefundQueryFilter>();

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

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

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                AuditRefundQueryResultVM result = new AuditRefundQueryResultVM();
                result.ResultList = DynamicConverter <AuditRefundVM> .ConvertToVMList(args.Result.Rows);
                result.TotalCount = args.Result.TotalCount;

                callback(result);
            });
        }
Example #2
0
        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {
            var flag = ValidationManager.Validate(this.SeachBuilder);

            if (flag)
            {
                this.lastQueryVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <AuditRefundQueryVM>(queryVM);

                this.dgAuditRefundQueryResult.Bind();
            }
        }
Example #3
0
        public void ExportExcelFile(AuditRefundQueryVM queryVM, ColumnSet[] columnSet)
        {
            AuditRefundQueryFilter queryFilter = queryVM.ConvertVM <AuditRefundQueryVM, AuditRefundQueryFilter>();

            queryFilter.PagingInfo = new PagingInfo
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = null
            };
            queryFilter.CompanyCode = CPApplication.Current.CompanyCode;
            string relativeUrl = "/InvoiceService/SOIncomeRefund/Export";

            restClient.ExportFile(relativeUrl, queryFilter, columnSet);
        }
Example #4
0
 private void InitData()
 {
     queryVM = new AuditRefundQueryVM();
     SeachBuilder.DataContext = lastQueryVM = queryVM;
 }