Update 20250222
This commit is contained in:
2
Client/Diverses/SplashScreen.Designer.cs
generated
2
Client/Diverses/SplashScreen.Designer.cs
generated
@@ -64,7 +64,7 @@
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(177, 26);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "19. Februar 2025";
|
||||
this.label2.Text = "20. Februar 2025";
|
||||
//
|
||||
// SplashScreen
|
||||
//
|
||||
|
||||
@@ -56,8 +56,10 @@ namespace OnDoc.Klassen
|
||||
bool excel = false;
|
||||
bool pdf = false;
|
||||
bool found = false;
|
||||
watchtimer.Enabled = false;
|
||||
found= false;
|
||||
//watchtimer.Enabled = false;
|
||||
found = false;
|
||||
Logging.Logging.Debug("Start Watch_Process:"+ DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch","" );
|
||||
|
||||
foreach (FileToCheck fc in FilestoCheck)
|
||||
{
|
||||
if (fc.filedatetime < DateTime.Now.AddSeconds(-5))
|
||||
@@ -76,31 +78,34 @@ namespace OnDoc.Klassen
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
Process[] localByName = Process.GetProcessesByName("WINWORD");
|
||||
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
Logging.Logging.Debug(fc.dokumentid + "/" + p.MainWindowTitle, "", "");
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1)
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
|
||||
{
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
break;
|
||||
}
|
||||
{
|
||||
if (p.MainWindowTitle.Trim() != "") { fc.Lastfound = DateTime.Now; }
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (excel)
|
||||
{
|
||||
Process[] localByName = Process.GetProcessesByName("EXCEL");
|
||||
foreach (Process p in localByName)
|
||||
{
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1) {
|
||||
if (p.MainWindowTitle.IndexOf(fc.dokumentid) > -1 || p.MainWindowTitle.Trim() == "")
|
||||
{
|
||||
found = true;
|
||||
save_to_db(fc);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
@@ -127,7 +132,7 @@ namespace OnDoc.Klassen
|
||||
}
|
||||
|
||||
}
|
||||
watchtimer.Enabled = true;
|
||||
//watchtimer.Enabled = true;
|
||||
|
||||
}
|
||||
private static void Remove_Dok_in_Bearbeitung(string dokumentid)
|
||||
@@ -146,7 +151,7 @@ namespace OnDoc.Klassen
|
||||
private static void Remove_Approvals(string dokumentid)
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Exec_SQL("Update dokument_bewilligung set aktiv=0, mutiert_am=getdate(), mutierer="+AppParams.CurrentMitarbeiter.ToString()+" where dokumentid='" + dokumentid + "'");
|
||||
db.Exec_SQL("Update dokument_bewilligung set aktiv=0, mutiert_am=getdate(), mutierer=" + AppParams.CurrentMitarbeiter.ToString() + " where dokumentid='" + dokumentid + "'");
|
||||
db = null;
|
||||
|
||||
}
|
||||
@@ -161,12 +166,12 @@ namespace OnDoc.Klassen
|
||||
Save_File(fc.dokumentid, fc.filename + ".tmp");
|
||||
fc.filedatetime = DateTime.Now;
|
||||
System.IO.File.Delete(fc.filename + ".tmp");
|
||||
Logging.Logging.Debug(fc.application + " / save_to_db " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + "/"+DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
Logging.Logging.Debug(fc.application + " / save_to_db " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + "/" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
Logging.Logging.Debug(fc.application + " / save_to_db faild " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") +"/"+ DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
Logging.Logging.Debug(fc.application + " / save_to_db faild " + fc.filename + " / " + fc.filedatetime.ToString("yyyy-MM-dd hh:mm:ss") + "/" + DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), "OnDoc.Processwatch", fc.dokumentid);
|
||||
|
||||
}
|
||||
|
||||
@@ -176,10 +181,10 @@ namespace OnDoc.Klassen
|
||||
{
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from dokument where dokumentid='" + dokumentid + "'", false, true);
|
||||
|
||||
|
||||
db.Save_To_DB(dokumentid, filename);
|
||||
db.set_approvalstate(dokumentid, false);
|
||||
db.Exec_SQL("Update dokument set mutiertam = getdate(), mutierer="+AppParams.CurrentMitarbeiter+" where dokumentid='"+dokumentid+"'");
|
||||
db.Exec_SQL("Update dokument set mutiertam = getdate(), mutierer=" + AppParams.CurrentMitarbeiter + " where dokumentid='" + dokumentid + "'");
|
||||
Logging.DocLog.Info("Dokument gespeichert", "Processwatch", dokumentid, "", filename);
|
||||
db = null;
|
||||
}
|
||||
@@ -191,7 +196,7 @@ namespace OnDoc.Klassen
|
||||
Logging.Logging.Debug("Prozesswatch - Check Modified: " + lwt.ToString() + "," + fc.filedatetime.ToString(), "OnDoc", fc.dokumentid);
|
||||
//Logging.DocLog.Debug("Prozesswatch - Check Modified: " + lwt.ToString() + "," + fc.filedatetime.ToString(), "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
//if ((lwt- fc.filedatetime).Seconds > 2)
|
||||
if (secdiff > 2)
|
||||
if (secdiff > 2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -213,6 +218,9 @@ namespace OnDoc.Klassen
|
||||
public string filename { get; set; }
|
||||
public string application { get; set; }
|
||||
|
||||
public int counter { get; set; } = 0;
|
||||
public DateTime Lastfound { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime filedatetime { get; set; }
|
||||
|
||||
public FileToCheck(string dokumentid, string filename, string application)
|
||||
@@ -222,7 +230,7 @@ namespace OnDoc.Klassen
|
||||
this.application = application;
|
||||
this.filedatetime = DateTime.Now;
|
||||
//Logging.DocLog.Debug("Add Processwatch: " + DateTime.Now.ToString(), "New FileToCheck", dokumentid, "", "Add Processwatch");
|
||||
Logging.Logging.Debug("Add Processwatch: " + DateTime.Now.ToString(),"OnDoc",this.dokumentid);
|
||||
Logging.Logging.Debug("Add Processwatch: " + DateTime.Now.ToString(), "OnDoc", this.dokumentid);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ using Syncfusion.WinForms.DataGrid.Serialization;
|
||||
using NLog.LayoutRenderers;
|
||||
using Syncfusion.Windows.Forms.PivotAnalysis;
|
||||
using System.Xml.Linq;
|
||||
using Syncfusion.Windows.Forms.Chart;
|
||||
|
||||
|
||||
|
||||
@@ -491,12 +492,26 @@ namespace OnDoc.UICintrols
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
try
|
||||
{
|
||||
if (db.Dok_in_Bearbeitung(3, selected_dokumentid, AppParams.CurrentMitarbeiter) == false)
|
||||
int res = db.Dok_in_Bearbeitung(3, selected_dokumentid, AppParams.CurrentMitarbeiter);
|
||||
switch (res)
|
||||
{
|
||||
MessageBox.Show("Das Dokument wird aktuell bearbeitet.", "Dokumentbearbeitung", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
if (MessageBox.Show("Das Dokument wird aktuell bearbeitet."+Environment.NewLine+ Environment.NewLine + "Sperrung aufheben?" +Environment.NewLine+Environment.NewLine+"Bitte vorgängig prüfen, ob das Dokument nicht mehr in Word/Excel geöffnet ist!","Dokumentsperrung aufheben",MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
clsProcessWatch.RemoveFromList(dokid);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
MessageBox.Show("Das Dokument wird aktuell bearbeitet.", "Dokumentbearbeitung", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
db.Get_Tabledata("Select * from dokument_trefferliste where dokumentid='" + dokid + "'", false, true);
|
||||
if (Convert.ToInt32(db.dsdaten.Tables[0].Rows[0]["Status_Bezeichnungnr"]) == -2)
|
||||
{
|
||||
|
||||
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user