updfate 20250919

This commit is contained in:
Stefan Hutter
2025-09-19 14:20:47 +02:00
parent 98dc8ed0cb
commit d81d620468
2488 changed files with 1833953 additions and 103283 deletions

View File

@@ -16,13 +16,77 @@ namespace zz_api_doccreate_demo
{
static void Main(string[] args)
{
DocCreate doccreate = new DocCreate();
doccreate.APIValues = new List<attribute>();
//createpac();
dokumentcreate();
}
string debugfilename = @"x:\servicedoc.json";
private static void createpac()
{
DokumentCreate paket = new DokumentCreate();
paket.Dokumente = new List<APIDokument>();
paket.Versandstrasse = "No";
paket.Versand_Direkt = "No";
paket.Versand_Option = "";
paket.GAS_Adresse = "";
paket.Result_OnDoc = "Yes";
paket.Result_Sender = "No";
paket.Result_FileType = "WORD";
paket.ConfirmationMail = "No";
paket.ConfirmationMailAddress = "";
add_dokument(ref paket);
add_dokument(ref paket);
string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(paket);
string debugfilename = @"x:\servicepaiket.json";
System.IO.File.WriteAllText(debugfilename, jsonstring);
}
private static void add_dokument(ref DokumentCreate paket)
{
APIDokument apidoc = new APIDokument();
apidoc.VorlagenTypID = "120";
apidoc.Partnernr = "1000208";
apidoc.TGNrErsteller = "stefan hutter lokal";
apidoc.TGNrVerantwortlich = "stefan hutter lokal";
apidoc.TGNrUnterschriftLinks = "stefan hutter lokal";
apidoc.TGNrUnterschriftRechts = "";
apidoc.OhneUnterschrift = "Yes";
apidoc.FaksimileUnterschrift = "No";
apidoc.PrintLogo = "No";
apidoc.Dokumentdatum = "14.07.2025";
apidoc.Bezeichnung = "Test API-Dokument";
apidoc.APIValues = new List<attribute>();
attribute attr = new attribute();
attr.Tag = "API Betreff";
attr.Value = "Musterbrief";
apidoc.APIValues.Add(attr);
attribute attr1 = new attribute();
attr.Tag = "API Anrede";
attr.Value = "Guten Tag";
apidoc.APIValues.Add(attr1);
paket.Dokumente.Add(apidoc);
}
private static void dokumentcreate()
{
DokumentCreate doccreate = new DokumentCreate();
string debugfilename = @"x:\servicepaiket.json";
string jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(doccreate);
jsonstring = System.IO.File.ReadAllText(debugfilename);
doccreate = Newtonsoft.Json.JsonConvert.DeserializeObject<DocCreate>(jsonstring);
doccreate = Newtonsoft.Json.JsonConvert.DeserializeObject<DokumentCreate>(jsonstring);
send(ref doccreate);
}
private static void createdoc() {
//DokumentCreate doccreate = new DokumentCreate();
//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<DokumentCreate>(jsonstring);
//doccreate.Partnernr = "1000208";
//doccreate.Result_Versandstrasse = "No";
//doccreate.Result_OnDoc = "Yes";
@@ -56,14 +120,14 @@ namespace zz_api_doccreate_demo
//jsonstring = Newtonsoft.Json.JsonConvert.SerializeObject(doccreate);
//string debugfilename = @"x:\servicedoc.json";
//System.IO.File.WriteAllText(debugfilename, jsonstring);
send(ref doccreate);
//send(ref doccreate);
}
static string send(ref DocCreate docCreate)
static string send(ref DokumentCreate docCreate)
{
string URL = "https://localhost:44334/API/CreateDoc";
string URL = "https://localhost:44334/API/CreateDoks";
string response;
string jsonstring = JsonConvert.SerializeObject(docCreate);