update 20241003
This commit is contained in:
@@ -231,12 +231,14 @@
|
|||||||
<Compile Include="Controllers\DocumentController.cs" />
|
<Compile Include="Controllers\DocumentController.cs" />
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\ArchivController.cs" />
|
<Compile Include="Controllers\ArchivController.cs" />
|
||||||
|
<Compile Include="Controllers\TokenController.cs" />
|
||||||
<Compile Include="Controllers\UnterschriftController.cs" />
|
<Compile Include="Controllers\UnterschriftController.cs" />
|
||||||
<Compile Include="Controllers\ValuesController.cs" />
|
<Compile Include="Controllers\ValuesController.cs" />
|
||||||
<Compile Include="Controllers\AntwortAdressController.cs" />
|
<Compile Include="Controllers\AntwortAdressController.cs" />
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Models\StaticParams.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Startup.cs" />
|
<Compile Include="Startup.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -309,7 +311,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
<Folder Include="Models\" />
|
|
||||||
<Folder Include="Views\Unterschrift\" />
|
<Folder Include="Views\Unterschrift\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<IISExpressUseClassicPipelineMode />
|
<IISExpressUseClassicPipelineMode />
|
||||||
<UseGlobalApplicationHostFile />
|
<UseGlobalApplicationHostFile />
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
<Controller_SelectedScaffolderCategoryPath>root/Common</Controller_SelectedScaffolderCategoryPath>
|
||||||
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
|
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
|
||||||
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
|
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
|
||||||
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
|
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Database;
|
using Database;
|
||||||
using DOCGEN;
|
using DOCGEN;
|
||||||
using Model;
|
using Model;
|
||||||
|
using API_NetFramework.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
@@ -15,6 +16,7 @@ namespace API_NetFramework.Controllers
|
|||||||
{
|
{
|
||||||
public class AntwortAdresseController : ApiController
|
public class AntwortAdresseController : ApiController
|
||||||
{
|
{
|
||||||
|
string tokenfunction = "Adresse";
|
||||||
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// GetGetAll liefert alle GAS-Adressen
|
/// GetGetAll liefert alle GAS-Adressen
|
||||||
@@ -27,7 +29,10 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult GetGetAll(string OutFormat = "JSON")
|
public IHttpActionResult GetGetAll(string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) ==false){
|
//string a = SecuringWebApiUsingApiKey.Middleware.StringCipher.Encrypt("Adresse", "OnDoc");
|
||||||
|
//a = SecuringWebApiUsingApiKey.Middleware.StringCipher.Decrypt(a, "OnDoc");
|
||||||
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request,tokenfunction) ==false)
|
||||||
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
@@ -39,7 +44,11 @@ namespace API_NetFramework.Controllers
|
|||||||
db.Get_Tabledata(SQL, false, true);
|
db.Get_Tabledata(SQL, false, true);
|
||||||
return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString());
|
return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString());
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request,e.Message,LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@@ -54,7 +63,7 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult GetByID(string ID,string OutFormat = "JSON")
|
public IHttpActionResult GetByID(string ID,string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -67,7 +76,11 @@ namespace API_NetFramework.Controllers
|
|||||||
db.Get_Tabledata(SQL, false, true);
|
db.Get_Tabledata(SQL, false, true);
|
||||||
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -82,7 +95,7 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult GetAllMitarbeiterByTGNummer(string tgnummer, string OutFormat = "JSON")
|
public IHttpActionResult GetAllMitarbeiterByTGNummer(string tgnummer, string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -95,7 +108,11 @@ namespace API_NetFramework.Controllers
|
|||||||
db.Get_Tabledata(SQL, false, true);
|
db.Get_Tabledata(SQL, false, true);
|
||||||
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/API/AntwortAdresse/GetAllMitarbeiterByMitarbeiterNr")]
|
[Route("API/API/AntwortAdresse/GetAllMitarbeiterByMitarbeiterNr")]
|
||||||
@@ -109,7 +126,7 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult GetAllMitarbeiterByMitarbeiterNr(string Mitarbeiternr, string OutFormat = "JSON")
|
public IHttpActionResult GetAllMitarbeiterByMitarbeiterNr(string Mitarbeiternr, string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -122,7 +139,11 @@ namespace API_NetFramework.Controllers
|
|||||||
db.Get_Tabledata(SQL, false, true);
|
db.Get_Tabledata(SQL, false, true);
|
||||||
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -138,7 +159,8 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult GetMitarbeiterByID(string ID, string OutFormat = "JSON")
|
public IHttpActionResult GetMitarbeiterByID(string ID, string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
|
||||||
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -151,7 +173,11 @@ namespace API_NetFramework.Controllers
|
|||||||
db.Get_Tabledata(SQL, false, true);
|
db.Get_Tabledata(SQL, false, true);
|
||||||
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
if (db.dsdaten.Tables[0].Rows.Count == 0) { return Ok(); } else { return Ok(db.dsdaten.Tables[0].Rows[0][0].ToString()); };
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/API/AntwortAdresse/GetMitarbeiterUndStandard")]
|
[Route("API/API/AntwortAdresse/GetMitarbeiterUndStandard")]
|
||||||
@@ -165,7 +191,7 @@ namespace API_NetFramework.Controllers
|
|||||||
/// public IHttpActionResult GetMitarbeiterByID(string ID, string OutFormat = "JSON")
|
/// public IHttpActionResult GetMitarbeiterByID(string ID, string OutFormat = "JSON")
|
||||||
public IHttpActionResult GetGASAdressen_Einzeilig(string TGNummer, string OutFormat = "JSON")
|
public IHttpActionResult GetGASAdressen_Einzeilig(string TGNummer, string OutFormat = "JSON")
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -185,7 +211,12 @@ namespace API_NetFramework.Controllers
|
|||||||
return Content(HttpStatusCode.OK, db.dsdaten.Tables[0].Rows[0][0].ToString());
|
return Content(HttpStatusCode.OK, db.dsdaten.Tables[0].Rows[0][0].ToString());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ using DOCGEN;
|
|||||||
using Model;
|
using Model;
|
||||||
using Database;
|
using Database;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using API_NetFramework.Models;
|
||||||
|
|
||||||
namespace API_NetFramework.Controllers
|
namespace API_NetFramework.Controllers
|
||||||
{
|
{
|
||||||
@@ -19,7 +20,7 @@ namespace API_NetFramework.Controllers
|
|||||||
public class ArchivController : ApiController
|
public class ArchivController : ApiController
|
||||||
{
|
{
|
||||||
// GET: OnBase
|
// GET: OnBase
|
||||||
|
string tokenfunction = "Archiv";
|
||||||
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Archiviert das Dokument aus OnDoc in OnBase
|
/// Archiviert das Dokument aus OnDoc in OnBase
|
||||||
@@ -35,12 +36,19 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult ArchivDoc_From_Database(string DokumentID)
|
public IHttpActionResult ArchivDoc_From_Database(string DokumentID)
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
|
try
|
||||||
return Ok();
|
{
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@@ -57,12 +65,19 @@ namespace API_NetFramework.Controllers
|
|||||||
/// <remarks></remarks>
|
/// <remarks></remarks>
|
||||||
public IHttpActionResult ArchivDocBase64(string Dokument, string Dokumenttyp)
|
public IHttpActionResult ArchivDocBase64(string Dokument, string Dokumenttyp)
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
|
try
|
||||||
return Ok();
|
{
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CheckDocID prüft auf eine vorhandene DokumentID in OnDoc (DokumentID OFFEDK... / Barcode-Klenber-Nr)
|
/// CheckDocID prüft auf eine vorhandene DokumentID in OnDoc (DokumentID OFFEDK... / Barcode-Klenber-Nr)
|
||||||
@@ -77,7 +92,7 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public IHttpActionResult CheckDocID(string DokumentID)
|
public IHttpActionResult CheckDocID(string DokumentID)
|
||||||
{
|
{
|
||||||
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request) == false)
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
@@ -96,14 +111,33 @@ namespace API_NetFramework.Controllers
|
|||||||
}
|
}
|
||||||
return Content(HttpStatusCode.NotFound, DokumentID);
|
return Content(HttpStatusCode.NotFound, DokumentID);
|
||||||
}
|
}
|
||||||
catch (Exception e) { return Content(HttpStatusCode.InternalServerError, e.Message); }
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("API/ArchivDocFromIRIS")]
|
[Route("API/ArchivDocFromIRIS")]
|
||||||
public IHttpActionResult ArchivDocFromIRIS(string dokumentid)
|
public IHttpActionResult ArchivDocFromIRIS(string dokumentid)
|
||||||
{
|
{
|
||||||
return Ok();
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using DOCGEN;
|
|||||||
using Model;
|
using Model;
|
||||||
using Database;
|
using Database;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using API_NetFramework.Models;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
|
|
||||||
namespace API_NetFramework.Controllers
|
namespace API_NetFramework.Controllers
|
||||||
@@ -20,16 +22,29 @@ namespace API_NetFramework.Controllers
|
|||||||
}
|
}
|
||||||
public class DocumentController : ApiController
|
public class DocumentController : ApiController
|
||||||
{
|
{
|
||||||
|
public string tokenfunction = "Dokument";
|
||||||
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/GetDocument")]
|
[Route("API/GetDocument")]
|
||||||
public IHttpActionResult GetDocument(string dokid)
|
public IHttpActionResult GetDocument(string dokid)
|
||||||
{
|
{
|
||||||
DOCGEN.DocGet gd = new DocGet(connectionstring);
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
clsdok dok = new clsdok("", "", "");
|
{
|
||||||
dok = gd.GetDoc(dokid);
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
return Ok(dok);
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DOCGEN.DocGet gd = new DocGet(connectionstring);
|
||||||
|
clsdok dok = new clsdok("", "", "");
|
||||||
|
dok = gd.GetDoc(dokid);
|
||||||
|
return Ok(dok);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public object pageCollection { get; set; }
|
public object pageCollection { get; set; }
|
||||||
@@ -47,95 +62,136 @@ namespace API_NetFramework.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IHttpActionResult GetDocumentPDF(string dokid)
|
public IHttpActionResult GetDocumentPDF(string dokid)
|
||||||
{
|
{
|
||||||
DOCGEN.DocGet gd = new DocGet(connectionstring);
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
clsdok dok = new clsdok("", "", "");
|
{
|
||||||
dok = gd.GetDocAsPDF(dokid);
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
dok.extension = "pdf";
|
}
|
||||||
dok.doktype = "P";
|
try
|
||||||
return Ok(dok);
|
{
|
||||||
|
DOCGEN.DocGet gd = new DocGet(connectionstring);
|
||||||
|
clsdok dok = new clsdok("", "", "");
|
||||||
|
dok = gd.GetDocAsPDF(dokid);
|
||||||
|
dok.extension = "pdf";
|
||||||
|
dok.doktype = "P";
|
||||||
|
return Ok(dok);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/SendToOnBase")]
|
[Route("API/SendToOnBase")]
|
||||||
public IHttpActionResult SendToOnBase(string dokid)
|
public IHttpActionResult SendToOnBase(string dokid)
|
||||||
{
|
{
|
||||||
DB db = new DB(connectionstring);
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
db.Get_Tabledata("Select * from dokument where dokumentid='" + dokid + "'",false,true);
|
|
||||||
if (db.dsdaten.Tables[0].Rows.Count < 1) {
|
|
||||||
db = null;
|
|
||||||
return BadRequest("Dokument " + dokid + " not found");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
db.Exec_SQL("Update dokument set loeschgrund='Archiviert' where dokumentid='"+dokid + "'");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
db = null;
|
|
||||||
return Ok("Archivierung ausgelöst");
|
|
||||||
}
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DB db = new DB(connectionstring);
|
||||||
|
db.Get_Tabledata("Select * from dokument where dokumentid='" + dokid + "'", false, true);
|
||||||
|
if (db.dsdaten.Tables[0].Rows.Count < 1)
|
||||||
|
{
|
||||||
|
db = null;
|
||||||
|
return BadRequest("Dokument " + dokid + " not found");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
db.Exec_SQL("Update dokument set loeschgrund='Archiviert' where dokumentid='" + dokid + "'");
|
||||||
|
db = null;
|
||||||
|
return Ok("Archivierung ausgelöst");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("API/GenDoc")]
|
[Route("API/GenDoc")]
|
||||||
public IHttpActionResult GenDoc(string Partnernr, String Dokumenttypnr, string TGCreator="", string TGResp="", string TGUL="", string TGUR="", string Faksimile="", string FoU="", string PrintLogo="")
|
public IHttpActionResult GenDoc(string Partnernr, String Dokumenttypnr, string TGCreator="", string TGResp="", string TGUL="", string TGUR="", string Faksimile="", string FoU="", string PrintLogo="")
|
||||||
{
|
{
|
||||||
if (!(ParamCheck("partnernr",Partnernr))) { return BadRequest("Partnernr " + Partnernr + " ist ungültig"); }
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
if (!(ParamCheck("dokumenttyp", Dokumenttypnr))) { return BadRequest("Dokumenttyp " + Dokumenttypnr + " ist ungültig"); }
|
{
|
||||||
if (!(ParamCheck("tgcreator", TGCreator))) { return BadRequest("TGCreator " + TGCreator + " ist ungültig"); }
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
if (!(ParamCheck("tgresp", TGResp))) { return BadRequest("TGResp " + TGResp + " ist ungültig"); }
|
}
|
||||||
if (!(ParamCheck("tgul", TGUL))) { return BadRequest("TG Unterschrift links " + TGUL + " ist ungültig"); }
|
try
|
||||||
if (!(ParamCheck("tgul", TGUR))) { return BadRequest("TG Unterschrift rechts " + TGUR + " ist ungültig"); }
|
{
|
||||||
if (!(ParamCheck("faksimile", Faksimile))) { return BadRequest("Parameter Faxsimile " + Faksimile + " ist ungültig"); }
|
if (!(ParamCheck("partnernr", Partnernr))) { return BadRequest("Partnernr " + Partnernr + " ist ungültig"); }
|
||||||
if (!(ParamCheck("formohneunterschrift", FoU))) { return BadRequest("Parameter Form ohne Unterschrift " + FoU + " ist ungültig"); }
|
if (!(ParamCheck("dokumenttyp", Dokumenttypnr))) { return BadRequest("Dokumenttyp " + Dokumenttypnr + " ist ungültig"); }
|
||||||
if (!(ParamCheck("printlogo", PrintLogo))) { return BadRequest("Parameter PrintLogo " + PrintLogo + " ist ungültig"); }
|
if (!(ParamCheck("tgcreator", TGCreator))) { return BadRequest("TGCreator " + TGCreator + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("tgresp", TGResp))) { return BadRequest("TGResp " + TGResp + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("tgul", TGUL))) { return BadRequest("TG Unterschrift links " + TGUL + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("tgul", TGUR))) { return BadRequest("TG Unterschrift rechts " + TGUR + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("faksimile", Faksimile))) { return BadRequest("Parameter Faxsimile " + Faksimile + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("formohneunterschrift", FoU))) { return BadRequest("Parameter Form ohne Unterschrift " + FoU + " ist ungültig"); }
|
||||||
|
if (!(ParamCheck("printlogo", PrintLogo))) { return BadRequest("Parameter PrintLogo " + PrintLogo + " ist ungültig"); }
|
||||||
|
|
||||||
Database.DB db = new DB(connectionstring);
|
Database.DB db = new DB(connectionstring);
|
||||||
Model.clsdocgendata docgendata = new Model.clsdocgendata();
|
Model.clsdocgendata docgendata = new Model.clsdocgendata();
|
||||||
|
|
||||||
docgendata.partnernr = Partnernr;
|
|
||||||
docgendata.inhaberadresse = "";
|
|
||||||
docgendata.zustelladresse = "";
|
|
||||||
docgendata.dokumenttypnr = Dokumenttypnr;
|
|
||||||
docgendata.unterschriftLinks = db.Get_Mitarbeiternr(TGUL).ToString();
|
|
||||||
docgendata.unterschriftRehts = db.Get_Mitarbeiternr(TGUR).ToString();
|
|
||||||
docgendata.verantwortlich = db.Get_Mitarbeiternr(TGResp).ToString();
|
|
||||||
docgendata.ersteller = db.Get_Mitarbeiternr(TGCreator).ToString();
|
|
||||||
docgendata.team = db.Get_Teamnr(docgendata.ersteller).ToString();
|
|
||||||
docgendata.digitaleunterschrift = false;
|
|
||||||
docgendata.frormularOhneUnterschrift = false;
|
|
||||||
//docgendata.team = "";
|
|
||||||
docgendata.zustaendigkube = db.Get_Mitarbeiternr(TGResp).ToString();
|
|
||||||
docgendata.status = "-1";
|
|
||||||
docgendata.dokumentdatum = DateTime.Now.ToString("dd.MM.yyyy");
|
|
||||||
docgendata.bezeichnung = "";
|
|
||||||
docgendata.erstellungsart= Erstellungsart.DokumentAlsPDF;
|
|
||||||
docgendata.verantwortlich = db.Get_Mitarbeiternr(TGResp).ToString();
|
|
||||||
if (docgendata.verantwortlich=="0") { docgendata.verantwortlich = docgendata.ersteller; }
|
|
||||||
|
|
||||||
clsDocData dokdata = new clsDocData();
|
docgendata.partnernr = Partnernr;
|
||||||
dokdata.PartnerNr = docgendata.partnernr;
|
docgendata.inhaberadresse = "";
|
||||||
dokdata.UseEDOKA_Values = "True";
|
docgendata.zustelladresse = "";
|
||||||
dokdata.DokumenttypNr = docgendata.dokumenttypnr;
|
docgendata.dokumenttypnr = Dokumenttypnr;
|
||||||
dokdata.Unterschrift_Links = docgendata.unterschriftLinks;
|
docgendata.unterschriftLinks = db.Get_Mitarbeiternr(TGUL).ToString();
|
||||||
dokdata.Unterschrift_Rechts = docgendata.unterschriftRehts;
|
docgendata.unterschriftRehts = db.Get_Mitarbeiternr(TGUR).ToString();
|
||||||
dokdata.Verantwortlich = docgendata.verantwortlich;
|
docgendata.verantwortlich = db.Get_Mitarbeiternr(TGResp).ToString();
|
||||||
dokdata.Team = docgendata.team;
|
docgendata.ersteller = db.Get_Mitarbeiternr(TGCreator).ToString();
|
||||||
dokdata.Zustaendig = docgendata.zustaendigkube;
|
docgendata.team = db.Get_Teamnr(docgendata.ersteller).ToString();
|
||||||
dokdata.Zustaendig = docgendata.zustaendigkube;
|
docgendata.digitaleunterschrift = false;
|
||||||
dokdata.Status = docgendata.status;
|
docgendata.frormularOhneUnterschrift = false;
|
||||||
dokdata.Ersteller = docgendata.ersteller;
|
//docgendata.team = "";
|
||||||
dokdata.DokumentDatum = docgendata.dokumentdatum;
|
docgendata.zustaendigkube = db.Get_Mitarbeiternr(TGResp).ToString();
|
||||||
dokdata.Bezeichnung = docgendata.bezeichnung;
|
docgendata.status = "-1";
|
||||||
if (PrintLogo == "Yes") { dokdata.PrintLogo=true; }else { dokdata.PrintLogo=false; }
|
docgendata.dokumentdatum = DateTime.Now.ToString("dd.MM.yyyy");
|
||||||
if (docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF) { dokdata.Result_as_PDF = "True"; } else { dokdata.Result_as_PDF = "False"; }
|
docgendata.bezeichnung = "";
|
||||||
if (docgendata.digitaleunterschrift == true) { dokdata.As_Faksimile = "True"; } else { dokdata.As_Faksimile = "False"; }
|
docgendata.erstellungsart = Erstellungsart.DokumentAlsPDF;
|
||||||
|
docgendata.verantwortlich = db.Get_Mitarbeiternr(TGResp).ToString();
|
||||||
string dokumentid = "";
|
if (docgendata.verantwortlich == "0") { docgendata.verantwortlich = docgendata.ersteller; }
|
||||||
dokumentid = db.Create_EDOKA_Doc(dokdata);
|
|
||||||
|
|
||||||
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(this.connectionstring);
|
clsDocData dokdata = new clsDocData();
|
||||||
clsdok dok = new clsdok("", "", "");
|
dokdata.PartnerNr = docgendata.partnernr;
|
||||||
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
dokdata.UseEDOKA_Values = "True";
|
||||||
db.Save_To_DB(dokumentid, "", dok.dokument);
|
dokdata.DokumenttypNr = docgendata.dokumenttypnr;
|
||||||
return Ok(dokumentid);
|
dokdata.Unterschrift_Links = docgendata.unterschriftLinks;
|
||||||
|
dokdata.Unterschrift_Rechts = docgendata.unterschriftRehts;
|
||||||
|
dokdata.Verantwortlich = docgendata.verantwortlich;
|
||||||
|
dokdata.Team = docgendata.team;
|
||||||
|
dokdata.Zustaendig = docgendata.zustaendigkube;
|
||||||
|
dokdata.Zustaendig = docgendata.zustaendigkube;
|
||||||
|
dokdata.Status = docgendata.status;
|
||||||
|
dokdata.Ersteller = docgendata.ersteller;
|
||||||
|
dokdata.DokumentDatum = docgendata.dokumentdatum;
|
||||||
|
dokdata.Bezeichnung = docgendata.bezeichnung;
|
||||||
|
if (PrintLogo == "Yes") { dokdata.PrintLogo = true; } else { dokdata.PrintLogo = false; }
|
||||||
|
if (docgendata.erstellungsart == Erstellungsart.DokumentAlsPDF) { dokdata.Result_as_PDF = "True"; } else { dokdata.Result_as_PDF = "False"; }
|
||||||
|
if (docgendata.digitaleunterschrift == true) { dokdata.As_Faksimile = "True"; } else { dokdata.As_Faksimile = "False"; }
|
||||||
|
|
||||||
|
string dokumentid = "";
|
||||||
|
dokumentid = db.Create_EDOKA_Doc(dokdata);
|
||||||
|
|
||||||
|
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(this.connectionstring);
|
||||||
|
clsdok dok = new clsdok("", "", "");
|
||||||
|
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
||||||
|
db.Save_To_DB(dokumentid, "", dok.dokument);
|
||||||
|
return Ok(dokumentid);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private bool ParamCheck(string ParamType, string ParamValue)
|
private bool ParamCheck(string ParamType, string ParamValue)
|
||||||
{
|
{
|
||||||
|
|||||||
21
API_NetFramework/Controllers/TokenController.cs
Normal file
21
API_NetFramework/Controllers/TokenController.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace OnDocAPI_NetFramework.Controllers
|
||||||
|
{
|
||||||
|
public class TokenController : ApiController
|
||||||
|
{
|
||||||
|
[HttpGet]
|
||||||
|
[Route("API/Tokengenerator)")]
|
||||||
|
|
||||||
|
public IHttpActionResult TokenGenerator(string function, string pathphrase)
|
||||||
|
{
|
||||||
|
return Ok(SecuringWebApiUsingApiKey.Middleware.StringCipher.Encrypt (function, pathphrase));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,8 +14,7 @@ using System.Net.Http.Headers;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using API_NetFramework.Models;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace API_NetFramework.Controllers
|
namespace API_NetFramework.Controllers
|
||||||
@@ -33,26 +32,41 @@ namespace API_NetFramework.Controllers
|
|||||||
|
|
||||||
public class UnterschriftController : ApiController
|
public class UnterschriftController : ApiController
|
||||||
{
|
{
|
||||||
|
string tokenfunction = "Unterschrift";
|
||||||
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Route("API/GetUnterschriftAsBase64")]
|
[Route("API/GetUnterschriftAsBase64")]
|
||||||
public IHttpActionResult GetUnterschriftAsBase64(string TGNummer)
|
public IHttpActionResult GetUnterschriftAsBase64(string TGNummer)
|
||||||
{
|
{
|
||||||
string path = System.Configuration.ConfigurationManager.AppSettings["UnterschriftPath"];
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
string filename = path + TGNummer + ".jpg";
|
|
||||||
if (!File.Exists(filename))
|
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.NotFound, "Image " + filename + " not found");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
byte[] b = System.IO.File.ReadAllBytes(filename);
|
string path = System.Configuration.ConfigurationManager.AppSettings["UnterschriftPath"];
|
||||||
return Ok(Convert.ToBase64String(b));
|
string filename = path + TGNummer + ".jpg";
|
||||||
} catch (Exception e) {
|
if (!File.Exists(filename))
|
||||||
|
{
|
||||||
|
return Content(HttpStatusCode.NotFound, "Image " + filename + " not found");
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
byte[] b = System.IO.File.ReadAllBytes(filename);
|
||||||
|
return Ok(Convert.ToBase64String(b));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
return Content(HttpStatusCode.InternalServerError, e.Message);
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -60,26 +74,37 @@ namespace API_NetFramework.Controllers
|
|||||||
[Route("API/GetUnterschrift")]
|
[Route("API/GetUnterschrift")]
|
||||||
public IHttpActionResult GetUnterschrift(string TGNummer)
|
public IHttpActionResult GetUnterschrift(string TGNummer)
|
||||||
{
|
{
|
||||||
|
if (SecuringWebApiUsingApiKey.Middleware.ApiKeyMiddleware.Authorized((HttpRequestMessage)Request, tokenfunction) == false)
|
||||||
string path = System.Configuration.ConfigurationManager.AppSettings["UnterschriftPath"];
|
|
||||||
string filename = path + TGNummer + ".jpg";
|
|
||||||
if (!File.Exists(filename))
|
|
||||||
{
|
{
|
||||||
return Content(HttpStatusCode.NotFound, "Image " + filename + " not found");
|
return Content(HttpStatusCode.Unauthorized, "Invalid Token or API-Key");
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var dataBytes = File.ReadAllBytes(@"x:\docdemo\unterschriften\kube.jpg");
|
string path = System.Configuration.ConfigurationManager.AppSettings["UnterschriftPath"];
|
||||||
var dataStream = new MemoryStream(dataBytes);
|
string filename = path + TGNummer + ".jpg";
|
||||||
string imageName = TGNummer + ".jpg";
|
if (!File.Exists(filename))
|
||||||
return new unterschriftResult(dataStream, Request, imageName);
|
{
|
||||||
|
return Content(HttpStatusCode.NotFound, "Image " + filename + " not found");
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dataBytes = File.ReadAllBytes(@"x:\docdemo\unterschriften\kube.jpg");
|
||||||
|
var dataStream = new MemoryStream(dataBytes);
|
||||||
|
string imageName = TGNummer + ".jpg";
|
||||||
|
return new unterschriftResult(dataStream, Request, imageName);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
APILogging.Log((HttpRequestMessage)Request, e.Message, LogLevelType.Error);
|
||||||
return Content(HttpStatusCode.InternalServerError, e.Message);
|
return Content(HttpStatusCode.InternalServerError, e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Database;
|
||||||
|
using API_NetFramework.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -18,6 +20,10 @@ namespace API_NetFramework
|
|||||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||||
|
APILogging.initLogging();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
61
API_NetFramework/Models/StaticParams.cs
Normal file
61
API_NetFramework/Models/StaticParams.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Configuration;
|
||||||
|
using System.Configuration;
|
||||||
|
using Database;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.ComponentModel;
|
||||||
|
|
||||||
|
namespace API_NetFramework.Models
|
||||||
|
{
|
||||||
|
public enum LogLevelType { Info, Warning, Trace, Debug, Error }
|
||||||
|
public static class APILogging
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void initLogging()
|
||||||
|
{
|
||||||
|
if (Logging.Logging.IntLogLevel == "")
|
||||||
|
{
|
||||||
|
string connectionstring = ConfigurationManager.ConnectionStrings["EDOKAConnectionstring"].ConnectionString;
|
||||||
|
DB db = new DB(connectionstring);
|
||||||
|
db.Get_Tabledata("Select * from nlog_parameter where id=3", false, true);
|
||||||
|
Logging.Logging.IntLogLevel = db.dsdaten.Tables[0].Rows[0]["LogLevel"].ToString();
|
||||||
|
Logging.Logging.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
||||||
|
db = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public static void Log(HttpRequestMessage request, string Message, LogLevelType logtype)
|
||||||
|
{
|
||||||
|
string userhost = "";
|
||||||
|
if (request.Properties.ContainsKey("MS_HttpContext"))
|
||||||
|
{
|
||||||
|
userhost = ((HttpContextWrapper)request.Properties["MS_HttpContext"]).Request.UserHostAddress;
|
||||||
|
}
|
||||||
|
switch (logtype)
|
||||||
|
{
|
||||||
|
case LogLevelType.Info:
|
||||||
|
Logging.Logging.Info(Message, request.RequestUri.ToString(), userhost);
|
||||||
|
break;
|
||||||
|
case LogLevelType.Warning:
|
||||||
|
Logging.Logging.Warning(Message, request.RequestUri.ToString(), userhost);
|
||||||
|
break;
|
||||||
|
case LogLevelType.Trace:
|
||||||
|
Logging.Logging.Trance(Message, request.RequestUri.ToString(), userhost);
|
||||||
|
break;
|
||||||
|
case LogLevelType.Debug:
|
||||||
|
Logging.Logging.Debug(Message, request.RequestUri.ToString(), userhost);
|
||||||
|
break;
|
||||||
|
case LogLevelType.Error:
|
||||||
|
Logging.Logging.Error(Message, request.RequestUri.ToString(), userhost);
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,5 +15,6 @@ namespace OnDocAPI_NetFramework
|
|||||||
{
|
{
|
||||||
var a = 1; ;
|
var a = 1; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
<add key="UnterschriftPath" value="x:\docdemo\unterschriften\" />
|
<add key="UnterschriftPath" value="x:\docdemo\unterschriften\" />
|
||||||
<add key="Bearer" value ="abc"/>
|
<add key="Bearer" value ="abc"/>
|
||||||
<add key="APIKeys" value="OnDocEHplewEWbuoNkOGCO1kvoxcHAzsXiJ9qbotaJosOf2zBV2AMlUkOeCsDjxWJrRPpQDRyP2WM83R8bNx7dI8u3A7Zqh1qGQQ7od0lmLNa6HdQv4epmaCytqJDTKu, OnDocFThMC91BXTDhKADoqmDV6yWiWpuSR8uEbhE92feD82jU3uWMeA5nDiAiBorQ5DYx9JFrnMT48wWmIiIQsRRMjjjGDwdGHNiyjufoYUG7dHEWVJ9THlfhZRyHkTy, OnDocqLLhcSJq30Kx2tl28CtBsMxhBMYYdV0vi4hrNOhIyzF3QrEOkiCNF2Fkt4lbVPYIjW6VeBButNniMVlIBozrFpE8NnD44N7cBVVmVKBAvE3xz5wg6oJH8RdRt0q, OnDocExHp86biVL9wTU8WFKWGJzKtOgIxx8NhS7Y4LwuYFsN1gIu3pzXKTf241Poimp9dEDmwflOzZ8svv5j7RJj4Y4vp4JkLic5tK9OsRELhZOxIZFkmHd6tlI8YDiI"/>
|
<add key="APIKeys" value="U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+,5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6"/>
|
||||||
<add key="AuthCheck" value="Yes"/>
|
<add key="AuthCheck" value="Yes"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
@@ -114,4 +114,9 @@
|
|||||||
<remove name="TRACEVerbHandler" />
|
<remove name="TRACEVerbHandler" />
|
||||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||||
</handlers>
|
</handlers>
|
||||||
</system.webServer></configuration>
|
</system.webServer></configuration>
|
||||||
|
|
||||||
|
<!--APIKeys
|
||||||
|
Adresse: U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+
|
||||||
|
Archiv,Dokument,Unterschrift: 5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6
|
||||||
|
-->
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using API_NetFramework.Models;
|
||||||
using Swashbuckle.Application;
|
using Swashbuckle.Application;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -111,14 +112,21 @@ namespace SecuringWebApiUsingApiKey.Middleware
|
|||||||
public static class ApiKeyMiddleware
|
public static class ApiKeyMiddleware
|
||||||
{
|
{
|
||||||
public static string[] apikeys;
|
public static string[] apikeys;
|
||||||
|
|
||||||
public static string GetValue( string key)
|
public static string GetValue( string key)
|
||||||
{
|
{
|
||||||
string res = WebConfigurationManager.AppSettings[key];
|
string res = WebConfigurationManager.AppSettings[key];
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean Authorized(HttpRequestMessage request)
|
private static bool checkfunction(string apikey, string function)
|
||||||
|
{
|
||||||
|
string decryptstring = SecuringWebApiUsingApiKey.Middleware.StringCipher.Decrypt(apikey, "OnDoc01");
|
||||||
|
if ( decryptstring.Contains(function))
|
||||||
|
{ return true; }
|
||||||
|
else return false;
|
||||||
|
}
|
||||||
|
public static Boolean Authorized(HttpRequestMessage request, string function)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (GetValue("AuthCheck") == "Yes")
|
if (GetValue("AuthCheck") == "Yes")
|
||||||
@@ -126,25 +134,27 @@ namespace SecuringWebApiUsingApiKey.Middleware
|
|||||||
apikeys = GetValue("APIKeys").ToString().Split(',');
|
apikeys = GetValue("APIKeys").ToString().Split(',');
|
||||||
IEnumerable<KeyValuePair<string, string>> queryParams = request.GetQueryNameValuePairs();
|
IEnumerable<KeyValuePair<string, string>> queryParams = request.GetQueryNameValuePairs();
|
||||||
var key = queryParams.FirstOrDefault(x => x.Key == "api_key");
|
var key = queryParams.FirstOrDefault(x => x.Key == "api_key");
|
||||||
if (apikeys.Contains(key.Value)) { return true; }
|
if (apikeys.Contains(key.Value) && checkfunction(key.Value,function)==true) { return true; }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IEnumerable<string> headerValues = request.Headers.GetValues("api_key");
|
IEnumerable<string> headerValues = request.Headers.GetValues("api_key");
|
||||||
string apikey = headerValues.FirstOrDefault();
|
string apikey = headerValues.FirstOrDefault();
|
||||||
|
|
||||||
if (apikeys.Contains(apikey)) { return true; }
|
if (apikeys.Contains(apikey) && checkfunction(apikey,function)==true) { return true; }
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (request.Headers.Authorization.Scheme == "Bearer" && apikeys.Contains(request.Headers.Authorization.Parameter.ToString()))
|
if (request.Headers.Authorization.Scheme == "Bearer" && apikeys.Contains(request.Headers.Authorization.Parameter.ToString()) && checkfunction(request.Headers.Authorization.Parameter.ToString(),function)==true)
|
||||||
//== GetValue("Bearer"))
|
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { return false; }
|
catch {
|
||||||
|
APILogging.Log(request, "Unberechtigter Zugriff", LogLevelType.Error);
|
||||||
|
return false; }
|
||||||
}
|
}
|
||||||
|
APILogging.Log(request, "Unberechtigter Zugriff", LogLevelType.Error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//private readonly RequestDelegate _next;
|
//private readonly RequestDelegate _next;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
36
API_NetFramework/bin/NLog.config
Normal file
36
API_NetFramework/bin/NLog.config
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
|
||||||
|
<targets>
|
||||||
|
<target name="console" xsi:type="Console" />
|
||||||
|
<target name="file" xsi:type="File" fileName="${basedir}/log.txt" />
|
||||||
|
<target name="email" xsi:type="Mail"
|
||||||
|
smtpServer="smtp.DomainName.com"
|
||||||
|
smtpAuthentication="Basic"
|
||||||
|
smtpUsername="Username@DomainName.com"
|
||||||
|
smtpPassword =""
|
||||||
|
enableSsl="true"
|
||||||
|
subject="NLog message from system X on ${machinename}"
|
||||||
|
to="Username@DomainName.com"
|
||||||
|
from="Username@DomainName.com" />
|
||||||
|
<target type="Database" name="database" connectionstring="Server=SHU01\SHU00;Database=edoka_journale;User ID=sa;Password=*shu29">
|
||||||
|
<commandText>
|
||||||
|
sp_insert_nlog_api @Origin,@Message,@LogLevel, @UserID, @Div
|
||||||
|
</commandText>
|
||||||
|
<parameter name="@Origin" layout="${gdc:Herkunft}"/>
|
||||||
|
<parameter name="@LogLevel" layout="${level}"/>
|
||||||
|
<parameter name="@message" layout="${message}"/>
|
||||||
|
<parameter name="@UserID" layout="${environment-user}"/>
|
||||||
|
<parameter name="@Div" layout="${gdc:Zusatz}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
</targets>
|
||||||
|
<rules>
|
||||||
|
<!--<logger name="*" levels="Info,Error,Debug,Warn,Trace,Fail" writeTo="console" />-->
|
||||||
|
<logger name="*" levels="Info,Error" writeTo="console" />
|
||||||
|
<logger name="*" levels="Info,Debug,Error" writeTo="file" />
|
||||||
|
<logger name="*" levels="Info,Debug,Error" writeTo="Database" />
|
||||||
|
<!-- <logger name="*" levels="Error" writeTo="email" /> -->
|
||||||
|
</rules>
|
||||||
|
</nlog>
|
||||||
Binary file not shown.
@@ -11,7 +11,7 @@
|
|||||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||||
<add key="UnterschriftPath" value="x:\docdemo\unterschriften\" />
|
<add key="UnterschriftPath" value="x:\docdemo\unterschriften\" />
|
||||||
<add key="Bearer" value ="abc"/>
|
<add key="Bearer" value ="abc"/>
|
||||||
<add key="APIKeys" value="OnDocEHplewEWbuoNkOGCO1kvoxcHAzsXiJ9qbotaJosOf2zBV2AMlUkOeCsDjxWJrRPpQDRyP2WM83R8bNx7dI8u3A7Zqh1qGQQ7od0lmLNa6HdQv4epmaCytqJDTKu, OnDocFThMC91BXTDhKADoqmDV6yWiWpuSR8uEbhE92feD82jU3uWMeA5nDiAiBorQ5DYx9JFrnMT48wWmIiIQsRRMjjjGDwdGHNiyjufoYUG7dHEWVJ9THlfhZRyHkTy, OnDocqLLhcSJq30Kx2tl28CtBsMxhBMYYdV0vi4hrNOhIyzF3QrEOkiCNF2Fkt4lbVPYIjW6VeBButNniMVlIBozrFpE8NnD44N7cBVVmVKBAvE3xz5wg6oJH8RdRt0q, OnDocExHp86biVL9wTU8WFKWGJzKtOgIxx8NhS7Y4LwuYFsN1gIu3pzXKTf241Poimp9dEDmwflOzZ8svv5j7RJj4Y4vp4JkLic5tK9OsRELhZOxIZFkmHd6tlI8YDiI"/>
|
<add key="APIKeys" value="U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+,5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6"/>
|
||||||
<add key="AuthCheck" value="Yes"/>
|
<add key="AuthCheck" value="Yes"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
@@ -114,4 +114,9 @@
|
|||||||
<remove name="TRACEVerbHandler" />
|
<remove name="TRACEVerbHandler" />
|
||||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||||
</handlers>
|
</handlers>
|
||||||
</system.webServer></configuration>
|
</system.webServer></configuration>
|
||||||
|
|
||||||
|
<!--APIKeys
|
||||||
|
Adresse: U3AF12C/o+r8c1fhnk+NkEOduuH9uNH3aZ1AVb0dHN1fxMGLr1s0eKcvoeJ7bPY02ytHD4SjcFb78NiQQyvWtDD+S7noWCyNmaCQkXHMx4LAomlnvnwKPqVs1TQ0qFB+
|
||||||
|
Archiv,Dokument,Unterschrift: 5sPQAPCxiSj+JWf+sWKTYgdTRSXeZJX/Ft2wE5B/SaSPoxPNMvkTgNjbmiK18SNmJ66OPzOM1fEw70R+VZeRWU+5fowTIXAGYLDneikxmK4HnIJku8732xxJ/9EomCZ6
|
||||||
|
-->
|
||||||
Binary file not shown.
21
API_NetFramework/log.txt
Normal file
21
API_NetFramework/log.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
2024-10-02 07:21:40.8505|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 07:43:49.7848|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 07:51:54.2031|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 07:54:17.6795|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 07:59:39.9236|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:05:54.3988|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:05:54.4578|INFO|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:06:55.8367|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:07:29.6017|INFO|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:25:35.6429|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:29:39.0375|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:33:31.1733|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:34:16.4038|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:35:29.7274|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 08:35:52.9374|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 09:07:02.2416|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 10:28:59.5874|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 10:43:43.5554|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 10:48:45.9055|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 11:01:33.4541|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
|
2024-10-02 11:07:36.9066|ERROR|EDOKA|Unberechtigter Zugriff
|
||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
1a456661155b09def0d34c58d83ab25f261280b9a77b3648928636ae4a8c2a1d
|
fd071c09c7dba1a10d40b75954ad2f0d5d3e0976027671a6eb97b96a5125f413
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -82,6 +82,7 @@ namespace OnDoc.DocMgmt
|
|||||||
string dokumentid = docgen.GenDocID(dokdata);
|
string dokumentid = docgen.GenDocID(dokdata);
|
||||||
dokdata.Dokumentid = dokumentid;
|
dokdata.Dokumentid = dokumentid;
|
||||||
this.dokumentid=dokdata.Dokumentid;
|
this.dokumentid=dokdata.Dokumentid;
|
||||||
|
Logging.DocLog.Info("Dokumenterstellung", "frmDokumenterstellung", dokumentid, ucAllgemeineDokumentParam1.partnernr.ToString(), "Dokumenterstellung");
|
||||||
if (dokumentid != "")
|
if (dokumentid != "")
|
||||||
{
|
{
|
||||||
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ namespace OnDoc.DocMgmt
|
|||||||
dokumentid = dokdata.Dokumentid;
|
dokumentid = dokdata.Dokumentid;
|
||||||
if (dokumentid != "")
|
if (dokumentid != "")
|
||||||
{
|
{
|
||||||
|
Logging.DocLog.Info("Dokument erstellt", "Dokumentpaket", dokumentid, uc.partnernr.ToString(), "Dokument erstellt");
|
||||||
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
||||||
clsdok dok = new clsdok("", "", "");
|
clsdok dok = new clsdok("", "", "");
|
||||||
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata);
|
||||||
|
|||||||
@@ -200,6 +200,8 @@ namespace OnDoc.DocMgmt
|
|||||||
string dokumentid = docgen.GenDocID(dokdata);
|
string dokumentid = docgen.GenDocID(dokdata);
|
||||||
dokdata.Dokumentid = dokumentid;
|
dokdata.Dokumentid = dokumentid;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (dokumentid != "")
|
if (dokumentid != "")
|
||||||
{
|
{
|
||||||
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir);
|
||||||
|
|||||||
@@ -78,6 +78,12 @@ namespace OnDoc.Klassen
|
|||||||
Save_File(fc.dokumentid, fc.filename);
|
Save_File(fc.dokumentid, fc.filename);
|
||||||
RemoveFromList(fc.dokumentid);
|
RemoveFromList(fc.dokumentid);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logging.DocLog.Info("Dokument ohne speichern geschlossen", "Processwatch", fc.dokumentid, "", fc.filename);
|
||||||
|
RemoveFromList(fc.dokumentid);
|
||||||
|
return;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,12 +96,13 @@ namespace OnDoc.Klassen
|
|||||||
{
|
{
|
||||||
DB db = new DB(AppParams.connectionstring);
|
DB db = new DB(AppParams.connectionstring);
|
||||||
db.Save_To_DB(dokumentid, filename);
|
db.Save_To_DB(dokumentid, filename);
|
||||||
|
Logging.DocLog.Info("Dokument gespeichert", "Processwatch", dokumentid, "", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool Check_Modified(FileToCheck fc)
|
private static bool Check_Modified(FileToCheck fc)
|
||||||
{
|
{
|
||||||
DateTime lwt = System.IO.File.GetLastWriteTime(fc.filename);
|
DateTime lwt = System.IO.File.GetLastWriteTime(fc.filename);
|
||||||
if ((DateTime.Now - lwt).Seconds > 2)
|
if ((lwt- fc.filedatetime).Seconds > 2)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,13 @@ namespace OnDoc
|
|||||||
public static void InitLogging()
|
public static void InitLogging()
|
||||||
{
|
{
|
||||||
DB db = new DB(AppParams.connectionstring);
|
DB db = new DB(AppParams.connectionstring);
|
||||||
db.Get_Tabledata("Select * from nlog_parameter", false, true);
|
db.Get_Tabledata("Select * from nlog_parameter WHERE ID=1", false, true);
|
||||||
Logging.Logging.IntLogLevel = db.dsdaten.Tables[0].Rows[0]["LogLevel"].ToString();
|
Logging.Logging.IntLogLevel = db.dsdaten.Tables[0].Rows[0]["LogLevel"].ToString();
|
||||||
Logging.Logging.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
Logging.Logging.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
||||||
|
db.Get_Tabledata("Select * from nlog_parameter WHERE ID=2", false, true);
|
||||||
|
Logging.DocLog.IntLogLevel = db.dsdaten.Tables[0].Rows[0]["LogLevel"].ToString();
|
||||||
|
Logging.DocLog.IntUserID = db.dsdaten.Tables[0].Rows[0]["LogUserID"].ToString();
|
||||||
|
|
||||||
db = null;
|
db = null;
|
||||||
}
|
}
|
||||||
public Start()
|
public Start()
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ namespace OnDoc.UIControls
|
|||||||
|
|
||||||
return dok;
|
return dok;
|
||||||
}
|
}
|
||||||
|
Logging.DocLog.Info("Dokument-Vorschau", "OnDoc.DocPreview", dokumentid, "", "Dokument-Vorschau");
|
||||||
return dok;
|
return dok;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -232,6 +232,7 @@ namespace OnDoc.UICintrols
|
|||||||
|
|
||||||
clsdok dok = GetDoc(false);
|
clsdok dok = GetDoc(false);
|
||||||
if (dok.dokument == "") return;
|
if (dok.dokument == "") return;
|
||||||
|
Logging.DocLog.Info("Dokument bearbeiten", "OnDoc.Doklist", selected_dokumentid, "", "Dokument bearbeiten:" + interop.ToString());
|
||||||
OpenDoc(dok, true,interop, runmacros);
|
OpenDoc(dok, true,interop, runmacros);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,6 +544,7 @@ namespace OnDoc.UICintrols
|
|||||||
db.Exec_SQL("Delete from dokument where dokumentid='" + dokumentid + "'");
|
db.Exec_SQL("Delete from dokument where dokumentid='" + dokumentid + "'");
|
||||||
db.Exec_SQL("Delete from dokument_trefferliste where dokumentid='" + dokumentid + "'");
|
db.Exec_SQL("Delete from dokument_trefferliste where dokumentid='" + dokumentid + "'");
|
||||||
db = null;
|
db = null;
|
||||||
|
Logging.DocLog.Info("Dokument gelöscht", "Doklist.Dokument_loeschen", dokumentid, "", "Dokument gelöscht");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ribbonButton1_Click(object sender, EventArgs e)
|
private void ribbonButton1_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@
|
|||||||
subject="NLog message from system X on ${machinename}"
|
subject="NLog message from system X on ${machinename}"
|
||||||
to="Username@DomainName.com"
|
to="Username@DomainName.com"
|
||||||
from="Username@DomainName.com" />
|
from="Username@DomainName.com" />
|
||||||
<target type="Database" name="database" connectionstring="Server=SHU01\SHU00;Database=edoka_journale;User ID=sa;Password=*shu29">
|
<target type="Database" name="OnDoc" connectionstring="Server=SHU01\SHU00;Database=edoka_journale;User ID=sa;Password=*shu29">
|
||||||
<commandText>
|
<commandText>
|
||||||
sp_insert_nlog @Origin,@Message,@LogLevel, @UserID, @Div
|
sp_insert_nlog @Origin,@Message,@LogLevel, @UserID, @Div
|
||||||
</commandText>
|
</commandText>
|
||||||
@@ -24,13 +24,26 @@
|
|||||||
<parameter name="@UserID" layout="${environment-user}"/>
|
<parameter name="@UserID" layout="${environment-user}"/>
|
||||||
<parameter name="@Div" layout="${gdc:Zusatz}"/>
|
<parameter name="@Div" layout="${gdc:Zusatz}"/>
|
||||||
</target>
|
</target>
|
||||||
|
<target type="Database" name="DocLog" connectionstring="Server=SHU01\SHU00;Database=edoka_journale;User ID=sa;Password=*shu29">
|
||||||
|
<commandText>
|
||||||
|
sp_insert_nlog_DOC @Origin,@Message,@LogLevel, @UserID, @docid,@partnernr,@aktion
|
||||||
|
</commandText>
|
||||||
|
<parameter name="@Origin" layout="${gdc:Herkunft}"/>
|
||||||
|
<parameter name="@LogLevel" layout="${level}"/>
|
||||||
|
<parameter name="@message" layout="${message}"/>
|
||||||
|
<parameter name="@UserID" layout="${environment-user}"/>
|
||||||
|
<parameter name="@docid" layout="${gdc:Dokumentid}"/>
|
||||||
|
<parameter name="@partnernr" layout="${gdc:Partnernr}"/>
|
||||||
|
<parameter name="@aktion" layout="${gdc:Aktion}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
</targets>
|
</targets>
|
||||||
<rules>
|
<rules>
|
||||||
<!--<logger name="*" levels="Info,Error,Debug,Warn,Trace,Fail" writeTo="console" />-->
|
<!--<logger name="*" levels="Info,Error,Debug,Warn,Trace,Fail" writeTo="console" />
|
||||||
<logger name="*" levels="Info,Error" writeTo="console" />
|
<logger name="*" levels="Info,Error" writeTo="console" />
|
||||||
<logger name="*" levels="Info,Debug,Error" writeTo="file" />
|
<logger name="*" levels="Info,Debug,Error" writeTo="file" />-->
|
||||||
<logger name="*" levels="Info,Debug,Error" writeTo="Database" />
|
<logger name="OnDoc" levels="Info,Debug,Error,Warning,Trace" writeTo="OnDoc" />
|
||||||
|
<logger name="DocLog" levels="Info,Debug,Error,Warning,Trace" writeTo="DocLog" />
|
||||||
<!-- <logger name="*" levels="Error" writeTo="email" /> -->
|
<!-- <logger name="*" levels="Error" writeTo="email" /> -->
|
||||||
</rules>
|
</rules>
|
||||||
</nlog>
|
</nlog>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -38756,3 +38756,19 @@
|
|||||||
2024-10-01 13:09:24.2028|DEBUG|EDOKA|
|
2024-10-01 13:09:24.2028|DEBUG|EDOKA|
|
||||||
2024-10-01 13:09:24.2679|DEBUG|EDOKA|
|
2024-10-01 13:09:24.2679|DEBUG|EDOKA|
|
||||||
2024-10-01 13:09:24.2739|DEBUG|EDOKA|Start - Ende
|
2024-10-01 13:09:24.2739|DEBUG|EDOKA|Start - Ende
|
||||||
|
2024-10-02 06:56:32.0208|DEBUG|EDOKA|Start
|
||||||
|
2024-10-02 06:56:32.0878|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:56:32.0878|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:56:32.0878|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:56:32.0878|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:56:32.1238|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:56:32.1933|DEBUG|EDOKA|
|
||||||
|
2024-10-02 06:57:03.3339|DEBUG|EDOKA|Start - Ende
|
||||||
|
2024-10-02 07:20:06.7607|DEBUG|EDOKA|Start
|
||||||
|
2024-10-02 07:20:06.8237|DEBUG|EDOKA|
|
||||||
|
2024-10-02 07:20:06.8237|DEBUG|EDOKA|
|
||||||
|
2024-10-02 07:20:06.8237|DEBUG|EDOKA|
|
||||||
|
2024-10-02 07:20:06.8367|DEBUG|EDOKA|
|
||||||
|
2024-10-02 07:20:06.8567|DEBUG|EDOKA|
|
||||||
|
2024-10-02 07:20:06.9217|DEBUG|EDOKA|
|
||||||
|
2024-10-03 11:21:47.3056|DEBUG|EDOKA|Start - Ende
|
||||||
|
|||||||
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.
Binary file not shown.
Binary file not shown.
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
|
|
||||||
</startup>
|
|
||||||
<runtime>
|
|
||||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
|
||||||
</dependentAssembly>
|
|
||||||
<dependentAssembly>
|
|
||||||
<assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" />
|
|
||||||
<bindingRedirect oldVersion="0.0.0.0-26.2462.7.0" newVersion="26.2462.7.0" />
|
|
||||||
</dependentAssembly>
|
|
||||||
</assemblyBinding>
|
|
||||||
</runtime>
|
|
||||||
</configuration>
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,70 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Syncfusion.Grid.Base</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:Syncfusion.NamespaceDoc">
|
|
||||||
<summary>
|
|
||||||
The Syncfusion namespace contains classes that defines the value and reference data types, events and event handlers, interfaces, attributes and processing the exceptions.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:Syncfusion.GridBaseAssembly">
|
|
||||||
<exclude/>
|
|
||||||
<summary>
|
|
||||||
This class holds the name of the Syncfusion.Grid.Base assembly and provides a helper
|
|
||||||
routine that helps with resolving types when loading a serialization stream and when
|
|
||||||
the framework probes for assemblies by reflection.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.GridBaseAssembly.Name">
|
|
||||||
<summary>
|
|
||||||
The full name of this assembly without version information: "Syncfusion.Grid.Base".
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.GridBaseAssembly.Assembly">
|
|
||||||
<summary>
|
|
||||||
A reference to the <see cref="T:System.Reflection.Assembly"/> for the grid assembly.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.GridBaseAssembly.RootNamespace">
|
|
||||||
<summary>
|
|
||||||
The root namespace of this assembly. Used internally for locating resources within the assembly.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.GridBaseAssembly.AssemblyResolver(System.Object,System.ResolveEventArgs)">
|
|
||||||
<summary>
|
|
||||||
This delegate helps with resolving types and can be used as an eventhandler
|
|
||||||
for a <see cref="E:System.AppDomain.AssemblyResolve"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="sender">The source of the event.</param>
|
|
||||||
<param name="e">The event data with information about the type.</param>
|
|
||||||
<returns>A reference to the assembly where the type is located.</returns>
|
|
||||||
<remarks>
|
|
||||||
Use this handler when reading back types from a serialization stream
|
|
||||||
saved with an earlier version of this assembly.
|
|
||||||
</remarks>
|
|
||||||
<example>
|
|
||||||
<code lang="C#">
|
|
||||||
public static GridModel LoadSoap(Stream s)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(GridBaseAssembly.AssemblyResolver);
|
|
||||||
SoapFormatter b = new SoapFormatter();
|
|
||||||
b.AssemblyFormat = FormatterAssemblyStyle.Simple;
|
|
||||||
GridModel t = b.Deserialize(s) as GridModel;
|
|
||||||
t.Modified = false;
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(GridBaseAssembly.AssemblyResolver);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</code>
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,258 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Syncfusion.SpellChecker.Base</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.CustomDictionaryBase">
|
|
||||||
<summary>
|
|
||||||
Represents a class that stores information about custom words
|
|
||||||
</summary>
|
|
||||||
<remarks>
|
|
||||||
Extra words can be stored in custom dictionary. Any words added using ‘Add to dictionary’, is also stored in this custom dictionary.
|
|
||||||
</remarks>
|
|
||||||
<example>
|
|
||||||
var english = new HunspellDictionary();
|
|
||||||
english.Culture = new CultureInfo("en-us");
|
|
||||||
english.DictionaryUri = new Uri("/SpellCheckerDemo;component//english.dic");
|
|
||||||
english.GrammarUri = new Uri("/SpellCheckerDemo;component//english.aff");
|
|
||||||
|
|
||||||
var custom = new CustomDictionary();
|
|
||||||
custom.Culture = new CultureInfo("en-us");
|
|
||||||
english.DictionaryUri = new Uri("/Resources/custom.dic");
|
|
||||||
|
|
||||||
var dictionaries = new DictionaryCollection();
|
|
||||||
dictionaries.Add(english);
|
|
||||||
dictionaries.Add(custom);
|
|
||||||
|
|
||||||
spellChecker.Dictionaries = dictionaries;
|
|
||||||
spellChecker.Culture = new CultureInfo("en-us");
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
<!-- Badly formed XML comment ignored for member "T:Syncfusion.SpellChecker.Base.DictionaryBase" -->
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.DictionaryBase.GetDictionaryStream">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the dictionary uri of a dictionary.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.DictionaryBase.Culture">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the culture of a dictionary.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<!-- Badly formed XML comment ignored for member "T:Syncfusion.SpellChecker.Base.DictionaryCollection" -->
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.GrammarDictionaryBase">
|
|
||||||
<summary>
|
|
||||||
Represents base class that requires base dictionary file with affix file.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.GrammarDictionaryBase.GetGrammarStream">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the grammar uri of a hunspell dictionary.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.GrammarDictionaryBase.DictParser(System.IO.StreamReader,System.Collections.Generic.Dictionary{System.String,Syncfusion.SpellChecker.Base.GrammarRule})">
|
|
||||||
<summary>
|
|
||||||
DictParser generate a list of words by using both .dic and .aff file.
|
|
||||||
</summary>
|
|
||||||
<param name="dictionary"></param>
|
|
||||||
<param name="ruleDictionary"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.HunspellDictionaryBase">
|
|
||||||
<summary>
|
|
||||||
A class that requires base dictionary and affix file. It has algorithm that process file provided and loads words required for dictionary.
|
|
||||||
</summary>
|
|
||||||
<example>
|
|
||||||
var english = new HunspellDictionary();
|
|
||||||
english.Culture = new CultureInfo("en-us");
|
|
||||||
english.DictionaryUri = new Uri("/SpellCheckerDemo;component//english.dic");
|
|
||||||
english.GrammarUri = new Uri("/SpellCheckerDemo;component//english.aff");
|
|
||||||
|
|
||||||
var dictionaries = new DictionaryCollection();
|
|
||||||
dictionaries.Add(english);
|
|
||||||
|
|
||||||
spellChecker.Dictionaries = dictionaries;
|
|
||||||
spellChecker.Culture = new CultureInfo("en-us");
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.HunspellDictionaryBase.GrammerParser(System.IO.StreamReader)">
|
|
||||||
<summary>
|
|
||||||
To create rules from Hunspell .aff file
|
|
||||||
</summary>
|
|
||||||
<param name="grammar"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.IspellDictionaryBase">
|
|
||||||
<summary>
|
|
||||||
A class that requires base dictionary and affix file. It has algorithm that process file provided and loads words required for dictionary.
|
|
||||||
</summary>
|
|
||||||
<example>
|
|
||||||
var french = new IspellDictionary();
|
|
||||||
french.Culture = new CultureInfo("fr");
|
|
||||||
french.DictionaryUri = new Uri("/SpellCheckerDemo;component//french.dic");
|
|
||||||
french.GrammarUri = new Uri("/SpellCheckerDemo;component//french.xlg");
|
|
||||||
|
|
||||||
var dictionaries = new DictionaryCollection();
|
|
||||||
dictionaries.Add(french);
|
|
||||||
|
|
||||||
spellChecker.Dictionaries = dictionaries;
|
|
||||||
spellChecker.Culture = new CultureInfo("fr");
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.IspellDictionaryBase.GrammerParser(System.IO.StreamReader)">
|
|
||||||
<summary>
|
|
||||||
To create rules from Ispell .aff file
|
|
||||||
</summary>
|
|
||||||
<param name="grammar"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.AccuracyLevels">
|
|
||||||
<summary>
|
|
||||||
Represents a list of accuracy levels based on which phonetic matching is executed for filtering suggestions
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.SpellChecker.Base.AccuracyLevels.High">
|
|
||||||
<summary>
|
|
||||||
Represents a high level which filters maximum possible suggestions.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.SpellChecker.Base.AccuracyLevels.Medium">
|
|
||||||
<summary>
|
|
||||||
Represents a medium level which filters matching suggestions.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.SpellChecker.Base.AccuracyLevels.Low">
|
|
||||||
<summary>
|
|
||||||
Represents a most accurate level which filters accurate suggestions only.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.TransmutationHelper.GetTransmutations(System.Char[])">
|
|
||||||
<summary>
|
|
||||||
Returns a list of possible combinations for the given character array
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.VerbalProcessor.GetSimilarSounds(System.String,System.Collections.Generic.List{System.Object},Syncfusion.SpellChecker.Base.AccuracyLevels)">
|
|
||||||
<summary>
|
|
||||||
Returns a list of phonetic suggestions for the given word in specified accuracy level.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.Sorter.Compare(System.Object,System.Object)">
|
|
||||||
<summary>
|
|
||||||
Compares the two objects.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.Sorter.Compare(System.String,System.String)">
|
|
||||||
<summary>
|
|
||||||
Compares the two String values
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.ReverseSorter.Compare(System.String,System.String)">
|
|
||||||
<summary>
|
|
||||||
Compares the two object values.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.ReverseSorter.Reverse(System.String)">
|
|
||||||
<summary>
|
|
||||||
Returns reverse String of input String
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:Syncfusion.SpellChecker.Base.SpellCheckerBase">
|
|
||||||
<summary>
|
|
||||||
SpellChecker base helps to find erroneous spelling in a word and provides suggestions for it.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.#ctor(System.IO.Stream)">
|
|
||||||
<summary>
|
|
||||||
Initializes the instance of SpellChecker base.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.#ctor">
|
|
||||||
<summary>
|
|
||||||
Initializes the instance of SpellChecker base.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.AddWordToDictionary(System.String)">
|
|
||||||
<summary>
|
|
||||||
Adds the word to dictionary word collection
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.HasError(System.String)">
|
|
||||||
<summary>
|
|
||||||
Checks whether the word exists in dictionary
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.GetSuggestions(System.String)">
|
|
||||||
<summary>
|
|
||||||
Returns the suggestions for error word
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.GetAnagrams(System.String)">
|
|
||||||
<summary>
|
|
||||||
Returns the anagrams for error word
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.GetPhoneticWords(System.String)">
|
|
||||||
<summary>
|
|
||||||
Returns the phonetic suggestions for error word in medium accuracy.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.GetPhoneticWords(System.String,Syncfusion.SpellChecker.Base.AccuracyLevels)">
|
|
||||||
<summary>
|
|
||||||
Returns the phonetic suggestions for error word in specified accuracy.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.IsPatternMatch(System.String)">
|
|
||||||
<summary>
|
|
||||||
Returns whether the word matches Email or File name or URL pattern.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.AddWordsInDictionaryStream(System.IO.Stream)">
|
|
||||||
<summary>
|
|
||||||
Adds the word from custom stream to dicitionary collection
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.SpellChecker.Base.SpellCheckerBase.IsInDictionary(System.String)">
|
|
||||||
<summary>
|
|
||||||
To check whether the word is present in dictionart or not.
|
|
||||||
</summary>
|
|
||||||
<param name="word"></param>
|
|
||||||
<returns>Returns a boolean value.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreAlphaNumericWords">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check AlphaNumericWords
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreFileNames">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check file names
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreHtmlTags">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check html tags
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreEmailAddress">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check Email addresses
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreMixedCaseWords">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check mixed case words
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreUpperCaseWords">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check upper case words
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:Syncfusion.SpellChecker.Base.SpellCheckerBase.IgnoreUrl">
|
|
||||||
<summary>
|
|
||||||
Gets or Sets the boolean value to check urls
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
Binary file not shown.
@@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<doc>
|
|
||||||
<assembly>
|
|
||||||
<name>Syncfusion.Tools.Base</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:Syncfusion.ToolsBaseAssembly">
|
|
||||||
<exclude/>
|
|
||||||
<summary>
|
|
||||||
This class holds the name of the Tools assembly and provides a helper
|
|
||||||
routine that helps with resolving types when loading a serialization stream and when the framework probes for assemblies by reflection.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.ToolsBaseAssembly.Name">
|
|
||||||
<summary>
|
|
||||||
The full name of this assembly without version information, e.g. "Syncfusion.Tools".
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.ToolsBaseAssembly.Assembly">
|
|
||||||
<summary>
|
|
||||||
A reference to the <see cref="T:System.Reflection.Assembly"/> for the Tools assembly.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="F:Syncfusion.ToolsBaseAssembly.RootNamespace">
|
|
||||||
<summary>
|
|
||||||
The root namespace of this assembly. Used internally for locating resources within the assembly.
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:Syncfusion.ToolsBaseAssembly.AssemblyResolver(System.Object,System.ResolveEventArgs)">
|
|
||||||
<summary>
|
|
||||||
This delegate helps with resolving types and can be used as an eventhandler
|
|
||||||
for a <see cref="E:System.AppDomain.AssemblyResolve"/> event.
|
|
||||||
</summary>
|
|
||||||
<param name="sender">The source of the event.</param>
|
|
||||||
<param name="e">The event data with information about the type.</param>
|
|
||||||
<returns>A reference to the assembly where the type is located.</returns>
|
|
||||||
<remarks>
|
|
||||||
<para>If the requested assembly is either Tools, Grid, or Shared, this method returns the reference
|
|
||||||
to the corresponding assembly, it is bound to.</para>
|
|
||||||
<para>It's mandatory that you distribute Syncfusion.Grid.dll and Syncfusion.Shared.dll when you use this
|
|
||||||
method in your application.</para>
|
|
||||||
<para>Use this handler when reading back types from a serialization stream
|
|
||||||
saved with an earlier version of this assembly.</para>
|
|
||||||
</remarks>
|
|
||||||
<example>
|
|
||||||
<code lang="C#">
|
|
||||||
public static AToolsType LoadSoap(Stream s)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ToolsAssembly.AssemblyResolver);
|
|
||||||
SoapFormatter b = new SoapFormatter();
|
|
||||||
b.AssemblyFormat = FormatterAssemblyStyle.Simple;
|
|
||||||
AToolsType t = b.Deserialize(s) as AToolsType;
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(ToolsAssembly.AssemblyResolver);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</code>
|
|
||||||
</example>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?><doc>
|
|
||||||
<assembly>
|
|
||||||
<name>System.Buffers</name>
|
|
||||||
</assembly>
|
|
||||||
<members>
|
|
||||||
<member name="T:System.Buffers.ArrayPool`1">
|
|
||||||
<summary>Provides a resource pool that enables reusing instances of type <see cref="T[]"></see>.</summary>
|
|
||||||
<typeparam name="T">The type of the objects that are in the resource pool.</typeparam>
|
|
||||||
</member>
|
|
||||||
<member name="M:System.Buffers.ArrayPool`1.#ctor">
|
|
||||||
<summary>Initializes a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
|
|
||||||
</member>
|
|
||||||
<member name="M:System.Buffers.ArrayPool`1.Create">
|
|
||||||
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
|
|
||||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:System.Buffers.ArrayPool`1.Create(System.Int32,System.Int32)">
|
|
||||||
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class using the specifed configuration.</summary>
|
|
||||||
<param name="maxArrayLength">The maximum length of an array instance that may be stored in the pool.</param>
|
|
||||||
<param name="maxArraysPerBucket">The maximum number of array instances that may be stored in each bucket in the pool. The pool groups arrays of similar lengths into buckets for faster access.</param>
|
|
||||||
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)">
|
|
||||||
<summary>Retrieves a buffer that is at least the requested length.</summary>
|
|
||||||
<param name="minimumLength">The minimum length of the array.</param>
|
|
||||||
<returns>An array of type <see cref="T[]"></see> that is at least <paramref name="minimumLength">minimumLength</paramref> in length.</returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)">
|
|
||||||
<summary>Returns an array to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method on the same <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
|
|
||||||
<param name="array">A buffer to return to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method.</param>
|
|
||||||
<param name="clearArray">Indicates whether the contents of the buffer should be cleared before reuse. If <paramref name="clearArray">clearArray</paramref> is set to true, and if the pool will store the buffer to enable subsequent reuse, the <see cref="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)"></see> method will clear the <paramref name="array">array</paramref> of its contents so that a subsequent caller using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method will not see the content of the previous caller. If <paramref name="clearArray">clearArray</paramref> is set to false or if the pool will release the buffer, the array&#39;s contents are left unchanged.</param>
|
|
||||||
</member>
|
|
||||||
<member name="P:System.Buffers.ArrayPool`1.Shared">
|
|
||||||
<summary>Gets a shared <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
|
|
||||||
<returns>A shared <see cref="System.Buffers.ArrayPool`1"></see> instance.</returns>
|
|
||||||
</member>
|
|
||||||
</members>
|
|
||||||
</doc>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user