From 767f92e1e3efb4170295279bc0a788fd4caeb56d Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期五, 05 九月 2025 11:18:46 +0800 Subject: [PATCH] bug --- DevApp/Gs.DevApp/DevFrm/FrmMain.cs | 61 +++++++++++++++++++++++++----- 1 files changed, 50 insertions(+), 11 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs index c3aa09e..bd2360f 100644 --- a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs +++ b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs @@ -1,6 +1,9 @@ 锘縰sing DevExpress.XtraBars; using DevExpress.XtraBars.FluentDesignSystem; using DevExpress.XtraBars.Navigation; +using DevExpress.XtraEditors; +using DevExpress.XtraEditors.TextEditController; +using DevExpress.XtraLayout; using DevExpress.XtraTab; using DevExpress.XtraTab.ViewInfo; using Gs.DevApp.DevFrm.User; @@ -14,7 +17,9 @@ using System.Configuration; using System.Data; using System.Drawing; +using System.IO; using System.Reflection; +using System.Text; using System.Windows.Forms; namespace Gs.DevApp.DevFrm @@ -95,6 +100,13 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } }; + + #region 鍔犱笂搴曢儴鎻愰啋 + string _webApiUrl = ConfigurationManager.AppSettings["WebApiUrl"]; + string _autoUpdate = (ConfigurationManager.AppSettings["IsAutoUpdater"]); + string _version = ConfigurationManager.AppSettings["Version"]; + toolVersion.Text = "褰撳墠鐗堟湰:" + _version + ",鏈嶅姟Api:" + _webApiUrl; + #endregion } /// <summary> /// 鏄剧ず鍙抽敭鑿滃崟 @@ -172,7 +184,7 @@ /// </summary> private void getTree() { - toolTime.Text = "鐧诲綍鏃堕棿" + LoginInfoModel.CurrentUser.LoginTime; + toolTime.Text = "鐧诲綍鏃堕棿:" + LoginInfoModel.CurrentUser.LoginTime; var _obj = new { userGuid = LoginInfoModel.CurrentUser.LoginUserGuid, @@ -335,15 +347,15 @@ { if (item.Name == name) { - //鍚庢潵鍔犱笂锛屼负浜嗛噴鏀剧獥浣撹祫婧恇eg - //foreach (Control control in item.Controls) - //{ - // if (control is Form) - // { - // Form myForm = control as Form; - // myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 纭繚 UI 绾跨▼瀹夊叏鍦伴噴鏀捐祫婧� - // } - //} + //2025-08-08鍔犱笂锛屼负浜嗛噴鏀剧獥浣撹祫婧恇eg + foreach (Control control in item.Controls) + { + if (control is Form) + { + Form myForm = control as Form; + myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 纭繚 UI 绾跨▼瀹夊叏鍦伴噴鏀捐祫婧� + } + } //鍚庢潵鍔犱笂锛屼负浜嗛噴鏀剧獥浣撹祫婧恊nd tabControl.TabPages.Remove(item); item.Dispose(); @@ -393,6 +405,30 @@ newForm.Dock = DockStyle.Fill; newForm.Visible = true; shiXian(newForm, formName, InitializeVal); + #region 鍔犱笂搴曢儴鎻愰啋 + string _strFont = Gs.DevApp.Properties.Settings.Default.fontSizeName; + string _ver = ""; + var _obj = new + { + formPath = formName, + }; + try + { + string strJson = UtilityHelper.HttpPost("", "Fm/GetModelByVersion", JsonConvert.SerializeObject(_obj)); + ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); + if (_rtn.rtnCode > 0) + { + _ver = _rtn.rtnData; + } + else + _ver = _rtn.rtnMsg; + } + catch (Exception ex) + { + _ver = ex.Message; + } + toolFont.Text = (",瀛椾綋:" + _strFont + ",绐椾綋:" + formName + ",鐗堥潰:" + _ver); + #endregion return newForm; } catch (Exception) @@ -485,7 +521,10 @@ private void GetOrg() { string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid; - var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1"); + System.Text.StringBuilder sbSql = new System.Text.StringBuilder(); + sbSql.Append(" and IS_STATUS=1"); + sbSql.Append(" and fid in( select org.FID from [dbo].[SYS_USER_BIND] b left join SYS_ORGANIZATION org on b.aboutGuid=org.FID where userGuid='" + LoginInfoModel.CurrentUser.LoginUserGuid + "' and fType='缁勭粐' ) "); + var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, sbSql.ToString()); var json = JsonConvert.SerializeObject(pgq); try { -- Gitblit v1.9.3