updaet 20250123

This commit is contained in:
Stefan Hutter
2025-01-24 16:25:47 +01:00
parent 52a3fecee5
commit 608c67d21b
156 changed files with 2055 additions and 1660 deletions

View File

@@ -36,9 +36,13 @@ namespace OnDoc.DocMgmt
public int DocFunction = 0;
public bool interop { get; set; } = false;
public bool runmacros { get; set; } = false;
public string dokumentid = "";
public string dokumentid { get; set; } = "";
public string filename { get; set; } = "";
public bool editdoc { get; set; } = false;
public Dokumenterstellung()
{
InitializeComponent();
@@ -69,6 +73,15 @@ namespace OnDoc.DocMgmt
Closing += Form_Closing;
}
public Dokumenterstellung(string dokumentid)
{
InitializeComponent();
Broadcaster().AddListener(this);
Closing += Form_Closing;
this.dokumentid=dokumentid;
this.editdoc = true;
}
private void Form_Closing(object sender, CancelEventArgs e)
{
Broadcaster().RemoveListener(this);
@@ -84,7 +97,7 @@ namespace OnDoc.DocMgmt
}
if (message == "AdminDokErstellung")
{
Dokument_Erstellen();
Dokument_Erstellen("",false);
}
@@ -95,10 +108,18 @@ namespace OnDoc.DocMgmt
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
ucAllgemeineDokumentParam1.dokumenttypnr = dokumenttypnr;
ucAllgemeineDokumentParam1.partnernr = partnernr;
ucAllgemeineDokumentParam1.profilnr = profilnr;
ucAllgemeineDokumentParam1.Refresh_Details();
if (dokumentid != "")
{
ucAllgemeineDokumentParam1.dokumentid = dokumentid;
ucAllgemeineDokumentParam1.load_doc();
}
else
{
ucAllgemeineDokumentParam1.dokumenttypnr = dokumenttypnr;
ucAllgemeineDokumentParam1.partnernr = partnernr;
ucAllgemeineDokumentParam1.profilnr = profilnr;
ucAllgemeineDokumentParam1.Refresh_Details();
}
//if (ucAllgemeineDokumentParam1.check_bp_person() == false)
//{
// btnDokumenterstellen.Enabled = false;
@@ -113,11 +134,11 @@ namespace OnDoc.DocMgmt
private void sfButton2_Click(object sender, EventArgs e)
{
Cursor = Cursors.WaitCursor;
Dokument_Erstellen();
Dokument_Erstellen(this.dokumentid,this.editdoc);
Cursor = Cursors.Default;
}
public void Dokument_Erstellen()
public void Dokument_Erstellen(string dokumentid, bool editdoc)
{
this.filename = "";
if (ucAllgemeineDokumentParam1.check_fields()==false) {
@@ -128,7 +149,8 @@ namespace OnDoc.DocMgmt
ucAllgemeineDokumentParam1.update_dokdata(ref dokdata);
DOCGEN.DocGen docgen = new DOCGEN.DocGen(AppParams.connectionstring);
string dokumentid = docgen.GenDocID(dokdata);
dokumentid = docgen.GenDocID(dokdata, editdoc, dokumentid);
dokdata.Dokumentid = dokumentid;
ucAllgemeineDokumentParam1.genertated_dokumentid = dokumentid;
this.dokumentid=dokdata.Dokumentid;
@@ -175,7 +197,7 @@ namespace OnDoc.DocMgmt
DOCGEN.Generator.DocGenerator_from_EDOKA Generator = new DOCGEN.Generator.DocGenerator_from_EDOKA(AppParams.connectionstring, AppParams.tempdir, AppParams.RESTURI, AppParams.apikey,AppParams.Office_Fill_DocIO);
clsdok dok = new clsdok("", "", "");
Logging.Logging.Debug("Generate_Doc_EDOKA", "Dokumenterstellung", dokumentid);
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata, ucAllgemeineDokumentParam1.ErstellungInOffice,AppParams.OfficeSpleep1, AppParams.vbvorlagenmanagement=="Yes");
dok = Generator.Generate_Doc_EDOKA(dokumentid, ref dokdata, ucAllgemeineDokumentParam1.ErstellungInOffice,AppParams.OfficeSpleep1, AppParams.vbvorlagenmanagement=="Yes",this.editdoc);
Logging.Logging.Debug("Generate_Doc_EDOKA - Ende", "Dokumenterstellung", dokumentid);