update 20241202
This commit is contained in:
@@ -281,7 +281,7 @@ namespace API_NetFramework.Controllers
|
||||
}
|
||||
|
||||
|
||||
public string DataTableToJsonObj(DataTable dt)
|
||||
private string DataTableToJsonObj(DataTable dt)
|
||||
{
|
||||
DataSet ds = new DataSet();
|
||||
ds.Merge(dt);
|
||||
|
||||
@@ -71,6 +71,50 @@ namespace API_NetFramework.Controllers
|
||||
db = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CheckDocID prüft auf eine vorhandene DokumentID in OnDoc (DokumentID OFFEDK... / Barcode-Klenber-Nr)
|
||||
/// </summary>
|
||||
/// <param name="DokumentID"></param>
|
||||
/// <returns>
|
||||
/// 200: OK
|
||||
/// </returns>
|
||||
/// <remarks></remarks>
|
||||
[HttpGet]
|
||||
[Route("API/CheckDocID")]
|
||||
|
||||
public IHttpActionResult CheckDocID(string DokumentID)
|
||||
{
|
||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||
{
|
||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||
}
|
||||
try
|
||||
{
|
||||
APILogging.Log((HttpRequestMessage)Request, "Start Check DokumentID: DokumentID:" + DokumentID, LogLevelType.Debug);
|
||||
Database.DB db = new Database.DB(connectionstring);
|
||||
db.Get_Tabledata("Select * from dokument where dokumentid = '" + DokumentID + "'", false, true);
|
||||
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
return Ok(DokumentID);
|
||||
}
|
||||
db.Get_Tabledata("Select barcodenr from barcodeetikette where dokumentid='" + DokumentID + "'", false, true);
|
||||
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
return Ok(DokumentID);
|
||||
}
|
||||
APILogging.Log((HttpRequestMessage)Request, "Ende Check DokumentID: DokumentID:" + DokumentID, LogLevelType.Debug);
|
||||
|
||||
return Content(HttpStatusCode.NotFound, DokumentID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Archiviert das Dokument aus OnDoc in OnBase
|
||||
/// </summary>
|
||||
@@ -80,7 +124,7 @@ namespace API_NetFramework.Controllers
|
||||
/// Dokumenthandle aus OnBase
|
||||
/// </returns>
|
||||
/// <remarks></remarks>
|
||||
[HttpGet]
|
||||
[HttpPost]
|
||||
[Route("API/ArchiveDocFromDatabase")]
|
||||
|
||||
public IHttpActionResult ArchivDocFromDatabase(string DokumentID)
|
||||
@@ -190,50 +234,7 @@ namespace API_NetFramework.Controllers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CheckDocID prüft auf eine vorhandene DokumentID in OnDoc (DokumentID OFFEDK... / Barcode-Klenber-Nr)
|
||||
/// </summary>
|
||||
/// <param name="DokumentID"></param>
|
||||
/// <returns>
|
||||
/// 200: OK
|
||||
/// </returns>
|
||||
/// <remarks></remarks>
|
||||
[HttpGet]
|
||||
[Route("API/CheckDocID")]
|
||||
|
||||
public IHttpActionResult CheckDocID(string DokumentID)
|
||||
{
|
||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||
{
|
||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||
}
|
||||
try
|
||||
{
|
||||
APILogging.Log((HttpRequestMessage)Request, "Start Check DokumentID: DokumentID:" + DokumentID, LogLevelType.Debug);
|
||||
Database.DB db = new Database.DB(connectionstring);
|
||||
db.Get_Tabledata("Select * from dokument where dokumentid = '" + DokumentID + "'", false, true);
|
||||
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
return Ok(DokumentID);
|
||||
}
|
||||
db.Get_Tabledata("Select barcodenr from barcodeetikette where dokumentid='" + DokumentID + "'", false, true);
|
||||
if (db.dsdaten.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
return Ok(DokumentID);
|
||||
}
|
||||
APILogging.Log((HttpRequestMessage)Request, "Ende Check DokumentID: DokumentID:" + DokumentID, LogLevelType.Debug);
|
||||
|
||||
return Content(HttpStatusCode.NotFound, DokumentID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Route("API/ArchivDocFromIRIS")]
|
||||
@@ -332,7 +333,7 @@ namespace API_NetFramework.Controllers
|
||||
//return Content(HttpStatusCode.OK, "");
|
||||
}
|
||||
|
||||
public IHttpActionResult Transfer_OnBase(uploadtype utype, ref string jsonstring, ref ILResponse ilr)
|
||||
private IHttpActionResult Transfer_OnBase(uploadtype utype, ref string jsonstring, ref ILResponse ilr)
|
||||
{
|
||||
//ILResponse ilr = new ILResponse();
|
||||
string response;
|
||||
|
||||
@@ -53,17 +53,17 @@ namespace API_NetFramework.Controllers
|
||||
|
||||
}
|
||||
|
||||
public object pageCollection { get; set; }
|
||||
[HttpPost]
|
||||
[Route("API/GetDocumentJSONBody")]
|
||||
public IHttpActionResult GetDocumentJSONBody([FromBody] TestParam tp)
|
||||
{
|
||||
//JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All, PreserveReferencesHandling = PreserveReferencesHandling.None };
|
||||
//var myObject = JsonConvert.DeserializeObject<TestParam>(pageCollection.ToString(), settings);
|
||||
//public object pageCollection { get; set; }
|
||||
//[HttpGet]
|
||||
//[Route("API/GetDocumentJSONBody")]
|
||||
//public IHttpActionResult GetDocumentJSONBody([FromBody] TestParam tp)
|
||||
//{
|
||||
// //JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All, PreserveReferencesHandling = PreserveReferencesHandling.None };
|
||||
// //var myObject = JsonConvert.DeserializeObject<TestParam>(pageCollection.ToString(), settings);
|
||||
|
||||
return Ok(tp.param1);
|
||||
//return Ok(tp.param1.ToString());
|
||||
}
|
||||
// return Ok(tp.param1);
|
||||
// //return Ok(tp.param1.ToString());
|
||||
//}
|
||||
[Route("API/GetDocumentPDF")]
|
||||
[HttpGet]
|
||||
public IHttpActionResult GetDocumentPDF(string dokid)
|
||||
|
||||
@@ -11,15 +11,26 @@ namespace OnDocAPI_NetFramework.Controllers
|
||||
{
|
||||
public class MailController : ApiController
|
||||
{
|
||||
string tokenfunction = "Mail";
|
||||
|
||||
[HttpGet]
|
||||
[Route("API/SendMail")]
|
||||
public IHttpActionResult SendMail(string empfaenger, string betreff, string message, string dokumentid, string ondoclink)
|
||||
{
|
||||
|
||||
APILogging.Log((HttpRequestMessage)Request, "Mailversand: " + empfaenger+""+betreff, LogLevelType.Debug);
|
||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||
{
|
||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||
}
|
||||
if (!empfaenger.ToUpper().Contains("@TKB.CH"))
|
||||
{
|
||||
return Content(HttpStatusCode.Forbidden, empfaenger + ": Email nicht bei der TKB - Mail nicht versandt");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Content(HttpStatusCode.OK, empfaenger + ": Mail versandt");
|
||||
return Content(HttpStatusCode.OK, "Mail versand noch nicht implementiert");
|
||||
//return Content(HttpStatusCode.OK, empfaenger + ": Mail versandt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>E:\Software-Projekte\OnDoc\PubServices\OnDoc</_PublishTargetUrl>
|
||||
<History>True|2024-11-26T18:32:44.7379810Z||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||;</History>
|
||||
<History>True|2024-12-02T08:50:13.5426444Z||;True|2024-12-01T18:53:55.8128003+01:00||;True|2024-11-26T19:32:44.7379810+01:00||;True|2024-11-25T16:02:25.7013060+01:00||;True|2024-11-24T18:56:32.4321643+01:00||;True|2024-11-24T18:48:11.3494435+01:00||;True|2024-11-24T17:50:10.7679996+01:00||;True|2024-11-22T08:35:58.1296657+01:00||;True|2024-11-13T17:47:13.0183160+01:00||;True|2024-11-13T17:46:36.5183689+01:00||;True|2024-11-11T13:42:23.6578245+01:00||;True|2024-11-09T12:11:00.0777236+01:00||;True|2024-11-09T11:54:51.8503924+01:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@@ -82,10 +82,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>09/04/2024 19:25:14</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BarcodeLib.dll">
|
||||
<publishTime>11/25/2024 15:25:12</publishTime>
|
||||
<publishTime>01/12/2024 13:07:40</publishTime>
|
||||
</File>
|
||||
<File Include="bin/BarcodeLib.pdb">
|
||||
<publishTime>11/25/2024 15:25:12</publishTime>
|
||||
<publishTime>01/12/2024 13:07:40</publishTime>
|
||||
</File>
|
||||
<File Include="bin/CSVNET.dll">
|
||||
<publishTime>11/23/2024 19:27:07</publishTime>
|
||||
@@ -94,10 +94,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>11/23/2024 19:27:07</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Database.dll">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Database.pdb">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/de/System.Net.Http.Formatting.resources.dll">
|
||||
<publishTime>10/20/2023 22:35:02</publishTime>
|
||||
@@ -130,13 +130,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>10/20/2023 22:35:04</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DOCGEN.dll">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DOCGEN.dll.config">
|
||||
<publishTime>11/25/2024 07:24:47</publishTime>
|
||||
</File>
|
||||
<File Include="bin/DOCGEN.pdb">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/FastReport.Bars.dll">
|
||||
<publishTime>11/27/2023 09:49:58</publishTime>
|
||||
@@ -214,10 +214,10 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>11/04/2022 19:09:46</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.dll">
|
||||
<publishTime>11/25/2024 16:02:23</publishTime>
|
||||
<publishTime>01/12/2024 18:53:52</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Model.pdb">
|
||||
<publishTime>11/25/2024 16:02:23</publishTime>
|
||||
<publishTime>01/12/2024 18:53:52</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Newtonsoft.Json.Bson.dll">
|
||||
<publishTime>11/28/2018 00:10:18</publishTime>
|
||||
@@ -235,22 +235,22 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>04/30/2024 21:58:24</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OfficePrinter.dll">
|
||||
<publishTime>11/18/2024 17:07:31</publishTime>
|
||||
<publishTime>11/27/2024 13:31:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OfficePrinter.pdb">
|
||||
<publishTime>11/18/2024 17:07:31</publishTime>
|
||||
<publishTime>11/27/2024 13:31:56</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OnDocOffice.dll">
|
||||
<publishTime>11/26/2024 19:32:41</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OnDocOffice.pdb">
|
||||
<publishTime>11/26/2024 19:32:41</publishTime>
|
||||
<publishTime>12/02/2024 09:50:12</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OnDoc_NetFramework.dll">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 10:19:11</publishTime>
|
||||
</File>
|
||||
<File Include="bin/OnDoc_NetFramework.pdb">
|
||||
<publishTime>11/26/2024 19:32:42</publishTime>
|
||||
<publishTime>12/02/2024 10:19:11</publishTime>
|
||||
</File>
|
||||
<File Include="bin/Owin.dll">
|
||||
<publishTime>11/13/2012 13:19:34</publishTime>
|
||||
@@ -634,7 +634,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<publishTime>03/06/2024 08:11:55</publishTime>
|
||||
</File>
|
||||
<File Include="Web.config">
|
||||
<publishTime>11/25/2024 16:02:24</publishTime>
|
||||
<publishTime>01/12/2024 18:53:53</publishTime>
|
||||
</File>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2039,3 +2039,6 @@ Parametername: encoder
|
||||
2024-11-29 07:56:05.2906|DEBUG|OnDoc|Start Updaet IL_Log: DokumentID:SB_53_2
|
||||
2024-11-29 07:56:05.2986|DEBUG|OnDoc|Ende Update IL_Log: DokumentID:SB_53_2
|
||||
2024-11-29 07:56:05.2986|DEBUG|OnDoc|Ende ArchivSBDoc DokumentID: DokumentID:OFFEDK0082024002456495
|
||||
2024-12-02 10:10:04.9111|DEBUG|OnDoc|Mailversand: tet11
|
||||
2024-12-02 10:10:17.1969|DEBUG|OnDoc|Mailversand: test@tkb.ch11
|
||||
2024-12-02 10:11:10.9145|DEBUG|OnDoc|Mailversand: test@tkb.ch324
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
cfbd970a1620d565a6eaba19ea5652f2f3862322af8e217ccf8c8aa9f99a07e0
|
||||
2f33e6a47fdcf24539923bf9e4f71343574271278c4f80e33bb80d6781aff7a8
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,7 @@
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="UnterschriftPath" value="E:\Software-Projekte\OnDoc\Unterschriften\" />
|
||||
<add key="ImagePath" value="E:\Software-Projekte\OnDoc\Images\" />
|
||||
<add key="DemoUnterschrift" value="YES" />
|
||||
<add key="DemoUnterschrift_Links" value="1.png" />
|
||||
<add key="DemoUnterschrift_Rechts" value="2.png" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,6 +10,7 @@
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="UnterschriftPath" value="E:\Software-Projekte\OnDoc\Unterschriften\" />
|
||||
<add key="ImagePath" value="E:\Software-Projekte\OnDoc\Images\" />
|
||||
<add key="DemoUnterschrift" value="YES" />
|
||||
<add key="DemoUnterschrift_Links" value="1.png" />
|
||||
<add key="DemoUnterschrift_Rechts" value="2.png" />
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="UnterschriftPath" value="E:\Software-Projekte\OnDoc\Unterschriften\" />
|
||||
<add key="ImagePath" value="E:\Software-Projekte\OnDoc\Images\" />
|
||||
<add key="DemoUnterschrift" value="YES" />
|
||||
<add key="DemoUnterschrift_Links" value="1.png" />
|
||||
<add key="DemoUnterschrift_Rechts" value="2.png" />
|
||||
|
||||
Reference in New Issue
Block a user