//绑定数据到下方界面 根据选中选中选项卡取得数据 private void SetTradeDetailMessage(Alading.Entity.Trade trade) { if (trade == null) { return; } switch (tabsDetailMessage.SelectedTabPageIndex) { case 0: LoadPrintPreview(trade); break; case 1: break; case 2: //调用存储过程获得数据 gcOrdersDetail.DataSource = TradeOrderService.GetView_TradeDetailItemsDataSet(trade.CustomTid).Tables[0]; break; case 3: detailGCFlowMessage.DataSource = TradeInfoService.GetTradeInfo(p => p.CustomTid == trade.CustomTid); break; } }
//绑定数据到下方界面 根据选中选中选项卡取得数据 private void SetTradeDetailMessage(Alading.Entity.Trade trade) { if (trade == null) { gcOrdersDetail.DataSource = null; detailGCFlowMessage.DataSource = null; return; } switch (tabsDetail.SelectedTabPageIndex) { case 0: gcOrdersDetail.DataSource = TradeOrderService.GetView_TradeDetailItemsDataSet(_focusedTrade.CustomTid).Tables[0]; break; case 1: detailGCFlowMessage.DataSource = TradeInfoService.GetTradeInfo(p => p.CustomTid == trade.CustomTid); break; } }
//根据选中Tab来设定界面值 动态加载 private void SetTradeDetailMessages(DataRow currentRow) { try { //发票显示 detailTicketMessage.PageVisible = Convert.ToBoolean(currentRow["HasInvoice"].ToString()); string customTid = currentRow["CustomTid"].ToString(); switch (tabsTradeDetail.SelectedTabPageIndex) { /*收货信息填写*/ case 0: ReceiverGoodsDetail(customTid); break; /*买家信息填写*/ case 1: BuyerInforDetail(customTid); break; /*TODO 绑定Trade的流水信息到处理流程Tab 暂时TradeInfo里面没数据*/ case 2: detailGCFlowMessage.DataSource = TradeInfoService.GetTradeInfo(p => p.CustomTid == customTid); break; case 3: break; case 4: break; case 5: gcAssembleDetail.DataSource = View_TradeAssembleStockService.GetViewTradeAssembleDataSet(_currentOrderRow["TradeOrderCode"].ToString()).Tables[0]; break; } } catch (System.Exception ex) { throw ex; } }