From 7a79a925742bac1c873f76c0a86443859771bee5 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 21 三月 2025 22:53:56 +0800 Subject: [PATCH] 过滤 --- DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs | 106 ++++++++------------------ DevApp/Gs.DevApp/App.config | 4 DevApp/Gs.DevApp/UserControl/ShowFilter.cs | 115 ++++++++++++++++------------ 3 files changed, 101 insertions(+), 124 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index dfcd2d5..c371e91 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -28,8 +28,8 @@ </assemblyBinding> </runtime> <appSettings> - <!--<add key="WebApiUrl" value="http://localhost:5263/" />--> - <add key="WebApiUrl" value="http://192.168.1.145:81/" /> + <add key="WebApiUrl" value="http://localhost:5263/" /> + <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />--> <add key="LogPath" value="logs" /> <add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" /> <add key="PageSize" value="50" /> diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs index 91242ea..4f3ab42 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs @@ -44,7 +44,6 @@ DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject(); - 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(); @@ -58,6 +57,7 @@ this.repositoryItemComboBox2 = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); this.xtraTabPage3 = new DevExpress.XtraTab.XtraTabPage(); this.splitContainerControl1 = new DevExpress.XtraEditors.SplitContainerControl(); this.gcTable = new DevExpress.XtraGrid.GridControl(); @@ -80,12 +80,7 @@ this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemComboBoxSql = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); - this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.panQueryBom = new System.Windows.Forms.Panel(); - this.btnQueryEsc = new DevExpress.XtraEditors.SimpleButton(); - this.btnQuerySave = new DevExpress.XtraEditors.SimpleButton(); - ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); @@ -94,6 +89,7 @@ ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).BeginInit(); this.xtraTabPage3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); @@ -110,25 +106,14 @@ ((System.ComponentModel.ISupportInitialize)(this.gcQuery)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gvQuery)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBoxSql)).BeginInit(); - this.panQueryBom.SuspendLayout(); 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 // this.panel1.Controls.Add(this.btnEsc); this.panel1.Controls.Add(this.btnQuery); this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 405); + this.panel1.Location = new System.Drawing.Point(0, 466); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(734, 56); this.panel1.TabIndex = 1; @@ -155,7 +140,7 @@ this.xtraTabControl1.Location = new System.Drawing.Point(0, 0); this.xtraTabControl1.Name = "xtraTabControl1"; this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; - this.xtraTabControl1.Size = new System.Drawing.Size(736, 493); + this.xtraTabControl1.Size = new System.Drawing.Size(736, 554); this.xtraTabControl1.TabIndex = 2; this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1, @@ -166,19 +151,20 @@ this.xtraTabPage1.Controls.Add(this.gcMain); this.xtraTabPage1.Controls.Add(this.panel1); this.xtraTabPage1.Name = "xtraTabPage1"; - this.xtraTabPage1.Size = new System.Drawing.Size(734, 461); + this.xtraTabPage1.Size = new System.Drawing.Size(734, 522); this.xtraTabPage1.Text = "鏌ヨ鏉′欢"; // // gcMain // - this.gcMain.Dock = System.Windows.Forms.DockStyle.Bottom; + this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill; this.gcMain.Location = new System.Drawing.Point(0, 0); this.gcMain.MainView = this.gridView1; this.gcMain.Name = "gcMain"; this.gcMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemComboBox1, - this.repositoryItemComboBox2}); - this.gcMain.Size = new System.Drawing.Size(734, 405); + this.repositoryItemComboBox2, + this.repositoryItemButtonEdit1}); + this.gcMain.Size = new System.Drawing.Size(734, 466); this.gcMain.TabIndex = 0; this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView1}); @@ -211,6 +197,7 @@ this.repositoryItemComboBox1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; + this.repositoryItemComboBox1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; // // gridColumn2 // @@ -229,6 +216,7 @@ this.repositoryItemComboBox2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.repositoryItemComboBox2.Name = "repositoryItemComboBox2"; + this.repositoryItemComboBox2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; // // gridColumn3 // @@ -251,11 +239,22 @@ this.gridColumn4.VisibleIndex = 3; this.gridColumn4.Width = 60; // + // 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; + this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); + // // xtraTabPage3 // this.xtraTabPage3.Controls.Add(this.splitContainerControl1); this.xtraTabPage3.Name = "xtraTabPage3"; - this.xtraTabPage3.Size = new System.Drawing.Size(734, 461); + this.xtraTabPage3.Size = new System.Drawing.Size(734, 522); this.xtraTabPage3.Text = "鏌ヨ閰嶇疆"; // // splitContainerControl1 @@ -274,9 +273,8 @@ // 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.Size = new System.Drawing.Size(734, 522); this.splitContainerControl1.SplitterPosition = 230; this.splitContainerControl1.TabIndex = 0; // @@ -436,7 +434,7 @@ this.gcQuery.Name = "gcQuery"; this.gcQuery.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemComboBoxSql}); - this.gcQuery.Size = new System.Drawing.Size(734, 175); + this.gcQuery.Size = new System.Drawing.Size(734, 280); this.gcQuery.TabIndex = 3; this.gcQuery.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gvQuery}); @@ -447,7 +445,6 @@ this.gridColumn5, this.gridColumn6, this.gridColumn7, - this.gridColumn8, this.gridColumn9}); this.gvQuery.GridControl = this.gcQuery; this.gvQuery.Name = "gvQuery"; @@ -476,7 +473,7 @@ // this.gridColumn7.Caption = "瀵瑰簲瀛楁"; this.gridColumn7.ColumnEdit = this.repositoryItemComboBoxSql; - this.gridColumn7.FieldName = "gvTag"; + this.gridColumn7.FieldName = "sqlField"; this.gridColumn7.MinWidth = 25; this.gridColumn7.Name = "gridColumn7"; this.gridColumn7.Visible = true; @@ -490,16 +487,7 @@ new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.repositoryItemComboBoxSql.Name = "repositoryItemComboBoxSql"; this.repositoryItemComboBoxSql.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - // - // gridColumn8 - // - this.gridColumn8.Caption = "鏈�鍚庝慨鏀逛汉"; - this.gridColumn8.FieldName = "lastUpdateBy"; - this.gridColumn8.MinWidth = 25; - this.gridColumn8.Name = "gridColumn8"; - this.gridColumn8.Visible = true; - this.gridColumn8.VisibleIndex = 3; - this.gridColumn8.Width = 94; + this.repositoryItemComboBoxSql.EditValueChanged += new System.EventHandler(this.repositoryItemComboBoxSql_EditValueChanged); // // gridColumn9 // @@ -508,40 +496,14 @@ this.gridColumn9.MinWidth = 25; this.gridColumn9.Name = "gridColumn9"; this.gridColumn9.Visible = true; - this.gridColumn9.VisibleIndex = 4; + this.gridColumn9.VisibleIndex = 3; this.gridColumn9.Width = 94; - // - // panQueryBom - // - 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, 175); - this.panQueryBom.Name = "panQueryBom"; - this.panQueryBom.Size = new System.Drawing.Size(734, 44); - this.panQueryBom.TabIndex = 4; - // - // btnQueryEsc - // - 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; - this.btnQueryEsc.Text = "鍙栨秷"; - // - // btnQuerySave - // - 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 = "纭畾淇濆瓨"; // // ShowFilter // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(736, 493); + this.ClientSize = new System.Drawing.Size(736, 554); this.Controls.Add(this.xtraTabControl1); this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; this.MaximizeBox = false; @@ -550,7 +512,6 @@ 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); @@ -559,6 +520,7 @@ ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit1)).EndInit(); this.xtraTabPage3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); this.splitContainerControl1.Panel1.ResumeLayout(false); @@ -575,7 +537,6 @@ ((System.ComponentModel.ISupportInitialize)(this.gcQuery)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gvQuery)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.repositoryItemComboBoxSql)).EndInit(); - this.panQueryBom.ResumeLayout(false); this.ResumeLayout(false); } @@ -594,7 +555,7 @@ private DevExpress.XtraGrid.GridControl gcMain; 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; @@ -609,11 +570,7 @@ 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 System.Windows.Forms.Panel panQueryBom; - private DevExpress.XtraEditors.SimpleButton btnQueryEsc; - private DevExpress.XtraEditors.SimpleButton btnQuerySave; private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; private DevExpress.XtraGrid.Columns.GridColumn gridColumn14; @@ -622,5 +579,6 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn15; private DevExpress.XtraGrid.Columns.GridColumn gridColumn16; private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit2; + private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs index d7a4886..fb5fae4 100644 --- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs +++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs @@ -1,18 +1,12 @@ 锘縰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; -using DevExpress.XtraEditors.Repository; using DevExpress.XtraGrid.Columns; -using DevExpress.XtraGrid.Views.Base.ViewInfo; -using FastReport.MSChart; +using DevExpress.XtraGrid.Views.Grid; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; @@ -37,32 +31,42 @@ _columns = Columns; _fullName = FullName; InitializeComponent(); - repositoryItemComboBox1.TextEditStyle = - TextEditStyles.DisableTextEditor; - repositoryItemComboBox1.SelectedIndexChanged += - RepositoryItemComboBox1_SelectedIndexChanged; repositoryItemComboBox1.ParseEditValue += RepositoryItemComboBox1_ParseEditValue; - repositoryItemComboBox2.TextEditStyle = - TextEditStyles.DisableTextEditor; - repositoryItemComboBox2.SelectedIndexChanged += - RepositoryItemComboBox2_SelectedIndexChanged; repositoryItemComboBox2.ParseEditValue += RepositoryItemComboBox2_ParseEditValue; 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; + // + gridView1.IndicatorWidth=gvTable.IndicatorWidth=gvQuery.IndicatorWidth = 50; + gridView1.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + }; + gvTable.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + }; + gvQuery.CustomDrawRowIndicator += (s, e) => + { + if (e.Info.IsRowIndicator && e.RowHandle >= 0) + e.Info.DisplayText = (e.RowHandle + 1).ToString(); + }; getPageList(); //涓嬮潰涓烘煡璇㈤厤缃� this.btnSqlTable.Click += BtnSqlTable_Click; - getPageListQuery(); + xtraTabControl1.SelectedPageChanged += (s, e) => + { + if (xtraTabControl1.SelectedTabPageIndex == 1) + getPageListQuery(); + }; } - - /// <summary> /// 鏌ヨ闆嗗悎 @@ -103,11 +107,9 @@ _fileWhere = " like "; _fieldValue = "%" + _fieldValue + "%"; } - list.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere, _fileWhereDec, _fieldValue)); } - UpdateParent?.Invoke(this, new UpdateParentEventArgs { FilterList = list }); Close(); @@ -185,11 +187,6 @@ } } - private void RepositoryItemComboBox2_SelectedIndexChanged(object sender, - EventArgs e) - { - } - private void RepositoryItemComboBox1_ParseEditValue(object sender, ConvertEditValueEventArgs e) { @@ -198,11 +195,6 @@ e.Value = e.Value.ToString(); e.Handled = true; } - } - - private void RepositoryItemComboBox1_SelectedIndexChanged(object sender, - EventArgs e) - { } @@ -228,16 +220,7 @@ #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) { if (string.IsNullOrEmpty(_fullName)) @@ -294,9 +277,6 @@ private void getPageListQuery() { repositoryItemComboBoxSql.Items.Clear(); - repositoryItemComboBoxSql.Items.Add("1"); - repositoryItemComboBoxSql.Items.Add("1"); - repositoryItemComboBoxSql.Items.Add("1"); var _obj = new { formPath = this._fullName, @@ -324,6 +304,13 @@ } DataTable dt00 = JsonConvert.DeserializeObject<DataTable>(array00.ToString()); this.repositoryItemSearchLookUpEdit1.DataSource = dt00; + //璇诲墠閫夋嫨 + JArray array01 = new JArray(); + foreach (var a in _job["rtnData"]["list4"]) + { + array01.Add(a); + repositoryItemComboBoxSql.Items.Add(a["tableOtherName"].ToString()); + } //////////// JArray array = new JArray(); foreach (var a in _job["rtnData"]["list"]) @@ -398,7 +385,7 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - if (_rtn.rtnCode > 0) getPageListQuery(); + // getPageListQuery(); } MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } @@ -408,9 +395,41 @@ } } } - + private void repositoryItemComboBoxSql_EditValueChanged(object sender, EventArgs e) + { + ComboBoxEdit comboBox = sender as ComboBoxEdit; + if (comboBox != null) + { + GridView myView = (gcQuery.MainView as GridView); + int dataIndex = myView.GetDataSourceRowIndex(myView.FocusedRowHandle); + string _txt = comboBox.Text.Trim(); + var dr = myView.GetDataRow(dataIndex); + var mxGuid = dr["guid"].ToString(); + if (mxGuid.Length > 0 && _txt.Length > 0) + { + var _obj = new + { + guid = mxGuid, + sqlField = _txt + }; + try + { + var strJson = UtilityHelper.HttpPost("", + "Fm/EditCol", + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + if (_rtn.rtnCode <= 0) + { + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } + } + } #endregion - - } } \ No newline at end of file -- Gitblit v1.9.3