Update 20260529

This commit is contained in:
Stefan Hutter
2026-05-29 12:25:25 +02:00
parent 6d764dccd0
commit 42376fc823
35 changed files with 7025 additions and 86 deletions
+26 -12
View File
@@ -251,7 +251,7 @@ namespace WebApp
string doc = cmd.ExecuteScalar()?.ToString();
con.Close();
var ms1 = new MemoryStream(Convert.FromBase64String(doc));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\" + prefix + dr[2].ToString() + ".pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf" , System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms1.Length];
ms1.Read(bytes, 0, (int)ms1.Length);
@@ -295,21 +295,35 @@ namespace WebApp
Versandpaket vp = JsonConvert.DeserializeObject<Versandpaket>(dt.Rows[0][0].ToString());
var b64 = vp.finaldoc;
var ms = new MemoryStream(Convert.FromBase64String(b64));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms.Length];
ms.Read(bytes, 0, (int)ms.Length);
file.Write(bytes, 0, bytes.Length);
ms.Close();
}
//var ms = new MemoryStream(Convert.FromBase64String(b64));
//using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
//{
// byte[] bytes = new byte[ms.Length];
// ms.Read(bytes, 0, (int)ms.Length);
// file.Write(bytes, 0, bytes.Length);
// ms.Close();
//}
//System.Diagnostics.Process.Start(@"d:\apps\ondoc\admintemp\vp.pdf");
//System.IO.File.Delete("d:\\ondoc\\temp\\vp.pdf");
return "";
return b64;
}
}
[WebMethod]
public static object SaveTempFile(string base64)
{
var ms = new MemoryStream(Convert.FromBase64String(base64));
using (System.IO.FileStream file = new System.IO.FileStream(@"d:\apps\ondoc\admintemp\vp.pdf", System.IO.FileMode.Create, System.IO.FileAccess.Write))
{
byte[] bytes = new byte[ms.Length];
ms.Read(bytes, 0, (int)ms.Length);
file.Write(bytes, 0, bytes.Length);
ms.Close();
}
return "OK";
}
[WebMethod]
public static object GetDoc(string table, string id)
{
@@ -323,7 +337,7 @@ namespace WebApp
con.Open();
string doc = cmd.ExecuteScalar()?.ToString();
con.Close();
return doc;
}
}