update 20250406
This commit is contained in:
@@ -5,6 +5,7 @@ using OnDoc.Diverses;
|
||||
using OnDoc.DocMgmt;
|
||||
using OnDoc.Klassen;
|
||||
using Syncfusion.WinForms.Controls;
|
||||
using Syncfusion.XlsIO;
|
||||
using Syncfusion.XlsIO.Implementation;
|
||||
using System;
|
||||
using System.Data;
|
||||
@@ -40,6 +41,30 @@ namespace OnDoc
|
||||
|
||||
db = null;
|
||||
}
|
||||
private void Delete_Old_Files()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
string[] files = Directory.GetFiles(AppParams.tempdir);
|
||||
|
||||
foreach (string file in files)
|
||||
{
|
||||
FileInfo fi = new FileInfo(file);
|
||||
if (fi.LastAccessTime < DateTime.Now.AddDays(-5))
|
||||
fi.Delete();
|
||||
}
|
||||
foreach (string file in files)
|
||||
{
|
||||
FileInfo fi = new FileInfo(file);
|
||||
if (fi.LastAccessTime < DateTime.Now.AddDays(-5))
|
||||
fi.Delete();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
|
||||
//Delete_Old_Spooler_Files();
|
||||
}
|
||||
public Start()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -53,7 +78,7 @@ namespace OnDoc
|
||||
|
||||
InitLogging();
|
||||
Logging.Logging.Debug("Start", "OnDoc-Client", "");
|
||||
|
||||
Delete_Old_Files();
|
||||
mitarbeiter = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
|
||||
mitarbeiter = mitarbeiter.Substring(mitarbeiter.IndexOf("\\") + 1);
|
||||
AppParams.systemtgnummer = mitarbeiter;
|
||||
|
||||
Reference in New Issue
Block a user