lu
2025-10-22 70332ced875cd4afaad7c31dc83f863eb1bd1a9f
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -309,6 +309,18 @@
                var _btnType = _btnAry2[0];
                _btnType.Enabled = !isEdt;
            }
            var _btnAry3 = controls.Find("btnCopyXls", false);
            if (_btnAry3.Length > 0)
            {
                var _btnType = _btnAry3[0];
                _btnType.Enabled = !isEdt;
            }
            var _btnAry4 = controls.Find("btnDown", false);
            if (_btnAry4.Length > 0)
            {
                var _btnType = _btnAry4[0];
                _btnType.Enabled = !isEdt;
            }
            foreach (JProperty property in dynamicObject.Properties())
            {
                var strName = property.Name;
@@ -561,6 +573,14 @@
                        if (colType is UcLookOrg)
                        {
                            var txt = colType as UcLookOrg;
                            txt.SetIdOrCode(strVal);
                            txt.IsReadly = isEdt;
                            continue;
                        }
                        //自定组织all
                        if (colType is UcLookOrgAll)
                        {
                            var txt = colType as UcLookOrgAll;
                            txt.SetIdOrCode(strVal);
                            txt.IsReadly = isEdt;
                            continue;
@@ -870,6 +890,14 @@
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定组织All
                if (ctrl is UcLookOrgAll)
                {
                    var txt = ctrl as UcLookOrgAll;
                    txt.SetIdOrCode("-1");
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定用户
                if (ctrl is UcLookUser)
                {
@@ -1118,6 +1146,13 @@
                if (ctrl is UcLookOrg)
                {
                    var txt = ctrl as UcLookOrg;
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定组织
                if (ctrl is UcLookOrgAll)
                {
                    var txt = ctrl as UcLookOrgAll;
                    txt.IsReadly = isEdt;
                    continue;
                }
@@ -2532,6 +2567,29 @@
                return "";
            }
        }
        public static string GetFirstOrg(UserControl.UcLookOrgAll txt_erpSczz)
        {
            string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid;
            var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1");
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
                var _obj = UtilityHelper.ReturnToDynamic(strReturn);
                string _extendText = _obj.rtnData.extendText;
                string[] _dftOrg = _extendText.Split(',');
                if (_dftOrg.Length > 0)
                {
                    txt_erpSczz.SetIdOrCode(_dftOrg[0].Trim());
                    return _dftOrg[0].Trim();
                }
                return "";
            }
            catch (Exception ex)
            {
                return "";
            }
        }
    }
    /// <summary>