From 1a8f404f8641d38b5a2746d9d6d14b1e40f3b5bf Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 14 十一月 2024 18:25:23 +0800
Subject: [PATCH] 打印

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 428834f..a02baec 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -5,6 +5,7 @@
 using System.Drawing;
 using System.IO;
 using System.Net;
+using System.Net.Cache;
 using System.Net.Http;
 using System.Reflection;
 using System.Resources;
@@ -12,7 +13,6 @@
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using DevExpress.Office.Model;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid;
@@ -76,6 +76,9 @@
             request.Accept = "*/*";
             request.Timeout = 15000;
             request.AllowAutoRedirect = false;
+            request.ServicePoint.Expect100Continue = false;
+            HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
+            request.CachePolicy = noCachePolicy;
             using (Stream requestStream = await request.GetRequestStreamAsync())
             {
                 byte[] dataBytes = Encoding.UTF8.GetBytes(param);
@@ -110,6 +113,9 @@
             request.Accept = "*/*";
             request.Timeout = 15000;
             request.AllowAutoRedirect = false;
+            request.ServicePoint.Expect100Continue = false;
+            HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore);
+            request.CachePolicy = noCachePolicy;
             StreamWriter requestStream = null;
             WebResponse response = null;
             string responseStr = null;
@@ -475,7 +481,10 @@
                         {
                             var txt = colType as UcLookCk;
                             txt.SetIdOrCode(strVal);
-                            txt.Enabled = !isEdt;
+                            if (txt.IsReadly == false)
+                                txt.Enabled = !isEdt;
+                            else
+                                txt.Enabled = false;
                             continue;
                         }
                         //鑷畾涔変緵搴斿晢
@@ -483,7 +492,10 @@
                         {
                             var txt = colType as UcLookSupplier;
                             txt.SetIdOrCode(strVal);
-                            txt.Enabled = !isEdt;
+                            if (txt.IsReadly == false)
+                                txt.Enabled = !isEdt;
+                            else
+                                txt.Enabled = false;
                             continue;
                         }
                         //鑷畾涔夌墿鏂�
@@ -491,7 +503,10 @@
                         {
                             var txt = colType as UcLookItems;
                             txt.SetIdOrCode(strVal);
-                            txt.Enabled = !isEdt;
+                            if (txt.IsReadly == false)
+                                txt.Enabled = !isEdt;
+                            else
+                                txt.Enabled = false;
                             continue;
                         }
                         if (colType is SimpleButton)

--
Gitblit v1.9.3