From 1b23b7f2e874036accaf5a565852ce1e01589281 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 21 三月 2025 15:32:49 +0800 Subject: [PATCH] 查询 --- DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs | 324 ++++++++++++++++++++++----------------- DevApp/Gs.DevApp/UserControl/ShowFilter.cs | 109 +++++++++++-- DevApp/Gs.DevApp/Properties/licenses.licx | 25 +- 3 files changed, 288 insertions(+), 170 deletions(-) diff --git a/DevApp/Gs.DevApp/Properties/licenses.licx b/DevApp/Gs.DevApp/Properties/licenses.licx index fcc03e8..6b8851a 100644 --- a/DevApp/Gs.DevApp/Properties/licenses.licx +++ b/DevApp/Gs.DevApp/Properties/licenses.licx @@ -1,14 +1,15 @@ DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit, DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraDataLayout.DataLayoutControl, DevExpress.XtraLayout.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemSearchLookUpEdit, DevExpress.XtraGrid.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v22.2, Version=22.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs index 3dedae5..1c6dfbc 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs @@ -29,14 +29,12 @@ /// </summary> private void InitializeComponent() { - DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); + this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); this.panel1 = new System.Windows.Forms.Panel(); this.btnEsc = new DevExpress.XtraEditors.SimpleButton(); this.btnQuery = new DevExpress.XtraEditors.SimpleButton(); @@ -45,10 +43,20 @@ this.gcMain = new DevExpress.XtraGrid.GridControl(); this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemComboBox2 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage(); + this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage(); + this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); + this.gcTable = new DevExpress.XtraGrid.GridControl(); + this.gvTable = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.panQueryTable = new System.Windows.Forms.Panel(); + this.btnSqlTable = new DevExpress.XtraEditors.SimpleButton(); this.gcQuery = new DevExpress.XtraGrid.GridControl(); this.gvQuery = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -60,35 +68,40 @@ this.panQueryBom = new System.Windows.Forms.Panel(); this.btnQueryEsc = new DevExpress.XtraEditors.SimpleButton(); this.btnQuerySave = new DevExpress.XtraEditors.SimpleButton(); - this.panQueryTop = new DevExpress.XtraEditors.PanelControl(); - this.layQuery = new DevExpress.XtraLayout.LayoutControl(); - this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); - this.txt_table = new DevExpress.XtraEditors.CheckedComboBoxEdit(); - this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - this.repositoryItemComboBox1 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); - this.repositoryItemComboBox2 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.xtraTabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(repositoryItemButtonEdit1)).BeginInit(); - this.xtraTabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).BeginInit(); + this.xtraTabPage3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); + this.splitContainerControl1.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).BeginInit(); + this.splitContainerControl1.Panel2.SuspendLayout(); + this.splitContainerControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gcTable)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.gvTable)).BeginInit(); + this.panQueryTable.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gcQuery)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gvQuery)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBoxSql)).BeginInit(); this.panQueryBom.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.panQueryTop)).BeginInit(); - this.panQueryTop.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.layQuery)).BeginInit(); - this.layQuery.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_table.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).BeginInit(); this.SuspendLayout(); + // + // repositoryItemButtonEdit1 + // + this.repositoryItemButtonEdit1.AutoHeight = false; + editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; + editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; + this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); + this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; + this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // // panel1 // @@ -126,7 +139,7 @@ this.xtraTabControl1.TabIndex = 2; this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1, - this.xtraTabPage2}); + this.xtraTabPage3}); // // xtraTabPage1 // @@ -172,6 +185,13 @@ this.gridColumn1.VisibleIndex = 0; this.gridColumn1.Width = 150; // + // repositoryItemComboBox1 + // + this.repositoryItemComboBox1.AutoHeight = false; + this.repositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; + // // gridColumn2 // this.gridColumn2.Caption = "鏌ヨ鏉′欢"; @@ -182,6 +202,13 @@ this.gridColumn2.Visible = true; this.gridColumn2.VisibleIndex = 1; this.gridColumn2.Width = 80; + // + // repositoryItemComboBox2 + // + this.repositoryItemComboBox2.AutoHeight = false; + this.repositoryItemComboBox2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.repositoryItemComboBox2.Name = "repositoryItemComboBox2"; // // gridColumn3 // @@ -196,14 +223,7 @@ // gridColumn4 // this.gridColumn4.Caption = "绉诲嚭"; - repositoryItemButtonEdit1.AutoHeight = false; - editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; - editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; - repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); - repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; - repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; - this.gridColumn4.ColumnEdit = repositoryItemButtonEdit1; + this.gridColumn4.ColumnEdit = this.repositoryItemButtonEdit1; this.gridColumn4.MaxWidth = 60; this.gridColumn4.MinWidth = 60; this.gridColumn4.Name = "gridColumn4"; @@ -211,25 +231,111 @@ this.gridColumn4.VisibleIndex = 3; this.gridColumn4.Width = 60; // - // xtraTabPage2 + // xtraTabPage3 // - this.xtraTabPage2.Controls.Add(this.panQueryTop); - this.xtraTabPage2.Controls.Add(this.gcQuery); - this.xtraTabPage2.Controls.Add(this.panQueryBom); - this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(734, 461); - this.xtraTabPage2.Text = "楂樼骇鏌ヨ閰嶇疆"; + this.xtraTabPage3.Controls.Add(this.splitContainerControl1); + this.xtraTabPage3.Name = "xtraTabPage3"; + this.xtraTabPage3.Size = new System.Drawing.Size(734, 461); + this.xtraTabPage3.Text = "鏌ヨ閰嶇疆"; + // + // splitContainerControl1 + // + this.splitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainerControl1.Horizontal = false; + this.splitContainerControl1.Location = new System.Drawing.Point(0, 0); + this.splitContainerControl1.Name = "splitContainerControl1"; + // + // splitContainerControl1.Panel1 + // + this.splitContainerControl1.Panel1.Controls.Add(this.gcTable); + this.splitContainerControl1.Panel1.Controls.Add(this.panQueryTable); + this.splitContainerControl1.Panel1.Text = "Panel1"; + // + // splitContainerControl1.Panel2 + // + this.splitContainerControl1.Panel2.Controls.Add(this.gcQuery); + this.splitContainerControl1.Panel2.Controls.Add(this.panQueryBom); + this.splitContainerControl1.Panel2.Text = "Panel2"; + this.splitContainerControl1.Size = new System.Drawing.Size(734, 461); + this.splitContainerControl1.SplitterPosition = 230; + this.splitContainerControl1.TabIndex = 0; + // + // gcTable + // + this.gcTable.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcTable.Location = new System.Drawing.Point(0, 0); + this.gcTable.MainView = this.gvTable; + this.gcTable.Name = "gcTable"; + this.gcTable.Size = new System.Drawing.Size(734, 196); + this.gcTable.TabIndex = 4; + this.gcTable.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { + this.gvTable}); + // + // gvTable + // + this.gvTable.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn10, + this.gridColumn11, + this.gridColumn12}); + this.gvTable.GridControl = this.gcTable; + this.gvTable.Name = "gvTable"; + this.gvTable.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom; + // + // gridColumn10 + // + this.gridColumn10.Caption = "琛ㄥ悕"; + this.gridColumn10.MinWidth = 25; + this.gridColumn10.Name = "gridColumn10"; + this.gridColumn10.Visible = true; + this.gridColumn10.VisibleIndex = 0; + this.gridColumn10.Width = 94; + // + // gridColumn11 + // + this.gridColumn11.Caption = "琛ㄥ娉�"; + this.gridColumn11.MinWidth = 25; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 1; + this.gridColumn11.Width = 94; + // + // gridColumn12 + // + this.gridColumn12.Caption = "鍒悕"; + this.gridColumn12.FieldName = "tableOtherName"; + this.gridColumn12.MinWidth = 25; + this.gridColumn12.Name = "gridColumn12"; + this.gridColumn12.Visible = true; + this.gridColumn12.VisibleIndex = 2; + this.gridColumn12.Width = 94; + // + // panQueryTable + // + this.panQueryTable.Controls.Add(this.btnSqlTable); + this.panQueryTable.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panQueryTable.Location = new System.Drawing.Point(0, 196); + this.panQueryTable.Name = "panQueryTable"; + this.panQueryTable.Size = new System.Drawing.Size(734, 34); + this.panQueryTable.TabIndex = 5; + // + // btnSqlTable + // + this.btnSqlTable.Location = new System.Drawing.Point(627, 3); + this.btnSqlTable.Name = "btnSqlTable"; + this.btnSqlTable.Size = new System.Drawing.Size(94, 29); + this.btnSqlTable.TabIndex = 0; + this.btnSqlTable.Text = "纭畾淇濆瓨"; // // gcQuery // - this.gcQuery.Dock = System.Windows.Forms.DockStyle.Bottom; - this.gcQuery.Location = new System.Drawing.Point(0, 44); + this.gcQuery.Dock = System.Windows.Forms.DockStyle.Fill; + this.gcQuery.Location = new System.Drawing.Point(0, 0); this.gcQuery.MainView = this.gvQuery; this.gcQuery.Name = "gcQuery"; this.gcQuery.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemComboBoxSql}); - this.gcQuery.Size = new System.Drawing.Size(734, 361); - this.gcQuery.TabIndex = 0; + this.gcQuery.Size = new System.Drawing.Size(734, 175); + this.gcQuery.TabIndex = 3; this.gcQuery.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gvQuery}); // @@ -308,14 +414,14 @@ this.panQueryBom.Controls.Add(this.btnQueryEsc); this.panQueryBom.Controls.Add(this.btnQuerySave); this.panQueryBom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panQueryBom.Location = new System.Drawing.Point(0, 405); + this.panQueryBom.Location = new System.Drawing.Point(0, 175); this.panQueryBom.Name = "panQueryBom"; - this.panQueryBom.Size = new System.Drawing.Size(734, 56); - this.panQueryBom.TabIndex = 2; + this.panQueryBom.Size = new System.Drawing.Size(734, 44); + this.panQueryBom.TabIndex = 4; // // btnQueryEsc // - this.btnQueryEsc.Location = new System.Drawing.Point(391, 15); + this.btnQueryEsc.Location = new System.Drawing.Point(639, 6); this.btnQueryEsc.Name = "btnQueryEsc"; this.btnQueryEsc.Size = new System.Drawing.Size(94, 29); this.btnQueryEsc.TabIndex = 1; @@ -323,83 +429,11 @@ // // btnQuerySave // - this.btnQuerySave.Location = new System.Drawing.Point(270, 15); + this.btnQuerySave.Location = new System.Drawing.Point(518, 6); this.btnQuerySave.Name = "btnQuerySave"; this.btnQuerySave.Size = new System.Drawing.Size(94, 29); this.btnQuerySave.TabIndex = 0; this.btnQuerySave.Text = "纭畾淇濆瓨"; - // - // panQueryTop - // - this.panQueryTop.Controls.Add(this.layQuery); - this.panQueryTop.Dock = System.Windows.Forms.DockStyle.Fill; - this.panQueryTop.Location = new System.Drawing.Point(0, 0); - this.panQueryTop.Name = "panQueryTop"; - this.panQueryTop.Size = new System.Drawing.Size(734, 44); - this.panQueryTop.TabIndex = 3; - // - // layQuery - // - this.layQuery.Controls.Add(this.txt_table); - this.layQuery.Dock = System.Windows.Forms.DockStyle.Fill; - this.layQuery.Location = new System.Drawing.Point(2, 2); - this.layQuery.Name = "layQuery"; - this.layQuery.Root = this.Root; - this.layQuery.Size = new System.Drawing.Size(730, 40); - this.layQuery.TabIndex = 283; - this.layQuery.Text = "layoutControl1"; - // - // Root - // - this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - this.Root.GroupBordersVisible = false; - this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { - this.layoutControlItem1}); - this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; - this.Root.Name = "Root"; - columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition1.Width = 100D; - this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { - columnDefinition1}); - rowDefinition1.Height = 100D; - rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; - this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { - rowDefinition1}); - this.Root.Size = new System.Drawing.Size(709, 48); - this.Root.TextVisible = false; - // - // txt_table - // - this.txt_table.Location = new System.Drawing.Point(69, 12); - this.txt_table.Name = "txt_table"; - this.txt_table.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.txt_table.Size = new System.Drawing.Size(628, 24); - this.txt_table.StyleController = this.layQuery; - this.txt_table.TabIndex = 283; - // - // layoutControlItem1 - // - this.layoutControlItem1.Control = this.txt_table; - this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); - this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.Size = new System.Drawing.Size(689, 28); - this.layoutControlItem1.Text = "鍏宠仈琛�"; - this.layoutControlItem1.TextSize = new System.Drawing.Size(45, 18); - // - // repositoryItemComboBox1 - // - this.repositoryItemComboBox1.AutoHeight = false; - this.repositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; - // - // repositoryItemComboBox2 - // - this.repositoryItemComboBox2.AutoHeight = false; - this.repositoryItemComboBox2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.repositoryItemComboBox2.Name = "repositoryItemComboBox2"; // // ShowFilter // @@ -414,27 +448,29 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "璇峰鍔犳煡璇㈡潯浠�"; this.TopMost = true; + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit(); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); this.xtraTabControl1.ResumeLayout(false); this.xtraTabPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(repositoryItemButtonEdit1)).EndInit(); - this.xtraTabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).EndInit(); + this.xtraTabPage3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); + this.splitContainerControl1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel2)).EndInit(); + this.splitContainerControl1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).EndInit(); + this.splitContainerControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.gcTable)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.gvTable)).EndInit(); + this.panQueryTable.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.gcQuery)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gvQuery)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBoxSql)).EndInit(); this.panQueryBom.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.panQueryTop)).EndInit(); - this.panQueryTop.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.layQuery)).EndInit(); - this.layQuery.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_table.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).EndInit(); this.ResumeLayout(false); } @@ -445,30 +481,34 @@ private DevExpress.XtraEditors.SimpleButton btnQuery; private DevExpress.XtraTab.XtraTabControl xtraTabControl1; private DevExpress.XtraTab.XtraTabPage xtraTabPage1; - private DevExpress.XtraTab.XtraTabPage xtraTabPage2; private DevExpress.XtraGrid.Views.Grid.GridView gridView1; private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; private DevExpress.XtraGrid.GridControl gcMain; - private System.Windows.Forms.Panel panQueryBom; - private DevExpress.XtraEditors.SimpleButton btnQueryEsc; - private DevExpress.XtraEditors.SimpleButton btnQuerySave; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox1; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox2; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraTab.XtraTabPage xtraTabPage3; + private DevExpress.XtraEditors.SplitContainerControl splitContainerControl1; + private DevExpress.XtraGrid.GridControl gcTable; + private DevExpress.XtraGrid.Views.Grid.GridView gvTable; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private System.Windows.Forms.Panel panQueryTable; + private DevExpress.XtraEditors.SimpleButton btnSqlTable; private DevExpress.XtraGrid.GridControl gcQuery; private DevExpress.XtraGrid.Views.Grid.GridView gvQuery; private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; + private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBoxSql; private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; - private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBoxSql; - private DevExpress.XtraEditors.PanelControl panQueryTop; - private DevExpress.XtraLayout.LayoutControl layQuery; - private DevExpress.XtraEditors.CheckedComboBoxEdit txt_table; - private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox1; - private DevExpress.XtraEditors.Repository.RepositoryItemComboBox repositoryItemComboBox2; + private System.Windows.Forms.Panel panQueryBom; + private DevExpress.XtraEditors.SimpleButton btnQueryEsc; + private DevExpress.XtraEditors.SimpleButton btnQuerySave; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs index c36f003..f33093a 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs @@ -1,8 +1,11 @@ 锘縰sing System; using System.Collections.Generic; using System.Data; +using System.Data.SqlTypes; using System.Text; using System.Windows.Forms; +using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; +using DevExpress.PivotGrid.OLAP.Mdx; using DevExpress.Utils.DirectXPaint; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; @@ -10,8 +13,10 @@ using DevExpress.XtraGrid.Columns; using DevExpress.XtraGrid.Views.Base.ViewInfo; using FastReport.MSChart; +using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace Gs.DevApp.UserControl { @@ -47,12 +52,17 @@ gridView1.OptionsFind.ShowSearchNavButtons = false; // this.gridView1.OptionsView.ShowAutoFilterRow = true; gridView1.OptionsView.ShowGroupPanel = false; + gvQuery.OptionsView.ShowGroupPanel = false; + gvTable.OptionsView.ShowGroupPanel = false; btnEsc.Click += BtnEsc_Click; btnQuery.Click += BtnQuery_Click; getPageList(); //涓嬮潰涓烘煡璇㈤厤缃� + this.btnSqlTable.Click += BtnSqlTable_Click; getPageListQuery(); } + + /// <summary> /// 鏌ヨ闆嗗悎 @@ -218,18 +228,67 @@ #region MyRegion + /// <summary> + /// 鎴彇琛ㄥ悕 + /// </summary> + /// <param name="strName"></param> + /// <returns></returns> + private string _getTableName(string strName) + { + var _tableName = strName.Split('(')[0]; + return _tableName; + } + private void BtnSqlTable_Click(object sender, EventArgs e) + { + //System.Text.StringBuilder sb = new System.Text.StringBuilder(); + //var list = txt_table.Properties.Items.GetCheckedValues(); + //foreach (var obj in list) + //{ + // if (sb.Length > 0) + // sb.Append(","); + // sb.Append(_getTableName(obj.ToString())); + + //} + + //if (sb.Length < 0) + //{ + // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍏宠仈琛紒"); + // txt_table.Focus(); + // return; + //} + + //var _obj = new + //{ + // guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓 + // djlx = djlx,//鍗曟嵁绫诲瀷 + // salesId = _sqGuid,//閿�鍞崟鍙� + // inRemark = FNote.Trim(),//澶囨敞 + // list = new List<dynamic>(), + //}; + //try + //{ + // string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); + // ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); + // ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + // if (_rtn.rtnCode > 0) + // { + // lbGuid.Text = _rtn.rtnData.outGuid; + // txt_billNo.Text = _rtn.rtnData.outNo; + // toolBarMenu1.isSetBtn = true; + // List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + // gvList.Add(gvMx1); + // UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); + // toolBarMenu1.currentAction = ""; + // } + //} + //catch (Exception ex) + //{ + // ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + //} + + } private void getPageListQuery() { - //foreach (GridColumn col in _columns) - // if (col.Tag != null && col.Tag.ToString().StartsWith("query")) - // { - // var item = new CboItemEntity(); - // item.Text = col.Tag.ToString().Replace("query_", "") + - // "锛�" + col.Caption + "锛�"; - // //item.Value = col.FieldName; - // item.Value = col.Tag.ToString().Replace("query_", ""); - // repositoryItemComboBox1.Items.Add(item); - // } repositoryItemComboBoxSql.Items.Clear(); repositoryItemComboBoxSql.Items.Add("1"); repositoryItemComboBoxSql.Items.Add("1"); @@ -241,19 +300,37 @@ }; foreach (GridColumn col in _columns) { - _obj.list.Add(new { - colName= col.Name.ToString(), - colCap=col.Caption + _obj.list.Add(new + { + colName = col.Name.ToString(), + colCap = col.Caption }); } try { var strJson = UtilityHelper.HttpPost("", "Fm/GetQuery", JsonConvert.SerializeObject(_obj)); - var dt = UtilityHelper.ReturnToList(strJson); - DataTable _newTable = dt.rtnData; + ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); + JObject _job = JObject.Parse(strJson); + //////////// + JArray array = new JArray(); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); + gcTable.BindingContext = new BindingContext(); + gcTable.DataSource = dt; + gcTable.ForceInitialize(); + //////////// + JArray array2 = new JArray(); + foreach (var a in _job["rtnData"]["list2"]) + { + array2.Add(a); + } + DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString()); gcQuery.BindingContext = new BindingContext(); - gcQuery.DataSource = _newTable; + gcQuery.DataSource = dt2; gcQuery.ForceInitialize(); } catch (Exception ex) -- Gitblit v1.9.3