update 20241107

This commit is contained in:
Stefan Hutter
2024-11-07 22:35:24 +01:00
parent 86be28ec33
commit 23a308ad73
65 changed files with 759 additions and 55 deletions

View File

@@ -10,6 +10,9 @@ using Model;
using Database;
using Newtonsoft.Json;
using API_NetFramework.Models;
using System.Runtime.Remoting.Messaging;
using System.IO;
using System.Web;
namespace API_NetFramework.Controllers
{
@@ -51,6 +54,7 @@ namespace API_NetFramework.Controllers
}
}
[HttpGet]
[Route("API/ArchiveDocBase64")]
/// <summary>
@@ -63,6 +67,7 @@ namespace API_NetFramework.Controllers
/// Dokumenthandle aus OnBase
/// </returns>
/// <remarks></remarks>
//
public IHttpActionResult ArchivDocBase64(string Dokument, string Dokumenttyp)
{
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
@@ -139,8 +144,36 @@ namespace API_NetFramework.Controllers
return Content(HttpStatusCode.InternalServerError, e.Message);
}
}
[HttpPost]
[Route("API/ArchivSBDoc")]
public IHttpActionResult ArchivSBDoc(string sbnr, string intid, int partnernr )
{
string json = "";
if (HttpContext.Current.Request.InputStream.Length > 0)
{
using (var inputStream = new StreamReader(HttpContext.Current.Request.InputStream))
{
json = inputStream.ReadToEnd();
}
}
string debugfilename = @"X:\\jsontemp\" + sbnr.ToString() + "_" + intid.ToString() + "_"+partnernr.ToString()+".json";
string SendToOnBase = System.Configuration.ConfigurationManager.AppSettings["SendToOnBase"];
string SendToFile = System.Configuration.ConfigurationManager.AppSettings["SendToFile"];
string debugdir = System.Configuration.ConfigurationManager.AppSettings["DebugDir"];
string jsonstring = json;
//jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(od);
if (SendToOnBase != "Yes")
{
if (SendToFile == "Yes")
{
System.IO.File.WriteAllText(debugfilename, jsonstring);
}
}
return Content(HttpStatusCode.OK, "");
}
}
}

View File

@@ -13,6 +13,9 @@
<add key="Bearer" value ="abc"/>
<add key="APIKeys" value="U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+,5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6"/>
<add key="AuthCheck" value="Yes"/>
<add key="SendToOnBase" value="No"/>
<add key="SendToFile" value="Yes"/>
<add key="DebugDir" value="x:\jsontemp"/>
</appSettings>
<connectionStrings>
<add name="EDOKAConnectionstring" connectionString="Data Source=shu01\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29;" />

Binary file not shown.

Binary file not shown.

View File

@@ -13,6 +13,9 @@
<add key="Bearer" value ="abc"/>
<add key="APIKeys" value="U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+,5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6"/>
<add key="AuthCheck" value="Yes"/>
<add key="SendToOnBase" value="No"/>
<add key="SendToFile" value="Yes"/>
<add key="DebugDir" value="x:\jsontemp"/>
</appSettings>
<connectionStrings>
<add name="EDOKAConnectionstring" connectionString="Data Source=shu01\shu00;Initial Catalog=edoka_dms;Persist Security Info=True;User ID=sa;Password=*shu29;" />