update 20250209

This commit is contained in:
Stefan Hutter
2025-02-09 20:44:54 +01:00
parent c316b40507
commit f8f1404ef9
136 changed files with 549632 additions and 150 deletions

View File

@@ -52,6 +52,8 @@ using Syncfusion.Windows.Forms.CellGrid.ScrollAxis;
using Syncfusion.Windows.Forms.Edit.Utils;
using Syncfusion.WinForms.DataGrid.Serialization;
using NLog.LayoutRenderers;
using Syncfusion.Windows.Forms.PivotAnalysis;
@@ -258,6 +260,7 @@ namespace OnDoc.UICintrols
RibbonFilterLabel.Text = partnernr + " " + db.dsdaten.Tables[0].Rows[0][0].ToString();
RibbonFilterLabel.Visible = true;
RibbonFilterDelete.Visible = true;
ribbonbuttonnewparterdoc.Visible = true;
if (Convert.ToBoolean(db.dsdaten.Tables[0].Rows[0][1])) { RibbonPartnerSaldiert.Visible = true; } else { RibbonPartnerSaldiert.Visible = false; }
refresh_dokumente();
}
@@ -993,7 +996,8 @@ namespace OnDoc.UICintrols
dB = null;
Logging.DocLog.Info("Verantwortung zugewiesen auf " + ma.result.ToString(), "Doklist", selected_dokumentid, selected_partnernr, "Verantwortung zugewiesen");
clsMailer mailer = new clsMailer();
mailer.sendmail(2, ma.result, "", "", selected_dokumentid, "");
mailer.sendmail(102, ma.result, "", "", selected_dokumentid, "",AppParams.CurrentMitarbeiter.ToString(),"");
refresh_dokumente();
}
}
@@ -1053,6 +1057,15 @@ namespace OnDoc.UICintrols
{
try
{
if (e.Column.MappingName == "Prüfung_Rechts")
{
var selectedItem = e.DataRow;
var dataRow = (e.DataRow.RowData as DataRowView).Row;
if (dataRow["Prüfung_Reghts"].ToString().Contains("Abgelehnt")){
e.Style.BackColor = Color.Red;
}
}
//MessageBox.Show(e.Column.MappingName);
if (e.Column.MappingName == "zu_retournieren")
{
@@ -2029,6 +2042,79 @@ namespace OnDoc.UICintrols
private void sfDataGrid1_ToolTipOpening_1(object sender, ToolTipOpeningEventArgs e)
{
switch (e.Column.MappingName.ToLower())
{
case "prüfung_rechts":
if (e.DisplayText.Contains("Abgelehnt"))
{
Syncfusion.Data.RecordEntry record = sfDataGrid1.View.GetRecordAt(e.RowIndex-1);
var a = record.Data;
var b = a as DataRowView;
string x = b["dokumentid"].ToString();
DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("select top 1 betreff, notizgrund, mutiert_am from dokument_bewilligung where dokumentid='" + x + "' and bewilligungstyp=2 and abgelehnt=1 order by mutiert_am desc", false, true);
try
{
Syncfusion.WinForms.Controls.ToolTipItem t = new Syncfusion.WinForms.Controls.ToolTipItem();
t.Text = db.dsdaten.Tables[0].Rows[0]["mutiert_am"].ToString() +
Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["betreff"].ToString() +
Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["Notizgrund"].ToString();
System.Drawing.Font tf = new System.Drawing.Font(t.Style.Font.FontFamily, 10,FontStyle.Bold);
t.Style.TextAlignment = ContentAlignment.MiddleLeft;
t.Style.BackColor = Color.FromArgb(255,102,0);
t.Style.Font = tf;
e.ToolTipInfo.Items.Add(t);
db = null;
}
catch { }
db = null;
}
//var record1 = sfDataGrid1.View.Records.GetItemAt(e.RowIndex);
break;
case "prüfung_links":
if (e.DisplayText.Contains("Abgelehnt"))
{
Syncfusion.Data.RecordEntry record = sfDataGrid1.View.GetRecordAt(e.RowIndex - 1);
var a = record.Data;
var b = a as DataRowView;
string x = b["dokumentid"].ToString();
DB db = new DB(AppParams.connectionstring);
db.Get_Tabledata("select top 1 betreff, notizgrund, mutiert_am from dokument_bewilligung where dokumentid='" + x + "' and bewilligungstyp=2 and abgelehnt=1 order by mutiert_am desc", false, true);
try
{
Syncfusion.WinForms.Controls.ToolTipItem t = new Syncfusion.WinForms.Controls.ToolTipItem();
t.Text = db.dsdaten.Tables[0].Rows[0]["mutiert_am"].ToString() +
Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["betreff"].ToString() +
Environment.NewLine + Environment.NewLine + db.dsdaten.Tables[0].Rows[0]["Notizgrund"].ToString();
System.Drawing.Font tf = new System.Drawing.Font(t.Style.Font.FontFamily, 10, FontStyle.Bold);
t.Style.TextAlignment = ContentAlignment.MiddleLeft;
t.Style.BackColor = Color.FromArgb(255, 102, 0);
t.Style.Font = tf;
e.ToolTipInfo.Items.Add(t);
db = null;
}
catch { }
db = null;
}
break;
}
//System.Drawing.Point p = new System.Drawing.Point(Location.X, Location.Y);
//var rowColIndex = sfDataGrid1.TableControl.PointToCellRowColumnIndex(p);
//var mouseDownRecordIndex = this.sfDataGrid1.TableControl.ResolveToRecordIndex(rowColIndex.RowIndex);
//if (!(mouseDownRecordIndex < 0))
//{
// //if (ObjList.Count != 0)
// // selectedItem = ObjList[mouseDownRecordIndex];
//}
return;
//e.ToolTipInfo.Items.Clear();
//Syncfusion.WinForms.Controls.ToolTipItem tt = new Syncfusion.WinForms.Controls.ToolTipItem();
//tt.Text = "Hallo Du";