private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (this.pagePara == null) { return; } this.pagePara.PageIndex = index; OutboundOrderPage listPage = CommonGlobalCache.ServerProxy.GetOutboundOrderPage(this.pagePara); this.BindingOutboundOrderSource(listPage); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
private void BindingOutboundOrderSource(OutboundOrderPage listPage) { if (listPage != null && listPage.OutboundOrderList != null && listPage.OutboundOrderList.Count > 0) { //将名称赋值,用于显示 foreach (OutboundOrder order in listPage.OutboundOrderList) { order.GuideName = CommonGlobalCache.GetUserName(order.OperatorUserID); order.SourceShopName = CommonGlobalCache.GetShopName(order.ShopID); } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.OutboundOrderList, null, listPage?.TotalEntityCount, listPage?.OutboundOrderSum); this.skinSplitContainer1.Panel2Collapsed = true; }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } string orderID = string.IsNullOrEmpty(this.skinTextBox_OrderID.SkinTxt.Text) ? null : this.skinTextBox_OrderID.SkinTxt.Text; string costumeID = string.IsNullOrEmpty(this.CostumeCurrentShopTextBox1.SkinTxt.Text) ? null : this.CostumeCurrentShopTextBox1.SkinTxt.Text; this.pagePara = new OutboundOrderPagePara() { OrderID = orderID, CostumeID = costumeID, IsOpenDate = true, StartDate = new CJBasic.Date(this.dateTimePicker_Start.Value), EndDate = new CJBasic.Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, ShopID = IsPos ? CommonGlobalCache.CurrentShopID : null }; OutboundOrderPage listPage = CommonGlobalCache.ServerProxy.GetOutboundOrderPage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingOutboundOrderSource(listPage); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }