diff --git a/插件库/Lskj.PubBill/BillModule.cs b/插件库/Lskj.PubBill/BillModule.cs index f54803e..9a1c2e5 100644 --- a/插件库/Lskj.PubBill/BillModule.cs +++ b/插件库/Lskj.PubBill/BillModule.cs @@ -982,26 +982,7 @@ namespace Lskj.PubBill } } } - foreach (XtraTabPage xtraTabPage in this.tb_buttom.TabControlObj.TabPages) - { - if (xtraTabPage.Tag != null && (xtraTabPage.Tag != null && xtraTabPage.Tag is System.Windows.Forms.Control pageControl) && pageControl.Tag != null) - { - if (pageControl.Tag is GridDetailModel detailModel && (detailModel.Orderid + "").Equals("-9999")) - { - this.tb_buttom.TabControlObj.SelectedTabPage = xtraTabPage; - if (xtraTabPage.Tag is GridControlEx) - { - GridControlEx gridControl = xtraTabPage.Tag as GridControlEx; - GridDetailModel Detailmodel = gridControl.Tag as GridDetailModel; - Detailmodel.DetailSql=this.ControlObj.ReplaceControlValue(Detailmodel.DetailSql); - gridControl.SetGridViewDataSource(MainImpl.GetDataTableResult(Detailmodel.DetailSql)); - } - - - break; - } - } - } + CommonMenu menu = new CommonMenu(this.SysModel, this.ControlObj, this.gcMain); menu.ApplyBefore += new CommonToolApplyEventHandler(OnMenuApplyBefore); menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter); @@ -1011,6 +992,7 @@ namespace Lskj.PubBill string billNo = this.lblOrderNo.Text.Trim(); this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}'", BillModel.MasterTable, BillModel.PrimaryKey, billNo))); } + } catch (Exception ex) { @@ -2907,6 +2889,28 @@ namespace Lskj.PubBill } } } + foreach (XtraTabPage xtraTabPage in this.tb_buttom.TabControlObj.TabPages) + { + if (xtraTabPage.Tag != null && (xtraTabPage.Tag != null && xtraTabPage.Tag is System.Windows.Forms.Control pageControl) && pageControl.Tag != null) + { + if (pageControl.Tag is GridDetailModel detailModel && (detailModel.Orderid + "").Equals("-9999")) + { + this.tb_buttom.TabControlObj.SelectedTabPage = xtraTabPage; + if (xtraTabPage.Tag is GridControlEx) + { + DataRow dataRow = this.gcMain.GetViewFocusedDataRow(); + GridControlEx gridControl = xtraTabPage.Tag as GridControlEx; + GridDetailModel Detailmodel = gridControl.Tag as GridDetailModel; + Detailmodel.DetailSql = this.ControlObj.ReplaceControlValue(Detailmodel.DetailSql); + Detailmodel.DetailSql = ReplaceHelper.ReplaceRowParam(dataRow, Detailmodel.DetailSql); + gridControl.SetGridViewDataSource(MainImpl.GetDataTableResult(Detailmodel.DetailSql)); + } + + + break; + } + } + } } catch (Exception) {