From 05cafd5ad0decbcd8f840e5750def4b525c5828e Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 22 三月 2025 14:28:56 +0800
Subject: [PATCH] 物料类型

---
 DevApp/Gs.DevApp/UserControl/ShowFilter.cs |   52 ++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
index fb5fae4..7c20e5e 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -42,7 +42,7 @@
             btnEsc.Click += BtnEsc_Click;
             btnQuery.Click += BtnQuery_Click;
             //
-            gridView1.IndicatorWidth=gvTable.IndicatorWidth=gvQuery.IndicatorWidth = 50;
+            gridView1.IndicatorWidth = gvTable.IndicatorWidth = gvQuery.IndicatorWidth = 50;
             gridView1.CustomDrawRowIndicator += (s, e) =>
             {
                 if (e.Info.IsRowIndicator && e.RowHandle >= 0)
@@ -120,13 +120,12 @@
         private void getPageList()
         {
             foreach (GridColumn col in _columns)
-                if (col.Tag != null && col.Tag.ToString().StartsWith("query"))
+                if (col.Tag != null && !string.IsNullOrEmpty(col.Tag.ToString()))
                 {
                     var item = new CboItemEntity();
-                    item.Text = col.Tag.ToString().Replace("query_", "") +
-                                "锛�" + col.Caption + "锛�";
+                    item.Text = col.Tag.ToString() + "锛�" + col.Caption + "锛�";
                     //item.Value = col.FieldName;
-                    item.Value = col.Tag.ToString().Replace("query_", "");
+                    item.Value = col.Tag.ToString();
                     repositoryItemComboBox1.Items.Add(item);
                 }
 
@@ -194,6 +193,7 @@
             {
                 e.Value = e.Value.ToString();
                 e.Handled = true;
+
             }
         }
 
@@ -410,7 +410,45 @@
                     var _obj = new
                     {
                         guid = mxGuid,
-                        sqlField = _txt
+                        sqlField = _txt,
+                        fType=0,
+                    };
+                    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);
+                    }
+                }
+            }
+        }
+
+        private void repositoryItemComboBox3Sql_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 )
+                {
+                    var _obj = new
+                    {
+                        guid = mxGuid,
+                        fType = 1,
+                        sqlFieldType = _txt
                     };
                     try
                     {
@@ -431,5 +469,7 @@
             }
         }
         #endregion
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3