예제 #1
0
 private void IniPageData()
 {
     QueryVM     = new ResSalesCouponUsedReportQueryVM();
     facade      = new CouponUsedReportFacade(this);
     ResultModel = new SalesCouponUsedReportQueryView();
     gridQueryBuilder.DataContext = QueryVM;
     dgdResult.DataContext        = ResultModel;
 }
예제 #2
0
        public void ExportCouponUsedReport(ResSalesCouponUsedReportQueryVM queryVM, ColumnSet[] columnSet)
        {
            var filter = queryVM.ConvertVM <ResSalesCouponUsedReportQueryVM, CouponUsedReportFilter>();

            filter.PagingInfo = new PagingInfo()
            {
                PageIndex = 0,
                PageSize  = ECCentral.Portal.Basic.ConstValue.MaxRowCountLimit,
                SortBy    = null
            };

            const string relativeUrl = "/InvoiceService/CouponUseedReport/Export";

            restClient.ExportFile(relativeUrl, filter, columnSet);
        }
예제 #3
0
        public void QueryCouponUsedReport(ResSalesCouponUsedReportQueryVM queryVM,
                                          int pageSize,
                                          int pageIndex,
                                          string sortField,
                                          Action <SalesCouponUsedReportQueryView> callback)
        {
            var filter = queryVM.ConvertVM <ResSalesCouponUsedReportQueryVM, CouponUsedReportFilter>();

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

            const string relativeUrl = "/InvoiceService/CouponUseedReport/Query";

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                var result = new SalesCouponUsedReportQueryView();
                if (args.Result[0] != null && args.Result[0].Rows != null)
                {
                    result.Result     = DynamicConverter <SalesCouponUsedReportDataVM> .ConvertToVMList(args.Result[0].Rows);
                    result.TotalCount = args.Result[0].TotalCount;


                    //result.TxtAllStatisticInfo = "总  计:--优惠券折扣金额:¥" + args.Result[1].Rows[0]["TotalAmount"].ToString("#0.00");
                    //result.TxtCurrentPageStatisticInfo = "本页小计:--优惠券折扣金额:¥" + args.Result[1].Rows[0]["CurrentPageAmount"].ToString("#0.00");
                }
                if (args.Result[1] != null && args.Result[1].Rows != null)
                {
                    result.Staticsticinfo = DynamicConverter <StaticsticInfo> .ConvertToVMList(args.Result[1].Rows);
                }
                if (result.Staticsticinfo == null)
                {
                    result.Staticsticinfo = DynamicConverter <StaticsticInfo> .ConvertToVMList(args.Result[0].Rows);
                }
                callback(result);
            });
        }