update 20250729
This commit is contained in:
40
Client/DocMgmt/SerienbriefTemplateLoad.Designer.cs
generated
40
Client/DocMgmt/SerienbriefTemplateLoad.Designer.cs
generated
@@ -33,7 +33,10 @@
|
||||
this.sfButton1 = new Syncfusion.WinForms.Controls.SfButton();
|
||||
this.sfButton2 = new Syncfusion.WinForms.Controls.SfButton();
|
||||
this.sfButton3 = new Syncfusion.WinForms.Controls.SfButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.sfDataGrid1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// sfDataGrid1
|
||||
@@ -42,9 +45,12 @@
|
||||
this.sfDataGrid1.AutoSizeColumnsMode = Syncfusion.WinForms.DataGrid.Enums.AutoSizeColumnsMode.LastColumnFill;
|
||||
this.sfDataGrid1.Location = new System.Drawing.Point(5, 19);
|
||||
this.sfDataGrid1.Name = "sfDataGrid1";
|
||||
this.sfDataGrid1.Size = new System.Drawing.Size(417, 150);
|
||||
this.sfDataGrid1.PreviewRowHeight = 35;
|
||||
this.sfDataGrid1.Size = new System.Drawing.Size(444, 150);
|
||||
this.sfDataGrid1.TabIndex = 0;
|
||||
this.sfDataGrid1.Text = "sfDataGrid1";
|
||||
this.sfDataGrid1.DrawCell += new Syncfusion.WinForms.DataGrid.Events.DrawCellEventHandler(this.sfDataGrid1_DrawCell);
|
||||
this.sfDataGrid1.QueryRowStyle += new Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventHandler(this.sfDataGrid1_QueryRowStyle);
|
||||
this.sfDataGrid1.CellClick += new Syncfusion.WinForms.DataGrid.Events.CellClickEventHandler(this.sfDataGrid1_CellClick);
|
||||
this.sfDataGrid1.CellDoubleClick += new Syncfusion.WinForms.DataGrid.Events.CellClickEventHandler(this.sfDataGrid1_CellDoubleClick);
|
||||
//
|
||||
@@ -52,7 +58,7 @@
|
||||
//
|
||||
this.sfButton1.Enabled = false;
|
||||
this.sfButton1.Font = new System.Drawing.Font("Segoe UI Semibold", 9F);
|
||||
this.sfButton1.Location = new System.Drawing.Point(326, 175);
|
||||
this.sfButton1.Location = new System.Drawing.Point(353, 221);
|
||||
this.sfButton1.Name = "sfButton1";
|
||||
this.sfButton1.Size = new System.Drawing.Size(96, 28);
|
||||
this.sfButton1.TabIndex = 1;
|
||||
@@ -62,7 +68,7 @@
|
||||
// sfButton2
|
||||
//
|
||||
this.sfButton2.Font = new System.Drawing.Font("Segoe UI Semibold", 9F);
|
||||
this.sfButton2.Location = new System.Drawing.Point(5, 175);
|
||||
this.sfButton2.Location = new System.Drawing.Point(5, 221);
|
||||
this.sfButton2.Name = "sfButton2";
|
||||
this.sfButton2.Size = new System.Drawing.Size(96, 28);
|
||||
this.sfButton2.TabIndex = 2;
|
||||
@@ -73,18 +79,38 @@
|
||||
//
|
||||
this.sfButton3.Enabled = false;
|
||||
this.sfButton3.Font = new System.Drawing.Font("Segoe UI Semibold", 9F);
|
||||
this.sfButton3.Location = new System.Drawing.Point(439, 19);
|
||||
this.sfButton3.Location = new System.Drawing.Point(469, 19);
|
||||
this.sfButton3.Name = "sfButton3";
|
||||
this.sfButton3.Size = new System.Drawing.Size(96, 28);
|
||||
this.sfButton3.TabIndex = 3;
|
||||
this.sfButton3.Text = "Löschen";
|
||||
this.sfButton3.Click += new System.EventHandler(this.sfButton3_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(51, 176);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(35, 13);
|
||||
this.label1.TabIndex = 5;
|
||||
this.label1.Text = "label1";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = global::OnDoc.Properties.Resources.Achtung_24x24_32;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(5, 174);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(25, 28);
|
||||
this.pictureBox1.TabIndex = 6;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// SerienbriefTemplateLoad
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(570, 218);
|
||||
this.ClientSize = new System.Drawing.Size(570, 269);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.sfButton3);
|
||||
this.Controls.Add(this.sfButton2);
|
||||
this.Controls.Add(this.sfButton1);
|
||||
@@ -96,7 +122,9 @@
|
||||
this.Text = "Vorlage laden";
|
||||
this.Load += new System.EventHandler(this.SerienbriefTemplateLoad_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.sfDataGrid1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -106,5 +134,7 @@
|
||||
private Syncfusion.WinForms.Controls.SfButton sfButton1;
|
||||
private Syncfusion.WinForms.Controls.SfButton sfButton2;
|
||||
private Syncfusion.WinForms.Controls.SfButton sfButton3;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ using Syncfusion.Windows.Forms.Tools;
|
||||
using Syncfusion.WinForms.Controls;
|
||||
using Database;
|
||||
using System.Security.RightsManagement;
|
||||
using Syncfusion.WinForms.DataGrid.Enums;
|
||||
using NLog.LayoutRenderers.Wrappers;
|
||||
|
||||
namespace OnDoc.DocMgmt
|
||||
{
|
||||
@@ -21,6 +23,7 @@ namespace OnDoc.DocMgmt
|
||||
public string selectedID = "";
|
||||
public string file = "";
|
||||
public string usedfelder = "";
|
||||
string basedokumenttypnr = "";
|
||||
public SerienbriefTemplateLoad()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -30,7 +33,7 @@ namespace OnDoc.DocMgmt
|
||||
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
||||
}
|
||||
|
||||
public SerienbriefTemplateLoad(string mitarbeiternr)
|
||||
public SerienbriefTemplateLoad(string mitarbeiternr, string basedokumenttypnr)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
||||
@@ -38,18 +41,36 @@ namespace OnDoc.DocMgmt
|
||||
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
|
||||
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
||||
this.mitarbeiternr=mitarbeiternr;
|
||||
this.basedokumenttypnr =basedokumenttypnr;
|
||||
|
||||
}
|
||||
private void SerienbriefTemplateLoad_Load(object sender, EventArgs e)
|
||||
{
|
||||
pictureBox1.Visible = false;
|
||||
this.label1.Visible = false;
|
||||
load_data();
|
||||
}
|
||||
private void load_data() {
|
||||
DB db = new DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select ID,Bezeichnung, isnull(usedfelder,'') as UsedFelder from ondoc_sb_vorlage where aktiv=1 and mitarbeiternr="+ mitarbeiternr, false, true);
|
||||
db.Get_Tabledata("Select '0' as S,ID,Bezeichnung, isnull(usedfelder,'') as UsedFelder, case when isnull(doktyp,'') ='' then 'A' else doktyp end as DokTyp from ondoc_sb_vorlage where aktiv=1 and mitarbeiternr="+ mitarbeiternr, false, true);
|
||||
foreach (System.Data.DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||
{
|
||||
if (dr[4].ToString() != basedokumenttypnr)
|
||||
{
|
||||
dr[0] = '1';
|
||||
}
|
||||
else
|
||||
{
|
||||
dr[0] = '2';
|
||||
}
|
||||
}
|
||||
db.dsdaten.Tables[0].AcceptChanges();
|
||||
this.sfDataGrid1.DataSource = db.dsdaten.Tables[0];
|
||||
this.sfDataGrid1.Columns[0].Visible = false;
|
||||
this.sfDataGrid1.Columns[2].Visible = false;
|
||||
this.sfDataGrid1.Columns[1].Visible = false;
|
||||
this.sfDataGrid1.Columns[3].Visible = false;
|
||||
this.sfDataGrid1.Columns[4].Visible = false;
|
||||
this.sfDataGrid1.Columns[0].HeaderText = "";
|
||||
sfDataGrid1.RowHeight = 28;
|
||||
db = null;
|
||||
}
|
||||
|
||||
@@ -110,5 +131,60 @@ namespace OnDoc.DocMgmt
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void sfDataGrid1_DrawCell(object sender, Syncfusion.WinForms.DataGrid.Events.DrawCellEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (e.Column.MappingName == "S")
|
||||
{
|
||||
try
|
||||
{
|
||||
e.Column.CellStyle.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
e.Handled = true;
|
||||
var selectedItem = e.DataRow;
|
||||
var dataRow = (e.DataRow.RowData as DataRowView).Row;
|
||||
|
||||
if (Convert.ToInt32(dataRow["S"]) == 2)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.OK_24x24_32, e.Bounds.X + 10, e.Bounds.Y+2);
|
||||
}
|
||||
if (Convert.ToInt32(dataRow["S"]) == 1)
|
||||
{
|
||||
e.Graphics.DrawImage(OnDoc.Properties.Resources.Achtung_24x24_32, e.Bounds.X + 10, e.Bounds.Y+2);
|
||||
}
|
||||
|
||||
Pen borderPen = new Pen(Color.LightGray);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Right, e.Bounds.Top, e.Bounds.Right, e.Bounds.Bottom);
|
||||
e.Graphics.DrawLine(borderPen, e.Bounds.Left-1, e.Bounds.Bottom, e.Bounds.Right, e.Bounds.Bottom);
|
||||
return;
|
||||
|
||||
}
|
||||
catch { }
|
||||
e.Handled = false;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void sfDataGrid1_QueryRowStyle(object sender, Syncfusion.WinForms.DataGrid.Events.QueryRowStyleEventArgs e)
|
||||
{
|
||||
if (e.RowType == RowType.DefaultRow)
|
||||
{
|
||||
var dataRowView = e.RowData as DataRowView;
|
||||
var dataRow = dataRowView.Row;
|
||||
var cellValue = dataRow[4].ToString();
|
||||
if (cellValue != basedokumenttypnr)
|
||||
{
|
||||
//e.Style.TextColor = Color.Gray;
|
||||
pictureBox1.Visible = true;
|
||||
label1.Visible = true;
|
||||
label1.Text = "Die Vorlage entspricht nicht dem Vorlagentyp des Serienbriefes." + Environment.NewLine;
|
||||
label1.Text = label1.Text + "Das kann sich auf Einstellungen für Versandstrasse, Archivierung usw. auswirken.";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user