update 20251113
This commit is contained in:
60
Client - Kopie/Diverses/SaveAnsicht.cs
Normal file
60
Client - Kopie/Diverses/SaveAnsicht.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using Database;
|
||||
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;
|
||||
using Syncfusion.Windows.Forms;
|
||||
using Syncfusion.Windows.Forms.Tools;
|
||||
using Syncfusion.WinForms.Controls;
|
||||
|
||||
namespace OnDoc.Diverses
|
||||
{
|
||||
public partial class SaveAnsicht : SfForm
|
||||
{
|
||||
public string selectedtext = "";
|
||||
public int alsStandard = 0;
|
||||
public SaveAnsicht()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Style.TitleBar.BackColor = Theaming.Titelbar();
|
||||
this.Style.TitleBar.ForeColor = Theaming.TitelFontColor();
|
||||
this.Style.ShadowOpacity = Theaming.ShadowOpacity;
|
||||
this.Style.InactiveShadowOpacity = Theaming.InactivShadowOpacity;
|
||||
}
|
||||
|
||||
private void SaveAnsicht_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.SetDesktopLocation(Cursor.Position.X, Cursor.Position.Y);
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
DB dB = new DB(AppParams.connectionstring);
|
||||
dB.Get_Tabledata("Select * from mitarbeiter_gridsettings where bezeichnung = '" + textBox1.Text + "' and mitarbeiterid=" + AppParams.CurrentMitarbeiter.ToString() + " and aktiv=1", false, true);
|
||||
int cnt=dB.dsdaten.Tables[0].Rows.Count;
|
||||
dB = null;
|
||||
if (cnt > 0)
|
||||
{
|
||||
MessageBox.Show("Ansicht mit diesem Namen ist bereits vorhanden. Bitte anpassen", "Ansicht speichern", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
textBox1.Focus();
|
||||
return;
|
||||
}
|
||||
selectedtext = textBox1.Text;
|
||||
if (checkBox1.Checked) { alsStandard = 1; }
|
||||
DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user