private void pgBar_PageChanging(object sender, PageBar.PageChangeEventArgs e)
        {
            var data = this.deliveryInService.GetByAll(e.GetParameter <string>("deliveryCompany"), e.GetParameter <string>("deliveryNumber"),
                                                       e.GetParameter <DateTime>("startTime"), e.GetParameter <DateTime>("endTime"), e.CurrentPage - 1,
                                                       e.PageSize);

            this.pgBar.Total          = data.Total;
            this.pgBar.CurrentCount   = data.Datas.Count;
            this.dgvItems.ItemsSource = data.Datas;
        }
Example #2
0
        private void PageBarUserControl_PageChanging(object sender, PageBar.PageChangeEventArgs e)
        {
            var vendors = this.vendorService.GetByAll(e.GetParameter <string>("name"), e.GetParameter <string>("pingyingName"), "", e.GetParameter <string>("marketAddress"), e.CurrentPage - 1, e.PageSize);

            this.dgvVendors.ItemsSource = vendors.Datas;
            this.pbBar.Total            = vendors.Total;
            this.pbBar.CurrentCount     = vendors.Datas.Count;
        }
        private void pbBar_PageChanging(object sender, PageBar.PageChangeEventArgs e)
        {
            var ret = ServiceContainer.GetService <OrderReturnService>().GetByAll(e.GetParameter <int>("Id"),
                                                                                  e.GetParameter <long>("OrderId"), e.GetParameter <string>("Vendor"), e.GetParameter <string>("Number"),
                                                                                  e.GetParameter <string>("DeliveryNumber"), e.GetParameter <OrderReturnState>("State"),
                                                                                  e.GetParameter <OrderReturnType>("Type"), e.GetParameter <int>("TimeType"),
                                                                                  e.GetParameter <DateTime>("Start"), e.GetParameter <DateTime>("End"), e.CurrentPage - 1, e.PageSize);
            OrderService os = ServiceContainer.GetService <OrderService>();
            List <OrderReturnViewModel> vms = new List <OrderReturnViewModel>();

            foreach (var item in ret.Datas)
            {
                OrderReturnViewModel vm = new OrderReturnViewModel(item);
                vm.Order      = ServiceContainer.GetService <OrderService>().GetById(item.OrderId);
                vm.OrderGoods = vm.Order == null || vm.Order.OrderGoodss == null ? null : vm.Order.OrderGoodss.FirstOrDefault(obj => obj.Id == item.OrderGoodsId);
                vms.Add(vm);
            }
            this.lstOrderReturns.ItemsSource = vms.ToArray();
            this.pbBar.Total        = ret.Total;
            this.pbBar.CurrentCount = ret.Datas.Count;
            this.pbBar.TitleMessage = "当前页退货金额:" + ret.Datas.Select(obj => obj.GoodsMoney).Sum();
        }
Example #4
0
 private void pb1_PageChanging(object sender, PageBar.PageChangeEventArgs e)
 {
     try
     {
         var datas = ServiceContainer.GetService <ReturnCashService>().GetByAll(e.GetParameter <long>("ShopId"),
                                                                                e.GetParameter <string>("PopOrderId"), e.GetParameter <string>("Type"), "",
                                                                                e.GetParameter <int>("TimeType"), e.GetParameter <DateTime>("StartTime"),
                                                                                e.GetParameter <DateTime>("EndTime"),
                                                                                e.GetParameter <ReturnCashState>("State"), e.CurrentPage - 1, e.PageSize);
         this.pb1.Total            = datas.Total;
         this.dgvItems.ItemsSource = datas.Datas;
         double m = datas.Datas.Select(obj => obj.Money).Sum();
         this.pb1.TitleMessage = "当前页金额:" + datas.Datas.Select(obj => obj.Money).Sum().ToString("F0");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #5
0
 private void pb1_PageChanging(object sender, PageBar.PageChangeEventArgs e)
 {
     try
     {
         var data = ServiceContainer.GetService <GoodsService>().GetByAll(e.GetParameter <long>("ShopId"),
                                                                          e.GetParameter <GoodsState>("State"),
                                                                          e.GetParameter <int>("TimeType"),
                                                                          e.GetParameter <DateTime>("Start"),
                                                                          e.GetParameter <DateTime>("End"),
                                                                          e.GetParameter <string>("Vendor"),
                                                                          e.GetParameter <string>("Number"),
                                                                          e.GetParameter <GoodsType>("Type"),
                                                                          e.GetParameter <string>("Comment"),
                                                                          e.GetParameter <ColorFlag>("Flag"),
                                                                          e.GetParameter <GoodsVideoType>("VideoType"),
                                                                          e.GetParameter <string>("Order"),
                                                                          e.GetParameter <string>("VendorAdd"),
                                                                          e.GetParameter <string>("Shipper"),
                                                                          e.CurrentPage - 1,
                                                                          e.PageSize);
         this.pb1.Total        = data.Total;
         this.pb1.CurrentCount = data.Datas.Count;
         this.models.Clear();
         this.models.AddRange(data.Datas.Select(obj => new GoodsViewModel(obj)));
         this.dgvGoods.ItemsSource = null;
         this.dgvGoods.ItemsSource = this.models;
         this.lstGoods.ItemsSource = null;
         this.lstGoods.ItemsSource = this.models;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }