private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index) { try { if (this.pagePara == null) { return; } if (GlobalUtil.EngineUnconnectioned(this)) { return; } pagePara.PageIndex = index; EmRefundOrderPage listPage = GlobalCache.EMallServerProxy.GetEmRefundOrderPage(this.pagePara); this.BindingDataSource(listPage); } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
private void BindingDataSource(EmRefundOrderPage listPage) { if (listPage != null && listPage.ResultList != null && listPage.ResultList.Count > 0) { // this.dataGridView1.DataSource = listPage?.ResultList; } else { splitContainer1.Panel2Collapsed = true; // dataGridView1.DataSource = null; //清空下面的详情内容 } dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ResultList, null, listPage?.TotalEntityCount); }
private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } pagePara = new GetEmOrderPagePara() { OrderID = this.skinTextBoxOrderId.Text, StartDate = new Date(this.dateTimePicker_Start.Value), EndDate = new Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, MemberPhoneOrName = this.textBoxPhoneOrName.Text, CostumeIDOrName = this.skinTextBoxID.Text, OrderState = (EmRetailOrderState)(this.skinComboBoxOrderState.SelectedValue), RefundStatus = (RefundStatus)(this.skinComboBoxRefundState.SelectedValue), }; EmRefundOrderPage listPage = GlobalCache.EMallServerProxy.GetEmRefundOrderPage(this.pagePara); dataGridViewPagingSumCtrl.OrderPara = pagePara; this.dataGridViewPagingSumCtrl.Initialize(listPage); this.BindingDataSource(listPage); } catch (Exception ex) { GlobalUtil.ShowError(ex); } finally { GlobalUtil.UnLockPage(this); } }