up
This commit is contained in:
parent
ae2f615484
commit
4bbe404512
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Artikelverwaltung
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
|
||||||
{
|
{
|
||||||
internal class Artikel
|
internal class Artikel
|
||||||
{
|
{
|
||||||
|
@ -23,7 +17,7 @@ namespace Artikelverwaltung
|
||||||
Artikelgruppe = artikelgruppe;
|
Artikelgruppe = artikelgruppe;
|
||||||
AktivFlag = aktivFlag;
|
AktivFlag = aktivFlag;
|
||||||
}
|
}
|
||||||
public Artikel(uint artikelnummer,string artikelbeschreibung, string modellname, string artikelgruppe, bool aktivFlag)
|
public Artikel(uint artikelnummer, string artikelbeschreibung, string modellname, string artikelgruppe, bool aktivFlag)
|
||||||
{
|
{
|
||||||
_Artikelnummer = artikelnummer;
|
_Artikelnummer = artikelnummer;
|
||||||
Artikelbeschreibung = artikelbeschreibung;
|
Artikelbeschreibung = artikelbeschreibung;
|
||||||
|
@ -41,7 +35,7 @@ namespace Artikelverwaltung
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getter - Setter
|
// Getter - Setter
|
||||||
public uint Artikelnummer { get => _Artikelnummer;}
|
public uint Artikelnummer { get => _Artikelnummer; }
|
||||||
public string Artikelbeschreibung { get => _Artikelbeschreibung; set => _Artikelbeschreibung = value; }
|
public string Artikelbeschreibung { get => _Artikelbeschreibung; set => _Artikelbeschreibung = value; }
|
||||||
public string Modellname { get => _Modellname; set => _Modellname = value; }
|
public string Modellname { get => _Modellname; set => _Modellname = value; }
|
||||||
public string Artikelgruppe { get => _Artikelgruppe; set => _Artikelgruppe = value; }
|
public string Artikelgruppe { get => _Artikelgruppe; set => _Artikelgruppe = value; }
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
using System;
|
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 System.Windows.Forms;
|
||||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
using System;
|
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 System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
@ -27,11 +20,12 @@ namespace Artikelverwaltung
|
||||||
string artikelGruppe = AnlegenTextBoxArtikelGruppe.Text;
|
string artikelGruppe = AnlegenTextBoxArtikelGruppe.Text;
|
||||||
bool aktiveFlag = false;
|
bool aktiveFlag = false;
|
||||||
|
|
||||||
if(checkBoxFlag.CheckState == CheckState.Checked)
|
if (checkBoxFlag.CheckState == CheckState.Checked)
|
||||||
{
|
{
|
||||||
aktiveFlag = true;
|
aktiveFlag = true;
|
||||||
}
|
}
|
||||||
artikelverwaltung.ArtikelAnlegen(artikelBeschreibung, modellName, artikelGruppe, aktiveFlag);
|
artikelverwaltung.ArtikelAnlegen(artikelBeschreibung, modellName, artikelGruppe, aktiveFlag);
|
||||||
|
MessageBox.Show($"{modellName} wurde angelegt!");
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
using MySqlConnector;
|
using MySqlConnector;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Security.Cryptography;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
@ -28,19 +23,19 @@ namespace Artikelverwaltung
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
connection.Open();
|
connection.Open();
|
||||||
cmd.Connection = connection;
|
cmd.Connection = connection;
|
||||||
cmd.CommandText = $"select count(*) as result from mitarbeiter where benutzername = '{bn}' and passwort = '{pw}'";
|
cmd.CommandText = $"select count(*) as result from mitarbeiter where benutzername = '{bn}' and passwort = '{pw}'";
|
||||||
MySqlDataReader reader = cmd.ExecuteReader();
|
MySqlDataReader reader = cmd.ExecuteReader();
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
|
||||||
if(reader["result"].ToString().Equals("1"))
|
|
||||||
{
|
{
|
||||||
connection.Close();
|
if (reader["result"].ToString().Equals("1"))
|
||||||
return true;
|
{
|
||||||
|
connection.Close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
connection.Close();
|
||||||
connection.Close();
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -139,14 +134,14 @@ namespace Artikelverwaltung
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
connection.Open();
|
connection.Open();
|
||||||
cmd.Connection = connection;
|
cmd.Connection = connection;
|
||||||
cmd.CommandText = $"select count(*) as result from artikel";
|
cmd.CommandText = $"select count(*) as result from artikel";
|
||||||
MySqlDataReader reader = cmd.ExecuteReader();
|
MySqlDataReader reader = cmd.ExecuteReader();
|
||||||
while (reader.Read())
|
while (reader.Read())
|
||||||
{
|
{
|
||||||
result = Convert.ToInt32(reader["result"]);
|
result = Convert.ToInt32(reader["result"]);
|
||||||
}
|
}
|
||||||
connection.Close();
|
connection.Close();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -174,7 +169,7 @@ namespace Artikelverwaltung
|
||||||
connection.Close();
|
connection.Close();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//"SQL Error"
|
//"SQL Error"
|
||||||
MessageBox.Show(ex.ToString());
|
MessageBox.Show(ex.ToString());
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
@ -38,7 +31,7 @@ namespace Artikelverwaltung
|
||||||
}
|
}
|
||||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if(checkBox1.CheckState != CheckState.Checked)
|
if (checkBox1.CheckState != CheckState.Checked)
|
||||||
{
|
{
|
||||||
textBoxPasswort.PasswordChar = '*';
|
textBoxPasswort.PasswordChar = '*';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Artikelverwaltung
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
|
||||||
{
|
{
|
||||||
internal class MitarbeiterAccount
|
internal class MitarbeiterAccount
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
namespace Artikelverwaltung
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Artikelverwaltung
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Artikelverwaltung
|
|
||||||
{
|
{
|
||||||
internal class Zugriffsverwaltung
|
internal class Zugriffsverwaltung
|
||||||
{
|
{
|
||||||
|
@ -14,10 +8,10 @@ namespace Artikelverwaltung
|
||||||
{
|
{
|
||||||
bool access = false;
|
bool access = false;
|
||||||
|
|
||||||
if (dbConnection.loginAbgleich(bn,pw))
|
if (dbConnection.loginAbgleich(bn, pw))
|
||||||
{
|
{
|
||||||
access = true;
|
access = true;
|
||||||
}
|
}
|
||||||
return access;
|
return access;
|
||||||
}
|
}
|
||||||
public bool benutzerAnlegen(string bn, string pw)
|
public bool benutzerAnlegen(string bn, string pw)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user