cdk
2025-09-03 cc286e3641ef72fe7cb1312487a6d4e40bda81fe
DevApp/Gs.DevApp/UserControl/UcLookDepartment.cs
@@ -1,10 +1,8 @@
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Data;
using System.Windows;
namespace Gs.DevApp.UserControl
{
@@ -19,7 +17,7 @@
                LookSearchSupplier_EditValueChanged;
        }
        public bool IsReadly { get; set; }
        private bool _rdy; public bool IsReadly { set { _rdy = value; this.lookSearchSupplier.ReadOnly = _rdy; } get { return _rdy; } }
        /// <summary>
        ///     改变事件
@@ -35,10 +33,13 @@
        public void getSuppler(string orgId, string _dftVale = "")
        {
            lookSearchSupplier.EditValue = null;
            string _keyWhere = "";
            System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
            if (!string.IsNullOrEmpty(orgId))
                _keyWhere = " and a.FSubsidiary ='" + orgId + "'";
            var pgq = new PageQueryModel(1, 999999, "a.FSubsidiary asc,a.departmentcode", "asc", "", " and 1=1" + _keyWhere);
                _sbSqlWhere.Append(" and a.FSubsidiary ='" + orgId + "'");
            _sbSqlWhere.Append("  and a.FSubsidiary in");
            _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
            var pgq = new PageQueryModel(1, 999999, "a.FSubsidiary asc,a.departmentcode", "asc", "", " and 1=1" + _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
@@ -94,8 +95,8 @@
                lookSearchSupplier.EditValue = null;
                return;
            }
            if(!string.IsNullOrEmpty(Code))
            lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
            if (!string.IsNullOrEmpty(Code))
                lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
        }