private void PageControlPanel21_CurrentPageIndexChanged(int index) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (this.pagePara == null) { return; } this.pagePara.PageIndex = index; RefundListPage listPage = CommonGlobalCache.ServerProxy.GetRefundListPage(this.pagePara); this.BindingRefundOrderDataSource(listPage); this.BindingRefundDetailDataSource(null); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } string memberID = string.IsNullOrEmpty(this.skinTextBox_MemberID.SkinTxt.Text) ? null : this.skinTextBox_MemberID.SkinTxt.Text; 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; Date startDate = null; Date endDate = null; if (this.skinCheckBox1.CheckState == CheckState.Checked) { startDate = new Date(this.dateTimePicker_Start.Value); endDate = new Date(this.dateTimePicker_End.Value); } this.pagePara = new Core.InteractEntity.RefundListPagePara() { CostumeID = costumeID, RefundOrderID = orderID, MemberID = memberID, StartDate = startDate, EndDate = endDate, PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, ShopID = GlobalCache.CurrentShopID }; RefundListPage listPage = GlobalCache.ServerProxy.GetRefundListPage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingRefundOrderDataSource(listPage); #region 清空dataGridView_RetailDetail的绑定源 this.BindingRefundDetailDataSource(null); #endregion } catch (Exception ee) { GlobalUtil.WriteLog(ee); GlobalMessageBox.Show("查询失败!"); } finally { GlobalUtil.UnLockPage(this); } }
/// <summary> /// 绑定RefundOrder数据源 /// </summary> private void BindingRefundOrderDataSource(RefundListPage listPage) { if (listPage != null) { this.refundOrderList = listPage.ResultList; if (this.refundOrderList != null && this.refundOrderList.Count > 0) { foreach (RetailOrder refundOrder in this.refundOrderList) { refundOrder.GuideName = GlobalCache.GetUserName(refundOrder.GuideID); refundOrder.ShopName = GlobalCache.GetShopName(refundOrder.ShopID); } } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ResultList, null, listPage?.TotalEntityCount, listPage?.RetailOrderSum); this.dataGridView_RefundOrder.Refresh(); this.dataGridView_RefundDetail.Visible = false; }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } RefundListPage listPage = CommonGlobalCache.ServerProxy.GetRefundListPage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingRefundOrderDataSource(listPage); } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
/// <summary> /// 绑定RefundOrder数据源 /// </summary> private void BindingRefundOrderDataSource(RefundListPage listPage) { this.skinSplitContainer1.Panel2Collapsed = true; dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ResultList, null, listPage?.TotalEntityCount); }