Browse Source

供应商条码打印修改补充

Hcsy 7 years ago
parent
commit
292a71cc24
1 changed files with 8 additions and 0 deletions
  1. 8 0
      UAS_Web/tool/RequestHandler.cs

+ 8 - 0
UAS_Web/tool/RequestHandler.cs

@@ -149,10 +149,18 @@ namespace UAS_Web.tool
                                     if (itemc.Value != null)
                                     {
                                         itemstr = itemc.Value.ToString();
+                                        while (itemstr.StartsWith("\f") || itemstr.StartsWith("\v") || itemstr.StartsWith("\t") || itemstr.StartsWith("\r") || itemstr.StartsWith("\n"))
+                                        {
+                                            itemstr = itemstr.Remove(0, 2);
+                                        }
                                         if (itemstr.StartsWith("\""))
                                         {
                                             itemstr = itemstr.Remove(0, 1);
                                         }
+                                        while (itemstr.EndsWith("\f") || itemstr.EndsWith("\v") || itemstr.EndsWith("\t") || itemstr.EndsWith("\r") || itemstr.EndsWith("\n"))
+                                        {
+                                            itemstr = itemstr.Remove(itemstr.Length - 2);
+                                        }
                                         if (itemstr.EndsWith("\""))
                                         {
                                             itemstr = itemstr.Remove(itemstr.Length - 1);