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; using OnDoc.Klassen; using Syncfusion.Windows.Forms.Tools; using Syncfusion.WinForms.Controls; namespace OnDoc.DocMgmt { public partial class frmNote : SfForm { public string dokumentid { get; set; } public int notiznr { get; set; } = 0; public string betreff { get; set; } = ""; public string notiz { get; set; } = ""; public frmNote() { InitializeComponent(); this.Style.TitleBar.BackColor = Theaming.Titelbar(); this.Style.TitleBar.ForeColor = Theaming.TitelFontColor(); this.Style.ShadowOpacity = Theaming.ShadowOpacity; this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity; } public frmNote(string dokumentid, string SaveButtonText ="") { InitializeComponent(); this.Style.TitleBar.BackColor = Theaming.Titelbar(); this.Style.TitleBar.ForeColor = Theaming.TitelFontColor(); this.Style.ShadowOpacity = Theaming.ShadowOpacity; this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity; this.dokumentid= dokumentid; if ( SaveButtonText != "" ) {this.button1.Text= SaveButtonText;} } private void frmNote_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Database.DB db = new Database.DB(AppParams.connectionstring); this.notiznr=db.insert_note(AppParams.CurrentMitarbeiter,"",textBox1.Text,dokumentid); this.notiz = textBox1.Text; this.betreff = txtbetreff.Text; DialogResult = DialogResult.OK; } private void button2_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; this.Close(); } } }