lu
2025-03-23 df0fc2993b41f0cb617b90bedbcbd7e61002f52c
DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -67,7 +67,7 @@
                    getPageListQuery();
            };
        }
        /// <summary>
        ///     查询集合
        /// </summary>
@@ -150,7 +150,7 @@
                var dt = new DataTable();
                dt.Columns.Add("field", typeof(string));
                dt.Columns.Add("fieldWhere", typeof(string));
                dt.Columns.Add("fieldValue", typeof(string));
                dt.Columns.Add("fieldValue", typeof(string));
                dt.Columns.Add("fieldType", typeof(string));
                foreach (var _sql in FilterList)
                {
@@ -198,7 +198,7 @@
            {
                e.Value = e.Value.ToString();
                e.Handled = true;
            }
        }
        private void repositoryItemComboBox1_SelectedValueChanged(object sender, EventArgs e)
@@ -296,7 +296,7 @@
        }
        private void getPageListQuery()
        {
            repositoryItemComboBoxSql.Items.Clear();
            var _obj = new
            {
                formPath = this._fullName,
@@ -329,8 +329,9 @@
                foreach (var a in _job["rtnData"]["list4"])
                {
                    array01.Add(a);
                    repositoryItemComboBoxSql.Items.Add(a["tableOtherName"].ToString());
                }
                DataTable dt01 = JsonConvert.DeserializeObject<DataTable>(array01.ToString());
                repositoryItemSearchLookUpEdit2Sql.DataSource = dt01;
                ////////////
                JArray array = new JArray();
                foreach (var a in _job["rtnData"]["list"])
@@ -415,43 +416,6 @@
                }
            }
        }
        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,
                        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;
@@ -462,7 +426,7 @@
                string _txt = comboBox.Text.Trim();
                var dr = myView.GetDataRow(dataIndex);
                var mxGuid = dr["guid"].ToString();
                if (mxGuid.Length > 0 )
                if (mxGuid.Length > 0)
                {
                    var _obj = new
                    {
@@ -488,7 +452,50 @@
                }
            }
        }
        private void repositoryItemSearchLookUpEdit2Sql_EditValueChanged(object sender, EventArgs e)
        {
            string _txt = "";
            SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
            DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow();
            if (SelectedDataRow != null)
                _txt = SelectedDataRow["tableOtherName"].ToString();
            GridView myView = (gcQuery.MainView as GridView);
            int dataIndex = myView.GetDataSourceRowIndex(myView.FocusedRowHandle);
            var dr = myView.GetDataRow(dataIndex);
            var mxGuid = dr["guid"].ToString();
            gvQuery.SetFocusedRowCellValue("sqlField", _txt);
            gvQuery.CloseEditor();
            gvQuery.PostEditor();
            gvQuery.UpdateCurrentRow();
            if (mxGuid.Length > 0)
            {
                var _obj = new
                {
                    guid = mxGuid,
                    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);
                }
            }
        }
        #endregion
    }
}