lu
9 天以前 bebb7b48326afd83927edd877eef53f4002d9a3f
DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -335,15 +335,15 @@
            {
                if (item.Name == name)
                {
                    //后来加上,为了释放窗体资源beg
                    //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加上,为了释放窗体资源beg
                    foreach (Control control in item.Controls)
                    {
                        if (control is Form)
                        {
                            Form myForm = control as Form;
                            myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 确保 UI 线程安全地释放资源
                        }
                    }
                    //后来加上,为了释放窗体资源end
                    tabControl.TabPages.Remove(item);
                    item.Dispose();
@@ -485,7 +485,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
            {