You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.0 KiB
61 lines
2.0 KiB
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();
|
|
}
|
|
}
|
|
}
|