update 20241008

This commit is contained in:
Stefan Hutter
2024-10-08 20:16:10 +02:00
parent 4fbeb345ee
commit b8a392b514
110 changed files with 2061 additions and 215 deletions

View File

@@ -15,10 +15,13 @@ using Syncfusion.WinForms.DataGrid;
using Syncfusion.WinForms.DataGrid.Interactivity;
using Database;
using OnDoc.UIControls;
using BroadcastListener.Classes;
using BroadcastListener.Interfaces;
using static BroadcastListener.Classes.Factory;
namespace OnDoc.DocMgmt
{
public partial class Dokumenterstellung : SfForm
public partial class Dokumenterstellung : SfForm, IMessageListener1
{
public int partnernr { get; set; } = 0;
public int profilnr { get; set; } = 0;
@@ -34,6 +37,7 @@ namespace OnDoc.DocMgmt
public Dokumenterstellung()
{
InitializeComponent();
Broadcaster().AddListener(this);
}
public Dokumenterstellung(int Partnernr, int Dokumenttpynr, int Profilnr)
@@ -42,6 +46,8 @@ namespace OnDoc.DocMgmt
partnernr = Partnernr;
dokumenttypnr = Dokumenttpynr;
profilnr = Profilnr;
Broadcaster().AddListener(this);
Closing += Form_Closing;
}
public Dokumenterstellung(int Partnernr, int Dokumenttypnr, int Profilnr, string Interaktion, string Showdoc)
@@ -52,7 +58,24 @@ namespace OnDoc.DocMgmt
profilnr = Profilnr;
interaktion= Interaktion;
showdoc = Showdoc;
Broadcaster().AddListener(this);
Closing += Form_Closing;
}
private void Form_Closing(object sender, CancelEventArgs e)
{
Broadcaster().RemoveListener(this);
}
public void OnListen(string message, SenderInfo sender)
{
if (message == "BtnErstellung")
{
if (ucAllgemeineDokumentParam1.uniqid == sender.Details)
{
if (sender.Function == "Disable") { btnDokumenterstellen.Enabled = false; } else { btnDokumenterstellen.Enabled = true; }
}
}
}
private void Dokumenterstellung_Load(object sender, EventArgs e)
{
@@ -62,6 +85,10 @@ namespace OnDoc.DocMgmt
ucAllgemeineDokumentParam1.partnernr = partnernr;
ucAllgemeineDokumentParam1.profilnr = profilnr;
ucAllgemeineDokumentParam1.Refresh_Details();
//if (ucAllgemeineDokumentParam1.check_bp_person() == false)
//{
// btnDokumenterstellen.Enabled = false;
//}
}
@@ -72,7 +99,7 @@ namespace OnDoc.DocMgmt
public void Dokument_Erstellen()
{
if (ucAllgemeineDokumentParam1.check_fields()==false) {
MessageBox.Show(ucAllgemeineDokumentParam1.check_error);
MessageBox.Show(ucAllgemeineDokumentParam1.check_error,"Feldwerte",MessageBoxButtons.OK,MessageBoxIcon.Error);
return; };
ucAllgemeineDokumentParam1.Update_DocGenData();
clsDocData dokdata = new clsDocData();
@@ -103,6 +130,7 @@ namespace OnDoc.DocMgmt
//if (dok.extension.Substring(0,1).ToUpper() == "D") { System.Diagnostics.Process.Start("winword.exe", filename); }
//if (dok.extension.Substring(0, 1).ToUpper() == "X") { System.Diagnostics.Process.Start("excel.exe", filename); }
//clsProcessWatch.AddToList(dokdata.Dokumentid, filename, "Word");
this.Close();
return;
}