Projektdateien hinzufügen.

This commit is contained in:
marcusferl@weifer.de 2022-10-20 10:36:29 +02:00
parent d409e39522
commit 92d0a16d4c
31 changed files with 2595 additions and 0 deletions

25
Artikelverwaltung.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32929.385
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Artikelverwaltung", "Artikelverwaltung\Artikelverwaltung.csproj", "{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8F772B57-43C2-4C5B-8E8F-1112F4C254F5}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class Artikel
{
//Attribute
readonly private uint _Artikelnummer;
private string _Artikelbeschreibung;
private string _Modellname;
private string _Artikelgruppe;
private bool _AktivFlag;
// Konstruktoren
public Artikel(string artikelbeschreibung, string modellname, string artikelgruppe, bool aktivFlag)
{
Artikelbeschreibung = artikelbeschreibung;
Modellname = modellname;
Artikelgruppe = artikelgruppe;
AktivFlag = aktivFlag;
}
public Artikel(uint artikelnummer,string artikelbeschreibung, string modellname, string artikelgruppe, bool aktivFlag)
{
_Artikelnummer = artikelnummer;
Artikelbeschreibung = artikelbeschreibung;
Modellname = modellname;
Artikelgruppe = artikelgruppe;
AktivFlag = aktivFlag;
}
public Artikel(uint artikelnummer)
{
_Artikelnummer = artikelnummer;
}
public Artikel()
{
}
// Getter - Setter
public uint Artikelnummer { get => _Artikelnummer;}
public string Artikelbeschreibung { get => _Artikelbeschreibung; set => _Artikelbeschreibung = value; }
public string Modellname { get => _Modellname; set => _Modellname = value; }
public string Artikelgruppe { get => _Artikelgruppe; set => _Artikelgruppe = value; }
public bool AktivFlag { get => _AktivFlag; set => _AktivFlag = value; }
// Operationen
public void ArtikelSichtbarkeitAendern(bool flag)
{
AktivFlag = flag;
}
public string ArtikelInfo()
{
return $"ArtNr: {Artikelnummer} - Art.Beschreibung: {Artikelbeschreibung} - Modellname: {Modellname} - Gruppe: {Artikelgruppe} - Aktiv: {AktivFlag}";
}
}
}

View File

@ -0,0 +1,176 @@
namespace Artikelverwaltung
{
partial class Artikel_Aendern
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.checkBoxFlag = new System.Windows.Forms.CheckBox();
this.aendernTextBoxArtikelGruppe = new System.Windows.Forms.TextBox();
this.aendernTextBoxModellname = new System.Windows.Forms.TextBox();
this.aendernTextBoxArtikelbeschreibung = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(321, 293);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(145, 48);
this.button1.TabIndex = 19;
this.button1.Text = "Ändern";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// checkBoxFlag
//
this.checkBoxFlag.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBoxFlag.Location = new System.Drawing.Point(235, 230);
this.checkBoxFlag.Name = "checkBoxFlag";
this.checkBoxFlag.Size = new System.Drawing.Size(82, 37);
this.checkBoxFlag.TabIndex = 18;
this.checkBoxFlag.Text = "Aktiv";
this.checkBoxFlag.UseVisualStyleBackColor = true;
//
// aendernTextBoxArtikelGruppe
//
this.aendernTextBoxArtikelGruppe.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.aendernTextBoxArtikelGruppe.Location = new System.Drawing.Point(235, 175);
this.aendernTextBoxArtikelGruppe.Name = "aendernTextBoxArtikelGruppe";
this.aendernTextBoxArtikelGruppe.Size = new System.Drawing.Size(231, 31);
this.aendernTextBoxArtikelGruppe.TabIndex = 17;
//
// aendernTextBoxModellname
//
this.aendernTextBoxModellname.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.aendernTextBoxModellname.Location = new System.Drawing.Point(235, 122);
this.aendernTextBoxModellname.Name = "aendernTextBoxModellname";
this.aendernTextBoxModellname.Size = new System.Drawing.Size(231, 31);
this.aendernTextBoxModellname.TabIndex = 16;
//
// aendernTextBoxArtikelbeschreibung
//
this.aendernTextBoxArtikelbeschreibung.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.aendernTextBoxArtikelbeschreibung.Location = new System.Drawing.Point(235, 70);
this.aendernTextBoxArtikelbeschreibung.Name = "aendernTextBoxArtikelbeschreibung";
this.aendernTextBoxArtikelbeschreibung.Size = new System.Drawing.Size(231, 31);
this.aendernTextBoxArtikelbeschreibung.TabIndex = 15;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(12, 235);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(125, 25);
this.label5.TabIndex = 14;
this.label5.Text = "Aktive Flag:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(12, 181);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(145, 25);
this.label4.TabIndex = 13;
this.label4.Text = "Artikelgruppe:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(12, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(135, 25);
this.label3.TabIndex = 12;
this.label3.Text = "Modellname:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(12, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(208, 25);
this.label2.TabIndex = 11;
this.label2.Text = "Artikelbeschreibung:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(145, 25);
this.label1.TabIndex = 10;
this.label1.Text = "Artikel ändern";
//
// Artikel_Aendern
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.ClientSize = new System.Drawing.Size(494, 360);
this.Controls.Add(this.button1);
this.Controls.Add(this.checkBoxFlag);
this.Controls.Add(this.aendernTextBoxArtikelGruppe);
this.Controls.Add(this.aendernTextBoxModellname);
this.Controls.Add(this.aendernTextBoxArtikelbeschreibung);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "Artikel_Aendern";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Artikel_Aendern";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox checkBoxFlag;
private System.Windows.Forms.TextBox aendernTextBoxArtikelGruppe;
private System.Windows.Forms.TextBox aendernTextBoxModellname;
private System.Windows.Forms.TextBox aendernTextBoxArtikelbeschreibung;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
}
}

View File

@ -0,0 +1,56 @@
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 static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace Artikelverwaltung
{
public partial class Artikel_Aendern : Form
{
Artikel_Verwaltung artikel_Verwaltung;
public System.Windows.Forms.ListView _listView;
public Artikel_Aendern(System.Windows.Forms.ListView listView)
{
_listView = listView;
Artikelverwaltung form = (Artikelverwaltung)Application.OpenForms["Artikelverwaltung"];
InitializeComponent();
artikel_Verwaltung = new Artikel_Verwaltung();
try
{
aendernTextBoxArtikelbeschreibung.Text = _listView.SelectedItems[0].SubItems[1].Text;
aendernTextBoxModellname.Text = _listView.SelectedItems[0].SubItems[2].Text;
aendernTextBoxArtikelGruppe.Text = _listView.SelectedItems[0].SubItems[3].Text;
if (listView.SelectedItems[0].SubItems[4].Text.Equals("True"))
{
checkBoxFlag.Checked = true;
}
}
catch
{
MessageBox.Show("Bitte einen Artikel wählen!");
}
}
private void button1_Click(object sender, EventArgs e)
{
int id = Convert.ToInt16(_listView.SelectedItems[0].Text);
bool aktiveFlag = false;
if (checkBoxFlag.CheckState == CheckState.Checked)
{
aktiveFlag = true;
}
artikel_Verwaltung.ArtikelAktualisieren(id, aendernTextBoxArtikelbeschreibung.Text, aendernTextBoxModellname.Text, aendernTextBoxArtikelGruppe.Text, aktiveFlag);
this.Close();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,176 @@
namespace Artikelverwaltung
{
partial class Artikel_Anlegen
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.anlegenTextBoxArtikelbeschreibung = new System.Windows.Forms.TextBox();
this.AnlegenTextBoxModellname = new System.Windows.Forms.TextBox();
this.AnlegenTextBoxArtikelGruppe = new System.Windows.Forms.TextBox();
this.checkBoxFlag = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(13, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(155, 25);
this.label1.TabIndex = 0;
this.label1.Text = "Artikel anlegen";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(13, 69);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(208, 25);
this.label2.TabIndex = 1;
this.label2.Text = "Artikelbeschreibung:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(13, 121);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(135, 25);
this.label3.TabIndex = 2;
this.label3.Text = "Modellname:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(13, 174);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(145, 25);
this.label4.TabIndex = 3;
this.label4.Text = "Artikelgruppe:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(13, 228);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(125, 25);
this.label5.TabIndex = 4;
this.label5.Text = "Aktive Flag:";
//
// anlegenTextBoxArtikelbeschreibung
//
this.anlegenTextBoxArtikelbeschreibung.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.anlegenTextBoxArtikelbeschreibung.Location = new System.Drawing.Point(236, 63);
this.anlegenTextBoxArtikelbeschreibung.Name = "anlegenTextBoxArtikelbeschreibung";
this.anlegenTextBoxArtikelbeschreibung.Size = new System.Drawing.Size(231, 31);
this.anlegenTextBoxArtikelbeschreibung.TabIndex = 5;
//
// AnlegenTextBoxModellname
//
this.AnlegenTextBoxModellname.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.AnlegenTextBoxModellname.Location = new System.Drawing.Point(236, 115);
this.AnlegenTextBoxModellname.Name = "AnlegenTextBoxModellname";
this.AnlegenTextBoxModellname.Size = new System.Drawing.Size(231, 31);
this.AnlegenTextBoxModellname.TabIndex = 6;
//
// AnlegenTextBoxArtikelGruppe
//
this.AnlegenTextBoxArtikelGruppe.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.AnlegenTextBoxArtikelGruppe.Location = new System.Drawing.Point(236, 168);
this.AnlegenTextBoxArtikelGruppe.Name = "AnlegenTextBoxArtikelGruppe";
this.AnlegenTextBoxArtikelGruppe.Size = new System.Drawing.Size(231, 31);
this.AnlegenTextBoxArtikelGruppe.TabIndex = 7;
//
// checkBoxFlag
//
this.checkBoxFlag.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBoxFlag.Location = new System.Drawing.Point(236, 223);
this.checkBoxFlag.Name = "checkBoxFlag";
this.checkBoxFlag.Size = new System.Drawing.Size(82, 37);
this.checkBoxFlag.TabIndex = 8;
this.checkBoxFlag.Text = "Aktiv";
this.checkBoxFlag.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(322, 286);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(145, 48);
this.button1.TabIndex = 9;
this.button1.Text = "Anlegen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Artikel_Anlegen
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.ClientSize = new System.Drawing.Size(500, 346);
this.Controls.Add(this.button1);
this.Controls.Add(this.checkBoxFlag);
this.Controls.Add(this.AnlegenTextBoxArtikelGruppe);
this.Controls.Add(this.AnlegenTextBoxModellname);
this.Controls.Add(this.anlegenTextBoxArtikelbeschreibung);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "Artikel_Anlegen";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Artikel_Anlegen";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox anlegenTextBoxArtikelbeschreibung;
private System.Windows.Forms.TextBox AnlegenTextBoxModellname;
private System.Windows.Forms.TextBox AnlegenTextBoxArtikelGruppe;
private System.Windows.Forms.CheckBox checkBoxFlag;
private System.Windows.Forms.Button button1;
}
}

View File

@ -0,0 +1,49 @@
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 Artikelverwaltung
{
public partial class Artikel_Anlegen : Form
{
Artikel_Verwaltung artikelverwaltung;
public Artikel_Anlegen()
{
InitializeComponent();
artikelverwaltung = new Artikel_Verwaltung();
}
private void button1_Click(object sender, EventArgs e)
{
string artikelBeschreibung = anlegenTextBoxArtikelbeschreibung.Text;
string modellName = AnlegenTextBoxModellname.Text;
string artikelGruppe = AnlegenTextBoxArtikelGruppe.Text;
bool aktiveFlag = false;
if(checkBoxFlag.CheckState == CheckState.Checked)
{
aktiveFlag = true;
}
try
{
artikelverwaltung.ArtikelAnlegen(artikelBeschreibung, modellName, artikelGruppe, aktiveFlag);
MessageBox.Show("Erfolgreich angelegt!");
this.Close();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString()); ;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class Artikel_Verwaltung
{
Database database;
public List<Artikel> Artikelliste = new List<Artikel>();
public Artikel_Verwaltung()
{
database = new Database();
}
// Objekt wird erzeugt und an die Datenbank weiter gereicht
public void ArtikelAnlegen(string Modellname, string Artikelbeschreibung, string Artikelgruppe, bool aktiv)
{
Artikel artikel = new Artikel(Modellname, Artikelbeschreibung, Artikelgruppe, aktiv);
database.ArtikelAnlegen(artikel);
}
// Löschen über die Artikelnummer
public void ArtikelLoeschen(int ArtikelID)
{
database.ArtikelLoeschen(ArtikelID);
}
// Update eines Artikels in der Datenbank
public void ArtikelAktualisieren(int ArtikelId,string Artikelbeschreibung, string Modellname, string ArtikelGruppe, bool aktiv)
{
Artikel artikel = new Artikel(Artikelbeschreibung, Modellname, ArtikelGruppe, aktiv);
database.ArtikelAendern(artikel, ArtikelId);
}
// Alle Artikel werden aus der Datenbank abgerufen und in die Liste hinzugefügt.
public void AlleArtikelAbrufen()
{
Artikelliste = database.ArtikelAbrufen();
}
}
}

View File

@ -0,0 +1,170 @@
namespace Artikelverwaltung
{
partial class Artikelverwaltung
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.anlegen = new System.Windows.Forms.Button();
this.loeschen = new System.Windows.Forms.Button();
this.aendern = new System.Windows.Forms.Button();
this.listeAktual = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView();
this.logout = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.searchbox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(19, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(111, 25);
this.label1.TabIndex = 1;
this.label1.Text = "Artikelliste";
//
// anlegen
//
this.anlegen.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.anlegen.Location = new System.Drawing.Point(784, 37);
this.anlegen.Name = "anlegen";
this.anlegen.Size = new System.Drawing.Size(174, 37);
this.anlegen.TabIndex = 2;
this.anlegen.Text = "Artikel Anlegen";
this.anlegen.UseVisualStyleBackColor = true;
this.anlegen.Click += new System.EventHandler(this.anlegen_Click);
//
// loeschen
//
this.loeschen.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.loeschen.Location = new System.Drawing.Point(784, 94);
this.loeschen.Name = "loeschen";
this.loeschen.Size = new System.Drawing.Size(174, 37);
this.loeschen.TabIndex = 3;
this.loeschen.Text = "Artikel Löschen";
this.loeschen.UseVisualStyleBackColor = true;
this.loeschen.Click += new System.EventHandler(this.loeschen_Click);
//
// aendern
//
this.aendern.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.aendern.Location = new System.Drawing.Point(784, 153);
this.aendern.Name = "aendern";
this.aendern.Size = new System.Drawing.Size(174, 37);
this.aendern.TabIndex = 4;
this.aendern.Text = "Artikel Ändern";
this.aendern.UseVisualStyleBackColor = true;
this.aendern.Click += new System.EventHandler(this.aendern_Click);
//
// listeAktual
//
this.listeAktual.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listeAktual.Location = new System.Drawing.Point(784, 215);
this.listeAktual.Name = "listeAktual";
this.listeAktual.Size = new System.Drawing.Size(174, 37);
this.listeAktual.TabIndex = 5;
this.listeAktual.Text = "Liste Abrufen";
this.listeAktual.UseVisualStyleBackColor = true;
this.listeAktual.Click += new System.EventHandler(this.listeAktual_Click);
//
// listView1
//
this.listView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.listView1.FullRowSelect = true;
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(24, 49);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(754, 821);
this.listView1.TabIndex = 6;
this.listView1.UseCompatibleStateImageBehavior = false;
//
// logout
//
this.logout.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.logout.Location = new System.Drawing.Point(784, 276);
this.logout.Name = "logout";
this.logout.Size = new System.Drawing.Size(174, 37);
this.logout.TabIndex = 7;
this.logout.Text = "Logout";
this.logout.UseVisualStyleBackColor = true;
this.logout.Click += new System.EventHandler(this.logout_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(505, 20);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(55, 20);
this.label2.TabIndex = 8;
this.label2.Text = "Suche";
//
// searchbox
//
this.searchbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.searchbox.Location = new System.Drawing.Point(566, 17);
this.searchbox.Name = "searchbox";
this.searchbox.Size = new System.Drawing.Size(212, 26);
this.searchbox.TabIndex = 9;
//
// Artikelverwaltung
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.ClientSize = new System.Drawing.Size(982, 882);
this.Controls.Add(this.searchbox);
this.Controls.Add(this.label2);
this.Controls.Add(this.logout);
this.Controls.Add(this.listView1);
this.Controls.Add(this.listeAktual);
this.Controls.Add(this.aendern);
this.Controls.Add(this.loeschen);
this.Controls.Add(this.anlegen);
this.Controls.Add(this.label1);
this.Name = "Artikelverwaltung";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Artikelverwaltung";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button anlegen;
private System.Windows.Forms.Button loeschen;
private System.Windows.Forms.Button aendern;
private System.Windows.Forms.Button listeAktual;
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Button logout;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox searchbox;
}
}

View File

@ -0,0 +1,109 @@
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 Artikelverwaltung
{
public partial class Artikelverwaltung : Form
{
Artikel_Verwaltung artikelverwaltung;
public Artikelverwaltung()
{
InitializeComponent();
artikelverwaltung = new Artikel_Verwaltung();
// Spaltern für die Listview erstellen und Listview generieren
listView1.Columns.Add("Artikel Nr.", 100);
listView1.Columns.Add("Artikelbeschreibung", 220, HorizontalAlignment.Center);
listView1.Columns.Add("Modellname", 150, HorizontalAlignment.Center);
listView1.Columns.Add("Artikelgruppe", 150, HorizontalAlignment.Center);
listView1.Columns.Add("Flag", 110);
listView1.View = View.Details;
listView1.MouseDoubleClick += new MouseEventHandler(listView1_MouseDoubleClick);
ListeAktuallisieren();
searchbox.TextChanged += new EventHandler(searchBox_TextChanged);
}
private void anlegen_Click(object sender, EventArgs e)
{
Artikel_Anlegen form = new Artikel_Anlegen();
form.ShowDialog();
ListeAktuallisieren();
}
private void listeAktual_Click(object sender, EventArgs e)
{
ListeAktuallisieren();
}
private void loeschen_Click(object sender, EventArgs e)
{
try {
int id = Convert.ToInt32(listView1.Items[listView1.FocusedItem.Index].Text);
artikelverwaltung.ArtikelLoeschen(id);
ListeAktuallisieren();
}
catch
{
MessageBox.Show("Fehler beim Löschen!");
}
}
// Aufruf nach Löschen, Ändern, Anlegen etc...
public void ListeAktuallisieren()
{
listView1.Items.Clear();
artikelverwaltung.AlleArtikelAbrufen();
foreach (Artikel artikel in artikelverwaltung.Artikelliste)
{
//Objekt muss in Array umgewandelt werden
string[] arr = { artikel.Artikelnummer.ToString(), artikel.Artikelbeschreibung.ToString(), artikel.Modellname.ToString(), artikel.Artikelgruppe.ToString(), artikel.AktivFlag.ToString() };
listView1.Items.Add(new ListViewItem(arr));
}
}
private void aendern_Click(object sender, EventArgs e)
{
Artikel_Aendern form = new Artikel_Aendern(listView1);
form.ShowDialog();
ListeAktuallisieren();
}
private void logout_Click(object sender, EventArgs e)
{
this.Hide();
Login form = new Login();
form.ShowDialog();
}
private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
ListViewHitTestInfo hit = listView1.HitTest(e.Location);
if (hit.Item != null)
{
Artikel_Aendern form = new Artikel_Aendern(listView1);
form.ShowDialog();
ListeAktuallisieren();
}
}
private void searchBox_TextChanged(object sender, EventArgs e)
{
ListeAktuallisieren();
if (searchbox.Text == "")
{
return;
}
var list = listView1.Items.Cast<ListViewItem>().Where(x => x.SubItems.Cast<ListViewItem.ListViewSubItem>().Any(y => y.Text.ToLower().Contains(searchbox.Text.ToLower()))).ToArray();
listView1.Items.Clear();
listView1.Items.AddRange(list);
}
}
}

View File

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{71F05FAF-8B88-4A3A-AD94-1B9F203AB0EF}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Artikelverwaltung</RootNamespace>
<AssemblyName>Artikelverwaltung</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySqlConnector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d33d3e53aa5f8c92, processorArchitecture=MSIL">
<HintPath>..\packages\MySqlConnector.2.1.13\lib\net471\MySqlConnector.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.5.0.1\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Artikel.cs" />
<Compile Include="Artikelverwaltung.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Artikelverwaltung.Designer.cs">
<DependentUpon>Artikelverwaltung.cs</DependentUpon>
</Compile>
<Compile Include="Artikel_Aendern.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Artikel_Aendern.Designer.cs">
<DependentUpon>Artikel_Aendern.cs</DependentUpon>
</Compile>
<Compile Include="Artikel_Verwaltung.cs" />
<Compile Include="Artikel_Anlegen.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Artikel_Anlegen.Designer.cs">
<DependentUpon>Artikel_Anlegen.cs</DependentUpon>
</Compile>
<Compile Include="Database.cs" />
<Compile Include="Login.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Login.Designer.cs">
<DependentUpon>Login.cs</DependentUpon>
</Compile>
<Compile Include="Lager.cs" />
<Compile Include="Mitarbeiter.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Register.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Register.Designer.cs">
<DependentUpon>Register.cs</DependentUpon>
</Compile>
<Compile Include="Zugriffsverwaltung.cs" />
<EmbeddedResource Include="Artikelverwaltung.resx">
<DependentUpon>Artikelverwaltung.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Artikel_Aendern.resx">
<DependentUpon>Artikel_Aendern.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Artikel_Anlegen.resx">
<DependentUpon>Artikel_Anlegen.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Login.resx">
<DependentUpon>Login.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Register.resx">
<DependentUpon>Register.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,95 @@
using MySqlConnector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class Database
{
string connectionString;
MySqlConnection connection;
MySqlCommand cmd;
public Database()
{
connectionString = "Server=localhost;User=root;Password=;Database=Artikelverwaltung";
connection = new MySqlConnection(connectionString);
cmd = new MySqlCommand();
}
// Benutzer abgleich direkt aus der Datenbank, ohne die Daten im Programm zu haben.
public bool loginAbgleich(string bn, string pw)
{
connection.Open();
cmd.Connection = connection;
cmd.CommandText = $"select count(*) as result from mitarbeiter where benutzername = '{bn}' and passwort = '{pw}'";
MySqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
if(reader["result"].ToString().Equals("1"))
{
connection.Close();
return true;
}
}
connection.Close();
return false;
}
public void BenutzerAnlegen(MitarbeiterAccount acc)
{
connection.Open();
cmd.Connection = connection;
cmd.CommandText = $"insert into mitarbeiter(benutzername, passwort) values('{acc.benutzername}', '{acc.passwort}')";
cmd.ExecuteNonQuery();
connection.Close();
}
public void ArtikelAnlegen(Artikel artikel)
{
connection.Open();
cmd.Connection= connection;
cmd.CommandText = $"insert into artikel(artikelbeschreibung, modellname,artikelgruppe,aktivFlag) values('{artikel.Artikelbeschreibung}','{artikel.Modellname}','{artikel.Artikelgruppe}','{Convert.ToInt16(artikel.AktivFlag)}')";
cmd.ExecuteNonQuery();
connection.Close();
}
public void ArtikelLoeschen(int id)
{
connection.Open();
cmd.Connection = connection;
cmd.CommandText = $"delete from artikel where artikelnummer = {id}";
cmd.ExecuteNonQuery();
connection.Close();
}
public void ArtikelAendern(Artikel artikel, int id)
{
connection.Open();
cmd.Connection = connection;
cmd.CommandText = $"update artikel set artikelbeschreibung = '{artikel.Artikelbeschreibung}', modellname = '{artikel.Modellname}', artikelgruppe = '{artikel.Artikelgruppe}', aktivFlag = '{Convert.ToInt16(artikel.AktivFlag)}' where artikelnummer = {id}";
cmd.ExecuteNonQuery();
connection.Close();
}
public List<Artikel> ArtikelAbrufen()
{
List<Artikel> list = new List<Artikel>();
connection.Open();
cmd.Connection = connection;
cmd.CommandText = $"select * from artikel";
MySqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
Artikel artikel = new Artikel(Convert.ToUInt32(reader["artikelnummer"]), reader["artikelbeschreibung"].ToString(), reader["modellname"].ToString(),reader["artikelgruppe"].ToString(), Convert.ToBoolean(reader["aktivFlag"]));
list.Add(artikel);
}
connection.Close();
return list;
}
}
}

104
Artikelverwaltung/Lager.cs Normal file
View File

@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class Lager
{
private uint _Lagernummer;
readonly private uint _Kapazitaet;
private uint _Lagerbestand;
//public int[] Regale;
public List<Artikel> Artikelliste = new List<Artikel>();
//Getter - Setter
public uint Lagernummer { get => _Lagernummer; set => _Lagernummer = value; }
public uint Lagerbestand { get => _Lagerbestand; set => _Lagerbestand = value; }
public uint Kapazitaet { get => _Kapazitaet;}
//Konstruktoren
public Lager()
{
}
public Lager(uint kapazitaet)
{
_Kapazitaet = kapazitaet;
}
public Lager(uint lagernummer,uint kapazitaet, uint lagerbestand )
{
Lagernummer = lagernummer;
_Kapazitaet = kapazitaet;
Lagerbestand = lagerbestand;
}
// Operationen
public bool Einlagern(Artikel item, int menge)
{
if(verfügbarerPlatz(menge)) // Berechnet die freie Kapazitaet, wenn genug vorhanden, findet Einlagerung statt
{
try
{
// Fügt der Atikelliste, der Menge entsprechend, den Artikel hinzu
for (int i = 0; i < menge; i++)
{
Artikelliste.Add(item);
}
BestandAktualisieren(); // Bestand wird aktuallisiert
}
catch (Exception)
{
return false; //Fehlschlag beim Einlagern
}
}
return true;
}
public bool Auslagern(Artikel item, int menge)
{
try
{
if (ZaehleArtikel(item, menge)) // Schaut, ob überhaupt soviele Artikel vorhanden sind
{
for (int i = 0; i < menge; i++)
{
Artikelliste.Remove(item);
}
BestandAktualisieren();
}
}
catch (Exception)
{
return false;
}
return true;
}
private void BestandAktualisieren()
{
Lagerbestand = (uint)Artikelliste.Count();
}
//Zählt ob Artikel in der Liste mindestens n mal enthalten
private bool ZaehleArtikel(Artikel item, int menge)
{
int vorhandeneArtikel = 0;
for(int i = 0; i < Artikelliste.Count(); i++)
{
if (Artikelliste[i].Artikelnummer == item.Artikelnummer)
{
vorhandeneArtikel += 1;
}
}
return vorhandeneArtikel >= menge;
}
private bool verfügbarerPlatz(int menge)
{
return (Lagerbestand + menge) <= Kapazitaet;
}
}
}

145
Artikelverwaltung/Login.Designer.cs generated Normal file
View File

@ -0,0 +1,145 @@
namespace Artikelverwaltung
{
partial class Login
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBoxBenutzername = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBoxPasswort = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(22, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(157, 25);
this.label1.TabIndex = 0;
this.label1.Text = "Benutzername:";
//
// textBoxBenutzername
//
this.textBoxBenutzername.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxBenutzername.Location = new System.Drawing.Point(27, 86);
this.textBoxBenutzername.Name = "textBoxBenutzername";
this.textBoxBenutzername.Size = new System.Drawing.Size(229, 31);
this.textBoxBenutzername.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(22, 136);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(106, 25);
this.label2.TabIndex = 2;
this.label2.Text = "Passwort:";
//
// textBoxPasswort
//
this.textBoxPasswort.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxPasswort.Location = new System.Drawing.Point(27, 177);
this.textBoxPasswort.Name = "textBoxPasswort";
this.textBoxPasswort.Size = new System.Drawing.Size(229, 31);
this.textBoxPasswort.TabIndex = 3;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(27, 268);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(95, 35);
this.button1.TabIndex = 4;
this.button1.Text = "Login";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.login);
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.checkBox1.Location = new System.Drawing.Point(166, 214);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(90, 28);
this.checkBox1.TabIndex = 5;
this.checkBox1.Text = "Klartext";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(161, 268);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(95, 35);
this.button2.TabIndex = 6;
this.button2.Text = "Anlegen";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Login
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.ClientSize = new System.Drawing.Size(284, 331);
this.Controls.Add(this.button2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBoxPasswort);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBoxBenutzername);
this.Controls.Add(this.label1);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "Login";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Login";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBoxBenutzername;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBoxPasswort;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Button button2;
}
}

View File

@ -0,0 +1,71 @@
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;
namespace Artikelverwaltung
{
public partial class Login : Form
{
Zugriffsverwaltung zugriffsverwaltung;
Thread th;
public Login()
{
InitializeComponent();
zugriffsverwaltung = new Zugriffsverwaltung();
textBoxPasswort.PasswordChar = '*';
}
private void login(object sender, EventArgs e)
{
if (zugriffsverwaltung.loginArtikelverwaltung(textBoxBenutzername.Text, textBoxPasswort.Text))
{
MessageBox.Show("Login erfolgreich!");
this.Close();
th = new Thread(AritelverwaltunForm);
th.SetApartmentState(ApartmentState.STA);
th.Start();
}
else
{
MessageBox.Show("Login Fehlgeschlagen!");
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if(checkBox1.CheckState != CheckState.Checked)
{
textBoxPasswort.PasswordChar = '*';
}
else
{
textBoxPasswort.PasswordChar = '\0';
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
th = new Thread(RegisterForm);
th.SetApartmentState(ApartmentState.STA);
th.Start();
}
private void RegisterForm(object obj)
{
Application.Run(new Register());
}
private void AritelverwaltunForm(object obj)
{
Application.Run(new Artikelverwaltung()); ;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class MitarbeiterAccount
{
// Attribute
public string benutzername;
public string passwort;
public MitarbeiterAccount(string benutzername, string passwort)
{
this.benutzername = benutzername;
this.passwort = passwort;
}
// Methoden
public void BenutzernameAender(string neu) { }
public void PasswortAender(string neu) { }
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Artikelverwaltung
{
internal static class Program
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Login());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("Artikelverwaltung")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Artikelverwaltung")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("71f05faf-8b88-4a3a-ad94-1b9f203ab0ef")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion: 4.0.30319.42000
//
// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn
// der Code neu generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Artikelverwaltung.Properties
{
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse
// über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Artikelverwaltung.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Artikelverwaltung.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

140
Artikelverwaltung/Register.Designer.cs generated Normal file
View File

@ -0,0 +1,140 @@
namespace Artikelverwaltung
{
partial class Register
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBoxRegisterBenutzername = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textBoxRegisterPasswort = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(13, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(250, 25);
this.label1.TabIndex = 0;
this.label1.Text = "Neuen Benutzer anlegen";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(18, 61);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(157, 25);
this.label2.TabIndex = 1;
this.label2.Text = "Benutzername:";
//
// textBoxRegisterBenutzername
//
this.textBoxRegisterBenutzername.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxRegisterBenutzername.Location = new System.Drawing.Point(18, 89);
this.textBoxRegisterBenutzername.Name = "textBoxRegisterBenutzername";
this.textBoxRegisterBenutzername.Size = new System.Drawing.Size(177, 31);
this.textBoxRegisterBenutzername.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(18, 147);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(106, 25);
this.label3.TabIndex = 3;
this.label3.Text = "Passwort:";
//
// textBoxRegisterPasswort
//
this.textBoxRegisterPasswort.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxRegisterPasswort.Location = new System.Drawing.Point(18, 175);
this.textBoxRegisterPasswort.Name = "textBoxRegisterPasswort";
this.textBoxRegisterPasswort.Size = new System.Drawing.Size(177, 31);
this.textBoxRegisterPasswort.TabIndex = 4;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(152, 249);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(102, 43);
this.button1.TabIndex = 5;
this.button1.Text = "Anlegen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(18, 249);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(106, 43);
this.button2.TabIndex = 6;
this.button2.Text = "Zurück";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Register
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.ClientSize = new System.Drawing.Size(284, 331);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBoxRegisterPasswort);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBoxRegisterBenutzername);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "Register";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Register";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBoxRegisterBenutzername;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBoxRegisterPasswort;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}

View File

@ -0,0 +1,48 @@
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;
namespace Artikelverwaltung
{
public partial class Register : Form
{
Zugriffsverwaltung zugriffsverwaltung;
Thread th;
public Register()
{
InitializeComponent();
zugriffsverwaltung = new Zugriffsverwaltung();
}
private void button1_Click(object sender, EventArgs e)
{
if (zugriffsverwaltung.benutzerAnlegen(textBoxRegisterBenutzername.Text, textBoxRegisterPasswort.Text))
{
MessageBox.Show("Benutzer Angelegt");
}
else
{
MessageBox.Show("Fehler beim Anlegen!");
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
th = new Thread(openNewForm);
th.SetApartmentState(ApartmentState.STA);
th.Start();
}
private void openNewForm(object obj)
{
Application.Run(new Login());
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Artikelverwaltung
{
internal class Zugriffsverwaltung
{
Database dbConnection = new Database();
// Methoden (Operations) Login, abgleich von Benutzername und Passwort
public bool loginArtikelverwaltung(string bn, string pw)
{
bool access = false;
if (dbConnection.loginAbgleich(bn,pw))
{
access = true;
}
return access;
}
public bool benutzerAnlegen(string bn, string pw)
{
MitarbeiterAccount mitarbeiter = new MitarbeiterAccount(bn, pw);
try
{
dbConnection.BenutzerAnlegen(mitarbeiter);
return true;
}
catch
{
return false;
}
}
}
}

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySqlConnector" version="2.1.13" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="5.0.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net472" />
</packages>