update 20241213

This commit is contained in:
Stefan Hutter
2024-12-13 20:39:38 +01:00
parent 67ad74f145
commit 608fc730f0
81 changed files with 822 additions and 55 deletions

View File

@@ -936,10 +936,13 @@ namespace OnDoc.UIControls
private bool Partnerliste_Pruefen()
{
DB db = new DB(AppParams.connectionstring);
//Logging.Logging.Debug("Create sb_chechtable", "OnDoc", "");
db.create_sb_check_table(AppParams.CurrentMitarbieter);
//Logging.Logging.Debug("Save Check_Data", "OnDoc", "");
db.save_sb_checkdata(AppParams.CurrentMitarbieter, sb);
System.Data.DataTable dt = new System.Data.DataTable();
dt = db.Check_sb_Data(AppParams.CurrentMitarbieter, sb);
//Logging.Logging.Debug("Check_sb_Data ", "OnDoc", dt.Rows.Count.ToString());
string msg = "";
init_progressbar("Partnerliste prüfen", dt.Rows.Count);
bool bldossier = false;
@@ -957,6 +960,7 @@ namespace OnDoc.UIControls
foreach (var dr1 in dr)
{
dr1["Status"] = dt.Rows[i]["status"];
// Logging.Logging.Debug("dr1 ", "OnDoc", dr1["Status"].ToString());
try
{
if (Convert.ToInt32(dt.Rows[i]["Fehlercode"]) > 0)
@@ -985,7 +989,7 @@ namespace OnDoc.UIControls
if (Convert.ToInt32(dt.Rows[i][4]) == 1) { bldossier = true; };
}
//Logging.Logging.Debug("Check Duplicates ", "OnDoc", "");
var duplicates = sb.dsempfaenger.Tables[0].AsEnumerable()
.GroupBy(r => r[0])//Using Column Index
.Where(gr => gr.Count() > 1)
@@ -1012,6 +1016,7 @@ namespace OnDoc.UIControls
MessageBox.Show(msg, "Serienbrief", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
//Logging.Logging.Debug("Ende Pruefung", "OnDoc","");
return true;
}
@@ -1049,8 +1054,10 @@ namespace OnDoc.UIControls
private void ribbonButton2_Click(object sender, EventArgs e)
{
lblProgressTitel.Text = "Partnerliste prüfen";
pnlprogress.Visible = true;
//Logging.Logging.Debug("Partnerliste Pruefen", "OnDoc", "");
Partnerliste_Pruefen();
treeViewAdv1_AfterSelect(sender, e);
pnlprogress.Visible = false;
@@ -1806,6 +1813,7 @@ namespace OnDoc.UIControls
}
}
sb.dsempfaenger.AcceptChanges();
update_serienbriefdaten(false);
update_zahlen();
}
catch (Exception ex)