update 20250721

This commit is contained in:
Stefan Hutter
2025-07-21 16:30:53 +02:00
parent df8777631a
commit cb8acfea57
156 changed files with 85153 additions and 113 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;
using Model;
using Newtonsoft.Json;
using static System.Net.WebRequestMethods;
namespace zz_api_doccreate_demo
{
internal class Program
{
static void Main(string[] args)
{
DocCreate doccreate = new DocCreate();
doccreate.APIValues = new List<attribute>();
string debugfilename = @"x:\servicedoc.json";
string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(doccreate);
jsonstring = System.IO.File.ReadAllText(debugfilename);
doccreate = Newtonsoft.Json.JsonConvert.DeserializeObject<DocCreate>(jsonstring);
//doccreate.Partnernr = "1000208";
//doccreate.Result_Versandstrasse = "No";
//doccreate.Result_OnDoc = "Yes";
//doccreate.Result_Sender = "No";
//doccreate.Result_FileType = "WORD";
//doccreate.ConfirmationMail = "No";
//doccreate.ConfirmationMailAddress = "";
//doccreate.VorlagenTypID = "120";
//doccreate.TGNrErsteller = "stefan hutter lokal";
//doccreate.TGNrVerantwortlich = "stefan hutter lokal";
//doccreate.TGNrUnterschriftLinks = "stefan hutter lokal";
//doccreate.TGNrUnterschriftRechts = "";
//doccreate.OhneUnterschrift = "Yes";
//doccreate.FaksimileUnterschrift = "No";
//doccreate.PrintLogo = "No";
//doccreate.Dokumentdatum = "14.07.2025";
//doccreate.Bezeichnung = "Test API-Dokument";
//attribute at = new attribute();
//at.Tag = "APIBetreff";
//at.Value = "Muster-Brief";
//doccreate.APIValues.Add(at);
//attribute at1 = new attribute();
//at1.Tag = "APIAnrede";
//at1.Value = "Guten Tag";
//doccreate.APIValues.Add(at1);
//attribute at2 = new attribute();
//at2.Tag = "APIInhalt";
//at2.Value = "Das ist der Dokument-Inhalt";
//doccreate.APIValues.Add(at2);
//jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(doccreate);
//string debugfilename = @"x:\servicedoc.json";
//System.IO.File.WriteAllText(debugfilename, jsonstring);
send(ref doccreate);
}
static string send(ref DocCreate docCreate)
{
string URL = "https://localhost:44334/API/CreateDoc";
string response;
string jsonstring = JsonConvert.SerializeObject(docCreate);
WebRequest request;
var data = Encoding.UTF8.GetBytes(jsonstring);
request = WebRequest.Create(URL);
request.ContentLength = data.Length;
request.ContentType = "application/json";
request.Method = "POST";
request.Headers["Authorization"] = "Bearer " + "pZkuG6l6ORCEckqQimPK58PO1A9EnkMtL5oCgRX9WiWnD4xeH7ikGzhWnTBy/vk8J4Iiz8gCSx9uFHA4+DvITG0roO97sk82d/0BCjVlwLWINpXlJfGYEF3X96AdoCQvb3ruwv/tVqEHsSU5aNfyxBAe+EhLTHQ8t7ysgJZWh98=";
try
{
using (Stream requestStream = request.GetRequestStream())
{
requestStream.Write(data, 0, data.Length);
requestStream.Close();
using (Stream responseStream = request.GetResponse().GetResponseStream())
{
using (var reader = new StreamReader(responseStream))
{
response = reader.ReadToEnd();
}
}
}
return "";
}
catch (Exception ex)
{
return "";
}
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("zz_api_doccreate_demo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("HP Inc.")]
[assembly: AssemblyProduct("zz_api_doccreate_demo")]
[assembly: AssemblyCopyright("Copyright © HP Inc. 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("2ce7ba2d-a2e2-4089-98ab-74df5356e5a4")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]

View File

@@ -0,0 +1 @@
d281389f67b78c5b38c3f8189785c5233e40d318706c0152b3661237c144b810

View File

@@ -0,0 +1,11 @@
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\zz_api_doccreate_demo.exe.config
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\zz_api_doccreate_demo.exe
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\zz_api_doccreate_demo.pdb
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\Model.dll
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\Newtonsoft.Json.dll
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\bin\Debug\Model.pdb
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\obj\Debug\zz_api_doccreate_demo.csproj.AssemblyReference.cache
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\obj\Debug\zz_api_doccreate_demo.csproj.CoreCompileInputs.cache
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\obj\Debug\zz_api_d.96E711F5.Up2Date
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\obj\Debug\zz_api_doccreate_demo.exe
E:\Software-Projekte\OnDoc\OnDoc\zz_api_doccreate_demo\obj\Debug\zz_api_doccreate_demo.pdb

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2CE7BA2D-A2E2-4089-98AB-74DF5356E5A4}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>zz_api_doccreate_demo</RootNamespace>
<AssemblyName>zz_api_doccreate_demo</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Model">
<HintPath>..\Model\bin\Debug\Model.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Client\bin\Debug\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>