update 20240826
This commit is contained in:
94
Client/UIControls/Approval.cs
Normal file
94
Client/UIControls/Approval.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
using OnDoc.Klassen;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace OnDoc.UIControls
|
||||
{
|
||||
public partial class Approval : UserControl
|
||||
{
|
||||
public Approval()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void treeViewAdv1_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private System.Data.DataTable notes = new System.Data.DataTable();
|
||||
|
||||
private void AddNote(string datum, string betreff, string note, string ersteller )
|
||||
{
|
||||
DataRow dr = notes.NewRow();
|
||||
dr[0] = datum + " / " + betreff;
|
||||
dr[1] = note;
|
||||
dr[2] = ersteller;
|
||||
notes.Rows.Add(dr);
|
||||
}
|
||||
private void treeViewAdv1_NodeMouseClick(object sender, Syncfusion.Windows.Forms.Tools.TreeViewAdvMouseClickEventArgs e)
|
||||
{
|
||||
notes.Rows.Clear(); ;
|
||||
notes.Columns.Clear();
|
||||
notes.AcceptChanges();
|
||||
notes.Columns.Add("Betreff");
|
||||
notes.Columns.Add("Note");
|
||||
notes.Columns.Add("Notewriter");
|
||||
this.docPreview1.Show_Doc(e.Node.Tag as string);
|
||||
Database.DB db = new Database.DB(AppParams.connectionstring);
|
||||
db.Get_Tabledata("Select * from View_Relaunach_Approval_Doc where dokumentid='" + e.Node.Tag as string+"'", false, true);
|
||||
this.txtdokumentid.Text = db.dsdaten.Tables[0].Rows[0]["Dokumentid"].ToString();
|
||||
this.txtbezeichnung.Text = db.dsdaten.Tables[0].Rows[0]["bezeichnung"].ToString();
|
||||
this.txtPartnerNr.Text = db.dsdaten.Tables[0].Rows[0]["nrpar00"].ToString();
|
||||
this.txtPartner.Text = db.dsdaten.Tables[0].Rows[0]["bkpar00"].ToString();
|
||||
this.txterstelltam.Text = db.dsdaten.Tables[0].Rows[0]["erstelltam"].ToString();
|
||||
this.txtersteller.Text = db.dsdaten.Tables[0].Rows[0]["ersteller"].ToString();
|
||||
this.txtmutiertam.Text = db.dsdaten.Tables[0].Rows[0]["mutiertam"].ToString();
|
||||
this.txtmutierer.Text = db.dsdaten.Tables[0].Rows[0]["mutierer"].ToString();
|
||||
this.txtVerantwortlich.Text = db.dsdaten.Tables[0].Rows[0]["verantwortlich"].ToString();
|
||||
|
||||
foreach(DataRow dr in db.dsdaten.Tables[0].Rows)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Convert.ToBoolean(dr["aktiv"]))
|
||||
{
|
||||
AddNote(dr["erstellt_am"].ToString(), dr["betreff"].ToString(), dr["note"].ToString(), dr["Notizersteller"].ToString());
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
sfListView1.DataSource = notes;
|
||||
sfListView1.DisplayMember = "Betreff";
|
||||
sfListView1.ValueMember = "note";
|
||||
|
||||
}
|
||||
|
||||
private void sfListView1_ToolTipOpened(object sender, Syncfusion.WinForms.ListView.Events.ToolTipOpenedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void sfListView1_ToolTipOpening(object sender, Syncfusion.WinForms.ListView.Events.ToolTipOpeningEventArgs e)
|
||||
{
|
||||
var dataRow = (e.ItemData as DataRowView).Row;
|
||||
|
||||
this.txtNote.Text = dataRow["note"].ToString();
|
||||
this.txtnotewriter.Text= dataRow["notewriter"].ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user