Projektdateien hinzufügen.
This commit is contained in:
parent
ce6c6931b0
commit
2f9b232460
25
Werkzeugverleih.sln
Normal file
25
Werkzeugverleih.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 18
|
||||||
|
VisualStudioVersion = 18.2.11415.280
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Werkzeugverleih", "Werkzeugverleih\Werkzeugverleih.csproj", "{32D4B6E1-027B-4069-BE6B-9904E5C6C66C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{32D4B6E1-027B-4069-BE6B-9904E5C6C66C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{32D4B6E1-027B-4069-BE6B-9904E5C6C66C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{32D4B6E1-027B-4069-BE6B-9904E5C6C66C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{32D4B6E1-027B-4069-BE6B-9904E5C6C66C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {93A40E4B-B1BC-410E-A1C5-5D093F7F21A6}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
18
Werkzeugverleih/App.config
Normal file
18
Werkzeugverleih/App.config
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
|
||||||
|
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<applicationSettings>
|
||||||
|
<DevExpress.LookAndFeel.Design.AppSettings>
|
||||||
|
<setting name="DPIAwarenessMode" serializeAs="String">
|
||||||
|
<value>System</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="RegisterBonusSkins" serializeAs="String">
|
||||||
|
<value>True</value>
|
||||||
|
</setting>
|
||||||
|
</DevExpress.LookAndFeel.Design.AppSettings>
|
||||||
|
</applicationSettings>
|
||||||
|
</configuration>
|
||||||
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.Designer.cs
generated
Normal file
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.Designer.cs
generated
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
partial class FrmHerstellerHinzufügen
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
txtName = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
btnSpeichern = new DevExpress.XtraEditors.SimpleButton();
|
||||||
|
labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.ColumnCount = 8;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.Controls.Add(txtName, 1, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(btnSpeichern, 2, 2);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl1, 0, 1);
|
||||||
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 8;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// txtName
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtName, 2);
|
||||||
|
txtName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtName.Location = new System.Drawing.Point(103, 33);
|
||||||
|
txtName.Name = "txtName";
|
||||||
|
txtName.Size = new System.Drawing.Size(194, 20);
|
||||||
|
txtName.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// btnSpeichern
|
||||||
|
//
|
||||||
|
btnSpeichern.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
btnSpeichern.Location = new System.Drawing.Point(203, 63);
|
||||||
|
btnSpeichern.Name = "btnSpeichern";
|
||||||
|
btnSpeichern.Size = new System.Drawing.Size(94, 24);
|
||||||
|
btnSpeichern.TabIndex = 2;
|
||||||
|
btnSpeichern.Text = "speichern";
|
||||||
|
btnSpeichern.Click += btnSpeichern_Click;
|
||||||
|
//
|
||||||
|
// labelControl1
|
||||||
|
//
|
||||||
|
labelControl1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl1.Location = new System.Drawing.Point(3, 38);
|
||||||
|
labelControl1.Name = "labelControl1";
|
||||||
|
labelControl1.Size = new System.Drawing.Size(50, 13);
|
||||||
|
labelControl1.TabIndex = 0;
|
||||||
|
labelControl1.Text = "Hersteller:";
|
||||||
|
//
|
||||||
|
// FrmHerstellerHinzufügen
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Name = "FrmHerstellerHinzufügen";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
Text = "Stammdaten - Hersteller hinzufügen";
|
||||||
|
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtName;
|
||||||
|
private DevExpress.XtraEditors.SimpleButton btnSpeichern;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||||
|
}
|
||||||
|
}
|
||||||
49
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.cs
Normal file
49
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.cs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
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 Werkzeugverleih.Klassen;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
public partial class FrmHerstellerHinzufügen : Form
|
||||||
|
{
|
||||||
|
public FrmHerstellerHinzufügen()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnSpeichern_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string name = txtName.Text;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (MySqlConnection con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
string sql = @"INSERT INTO tool_manufacturer (name) VALUES (@name)";
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = new MySqlCommand(sql, con))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("@name", name);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
txtName.Clear();
|
||||||
|
}
|
||||||
|
catch (MySqlException ex) when (ex.Number == 1062)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Der Hersteller {name} existiert bereits!", "Duplikat", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.resx
Normal file
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerHinzufügen.resx
Normal 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>
|
||||||
107
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.Designer.cs
generated
Normal file
107
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.Designer.cs
generated
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
partial class FrmHerstellerÜbersicht
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
gcHerstellerÜbersicht = new DevExpress.XtraGrid.GridControl();
|
||||||
|
gvHerstellerÜbersicht = new DevExpress.XtraGrid.Views.Grid.GridView();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gcHerstellerÜbersicht).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gvHerstellerÜbersicht).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.ColumnCount = 8;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.Controls.Add(gcHerstellerÜbersicht, 0, 1);
|
||||||
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 8;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// gcHerstellerÜbersicht
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(gcHerstellerÜbersicht, 8);
|
||||||
|
gcHerstellerÜbersicht.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
gcHerstellerÜbersicht.Location = new System.Drawing.Point(3, 33);
|
||||||
|
gcHerstellerÜbersicht.MainView = gvHerstellerÜbersicht;
|
||||||
|
gcHerstellerÜbersicht.Name = "gcHerstellerÜbersicht";
|
||||||
|
tableLayoutPanel1.SetRowSpan(gcHerstellerÜbersicht, 6);
|
||||||
|
gcHerstellerÜbersicht.Size = new System.Drawing.Size(794, 384);
|
||||||
|
gcHerstellerÜbersicht.TabIndex = 0;
|
||||||
|
gcHerstellerÜbersicht.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gvHerstellerÜbersicht });
|
||||||
|
//
|
||||||
|
// gvHerstellerÜbersicht
|
||||||
|
//
|
||||||
|
gvHerstellerÜbersicht.GridControl = gcHerstellerÜbersicht;
|
||||||
|
gvHerstellerÜbersicht.Name = "gvHerstellerÜbersicht";
|
||||||
|
//
|
||||||
|
// FrmHerstellerÜbersicht
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Name = "FrmHerstellerÜbersicht";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
Text = "Stammdaten - Hersteller Übersicht";
|
||||||
|
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
Shown += FrmHerstellerÜbersicht_Shown;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)gcHerstellerÜbersicht).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gvHerstellerÜbersicht).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private DevExpress.XtraGrid.GridControl gcHerstellerÜbersicht;
|
||||||
|
private DevExpress.XtraGrid.Views.Grid.GridView gvHerstellerÜbersicht;
|
||||||
|
}
|
||||||
|
}
|
||||||
51
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.cs
Normal file
51
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.cs
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
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.Controls;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using Werkzeugverleih.Klassen;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
public partial class FrmHerstellerÜbersicht : Form
|
||||||
|
{
|
||||||
|
public FrmHerstellerÜbersicht()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrmHerstellerÜbersicht_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
List<Hersteller> hersteller = new List<Hersteller>();
|
||||||
|
|
||||||
|
using (var con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
string sql = @"SELECT id, name FROM tool_manufacturer;";
|
||||||
|
|
||||||
|
using (var cmd = new MySqlCommand(sql, con))
|
||||||
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
hersteller.Add(new Hersteller
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32("id"),
|
||||||
|
Name = reader.GetString("name")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gcHerstellerÜbersicht.DataSource = hersteller;
|
||||||
|
gvHerstellerÜbersicht.PopulateColumns();
|
||||||
|
gvHerstellerÜbersicht.Columns["Id"].Width = 50;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.resx
Normal file
120
Werkzeugverleih/Formen/Stammdaten/FrmHerstellerÜbersicht.resx
Normal 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>
|
||||||
173
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.Designer.cs
generated
Normal file
173
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.Designer.cs
generated
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
partial class FrmKategorieHinzufügen
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
btnSpeichern = new DevExpress.XtraEditors.SimpleButton();
|
||||||
|
labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl2 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
txtName = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
txtBezeichnung = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
labelControl3 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
lueHauptkategorie = new DevExpress.XtraEditors.LookUpEdit();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtBezeichnung.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)lueHauptkategorie.Properties).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.ColumnCount = 8;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.Controls.Add(btnSpeichern, 2, 3);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl1, 0, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl2, 0, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtName, 1, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtBezeichnung, 1, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl3, 0, 2);
|
||||||
|
tableLayoutPanel1.Controls.Add(lueHauptkategorie, 1, 2);
|
||||||
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 8;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// btnSpeichern
|
||||||
|
//
|
||||||
|
btnSpeichern.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
btnSpeichern.Location = new System.Drawing.Point(203, 93);
|
||||||
|
btnSpeichern.Name = "btnSpeichern";
|
||||||
|
btnSpeichern.Size = new System.Drawing.Size(94, 24);
|
||||||
|
btnSpeichern.TabIndex = 0;
|
||||||
|
btnSpeichern.Text = "speichern";
|
||||||
|
btnSpeichern.Click += btnSpeichern_Click;
|
||||||
|
//
|
||||||
|
// labelControl1
|
||||||
|
//
|
||||||
|
labelControl1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl1.Location = new System.Drawing.Point(3, 8);
|
||||||
|
labelControl1.Name = "labelControl1";
|
||||||
|
labelControl1.Size = new System.Drawing.Size(31, 13);
|
||||||
|
labelControl1.TabIndex = 1;
|
||||||
|
labelControl1.Text = "Name:";
|
||||||
|
//
|
||||||
|
// labelControl2
|
||||||
|
//
|
||||||
|
labelControl2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl2.Location = new System.Drawing.Point(3, 38);
|
||||||
|
labelControl2.Name = "labelControl2";
|
||||||
|
labelControl2.Size = new System.Drawing.Size(64, 13);
|
||||||
|
labelControl2.TabIndex = 2;
|
||||||
|
labelControl2.Text = "Bezeichnung:";
|
||||||
|
//
|
||||||
|
// txtName
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtName, 2);
|
||||||
|
txtName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtName.Location = new System.Drawing.Point(103, 3);
|
||||||
|
txtName.Name = "txtName";
|
||||||
|
txtName.Size = new System.Drawing.Size(194, 20);
|
||||||
|
txtName.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// txtBezeichnung
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtBezeichnung, 2);
|
||||||
|
txtBezeichnung.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtBezeichnung.Location = new System.Drawing.Point(103, 33);
|
||||||
|
txtBezeichnung.Name = "txtBezeichnung";
|
||||||
|
txtBezeichnung.Size = new System.Drawing.Size(194, 20);
|
||||||
|
txtBezeichnung.TabIndex = 4;
|
||||||
|
//
|
||||||
|
// labelControl3
|
||||||
|
//
|
||||||
|
labelControl3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl3.Location = new System.Drawing.Point(3, 68);
|
||||||
|
labelControl3.Name = "labelControl3";
|
||||||
|
labelControl3.Size = new System.Drawing.Size(78, 13);
|
||||||
|
labelControl3.TabIndex = 5;
|
||||||
|
labelControl3.Text = "Hauptkategorie:";
|
||||||
|
//
|
||||||
|
// lueHauptkategorie
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(lueHauptkategorie, 2);
|
||||||
|
lueHauptkategorie.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
lueHauptkategorie.Location = new System.Drawing.Point(103, 63);
|
||||||
|
lueHauptkategorie.Name = "lueHauptkategorie";
|
||||||
|
lueHauptkategorie.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
lueHauptkategorie.Size = new System.Drawing.Size(194, 20);
|
||||||
|
lueHauptkategorie.TabIndex = 6;
|
||||||
|
//
|
||||||
|
// FrmKategorieHinzufügen
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Name = "FrmKategorieHinzufügen";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
Text = "Stammdaten - Kategorien hinzufügen";
|
||||||
|
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtBezeichnung.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)lueHauptkategorie.Properties).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private DevExpress.XtraEditors.SimpleButton btnSpeichern;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl2;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtName;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtBezeichnung;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl3;
|
||||||
|
private DevExpress.XtraEditors.LookUpEdit lueHauptkategorie;
|
||||||
|
}
|
||||||
|
}
|
||||||
94
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.cs
Normal file
94
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.cs
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
using DevExpress.Utils.FormatStrings;
|
||||||
|
using DevExpress.Utils.MVVM;
|
||||||
|
using MySql.Data;
|
||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
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 Werkzeugverleih.Klassen;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Formen.Stammdaten
|
||||||
|
{
|
||||||
|
public partial class FrmKategorieHinzufügen : Form
|
||||||
|
{
|
||||||
|
public FrmKategorieHinzufügen()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
lueHauptkategorieUpdaten();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void lueHauptkategorieUpdaten()
|
||||||
|
{
|
||||||
|
List<Hauptkategorie> k = new List<Hauptkategorie>();
|
||||||
|
|
||||||
|
using (var con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
const string sql = @"SELECT id, name FROM tool_categories WHERE parent_id IS NULL ORDER BY name;";
|
||||||
|
|
||||||
|
using (var cmd = new MySqlCommand(sql, con))
|
||||||
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
k.Add(new Hauptkategorie
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32("id"),
|
||||||
|
Name = reader.GetString("name")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LookUpEdit konfigurieren
|
||||||
|
lueHauptkategorie.Properties.DataSource = k;
|
||||||
|
lueHauptkategorie.Properties.DisplayMember = nameof(Hauptkategorie.Name); // Anzeige
|
||||||
|
lueHauptkategorie.Properties.ValueMember = nameof(Hauptkategorie.Id); // gespeicherter Wert (EditValue)
|
||||||
|
|
||||||
|
// optional: UX
|
||||||
|
lueHauptkategorie.Properties.NullText = "(keine)";
|
||||||
|
lueHauptkategorie.EditValue = null; // nichts ausgewählt
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void btnSpeichern_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string name = txtName.Text;
|
||||||
|
string bezeichnung = txtBezeichnung.Text;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (MySqlConnection con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
string sql = @"INSERT INTO tool_categories (name, description) VALUES (@name, @bezeichnung)";
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = new MySqlCommand(sql, con))
|
||||||
|
{
|
||||||
|
cmd.Parameters.AddWithValue("@name", name);
|
||||||
|
cmd.Parameters.AddWithValue("@bezeichnung", bezeichnung);
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
txtName.Clear();
|
||||||
|
txtBezeichnung.Clear();
|
||||||
|
lueHauptkategorie.EditValue = null;
|
||||||
|
lueHauptkategorieUpdaten();
|
||||||
|
}
|
||||||
|
catch (MySqlException ex) when (ex.Number == 1062)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Die Kategorie {name} existiert bereits!", "Duplikat", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.resx
Normal file
120
Werkzeugverleih/Formen/Stammdaten/FrmKategorieHinzufügen.resx
Normal 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>
|
||||||
348
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.Designer.cs
generated
Normal file
348
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.Designer.cs
generated
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
namespace Werkzeugverleih.Formen.Werkzeuge
|
||||||
|
{
|
||||||
|
partial class FrmWerkzeugeHinzufügen
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
seKaution = new DevExpress.XtraEditors.SpinEdit();
|
||||||
|
labelControl1 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl6 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl7 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl8 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl9 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl4 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl5 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
labelControl2 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
txtName = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
txtModell = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
txtSeriennummer = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
txtBezeichnung = new DevExpress.XtraEditors.TextEdit();
|
||||||
|
lueHersteller = new DevExpress.XtraEditors.LookUpEdit();
|
||||||
|
btnWerkzeugHinzufügen = new DevExpress.XtraEditors.SimpleButton();
|
||||||
|
labelControl3 = new DevExpress.XtraEditors.LabelControl();
|
||||||
|
sePreisProTag = new DevExpress.XtraEditors.SpinEdit();
|
||||||
|
sePreisProWochenende = new DevExpress.XtraEditors.SpinEdit();
|
||||||
|
sePreisProWoche = new DevExpress.XtraEditors.SpinEdit();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)seKaution.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtModell.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtSeriennummer.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtBezeichnung.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)lueHersteller.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProTag.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProWochenende.Properties).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProWoche.Properties).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.ColumnCount = 8;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10.3614454F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10.3614454F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10.3614454F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 10.3614454F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.375F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 9.875F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.0642567F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 16.0642567F));
|
||||||
|
tableLayoutPanel1.Controls.Add(seKaution, 5, 3);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl1, 0, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl6, 4, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl7, 4, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl8, 4, 2);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl9, 4, 3);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl4, 0, 2);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl5, 0, 3);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl2, 0, 4);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtName, 1, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtModell, 1, 2);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtSeriennummer, 1, 3);
|
||||||
|
tableLayoutPanel1.Controls.Add(txtBezeichnung, 1, 4);
|
||||||
|
tableLayoutPanel1.Controls.Add(lueHersteller, 1, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(btnWerkzeugHinzufügen, 2, 6);
|
||||||
|
tableLayoutPanel1.Controls.Add(labelControl3, 0, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(sePreisProTag, 5, 0);
|
||||||
|
tableLayoutPanel1.Controls.Add(sePreisProWochenende, 5, 1);
|
||||||
|
tableLayoutPanel1.Controls.Add(sePreisProWoche, 5, 2);
|
||||||
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 10;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// seKaution
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(seKaution, 2);
|
||||||
|
seKaution.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
seKaution.EditValue = new decimal(new int[] { 0, 0, 0, 0 });
|
||||||
|
seKaution.Location = new System.Drawing.Point(466, 93);
|
||||||
|
seKaution.Name = "seKaution";
|
||||||
|
seKaution.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
seKaution.Properties.MaskSettings.Set("mask", "c2");
|
||||||
|
seKaution.Properties.UseMaskAsDisplayFormat = true;
|
||||||
|
seKaution.Size = new System.Drawing.Size(201, 20);
|
||||||
|
seKaution.TabIndex = 26;
|
||||||
|
//
|
||||||
|
// labelControl1
|
||||||
|
//
|
||||||
|
labelControl1.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl1.Location = new System.Drawing.Point(3, 8);
|
||||||
|
labelControl1.Name = "labelControl1";
|
||||||
|
labelControl1.Size = new System.Drawing.Size(31, 13);
|
||||||
|
labelControl1.TabIndex = 0;
|
||||||
|
labelControl1.Text = "Name:";
|
||||||
|
//
|
||||||
|
// labelControl6
|
||||||
|
//
|
||||||
|
labelControl6.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl6.Location = new System.Drawing.Point(335, 8);
|
||||||
|
labelControl6.Name = "labelControl6";
|
||||||
|
labelControl6.Size = new System.Drawing.Size(67, 13);
|
||||||
|
labelControl6.TabIndex = 5;
|
||||||
|
labelControl6.Text = "Preis pro Tag:";
|
||||||
|
//
|
||||||
|
// labelControl7
|
||||||
|
//
|
||||||
|
labelControl7.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl7.Location = new System.Drawing.Point(335, 38);
|
||||||
|
labelControl7.Name = "labelControl7";
|
||||||
|
labelControl7.Size = new System.Drawing.Size(112, 13);
|
||||||
|
labelControl7.TabIndex = 6;
|
||||||
|
labelControl7.Text = "Preis pro Wochenende:";
|
||||||
|
//
|
||||||
|
// labelControl8
|
||||||
|
//
|
||||||
|
labelControl8.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl8.Location = new System.Drawing.Point(335, 68);
|
||||||
|
labelControl8.Name = "labelControl8";
|
||||||
|
labelControl8.Size = new System.Drawing.Size(82, 13);
|
||||||
|
labelControl8.TabIndex = 7;
|
||||||
|
labelControl8.Text = "Preis pro Woche:";
|
||||||
|
//
|
||||||
|
// labelControl9
|
||||||
|
//
|
||||||
|
labelControl9.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl9.Location = new System.Drawing.Point(335, 98);
|
||||||
|
labelControl9.Name = "labelControl9";
|
||||||
|
labelControl9.Size = new System.Drawing.Size(40, 13);
|
||||||
|
labelControl9.TabIndex = 8;
|
||||||
|
labelControl9.Text = "Kaution:";
|
||||||
|
//
|
||||||
|
// labelControl4
|
||||||
|
//
|
||||||
|
labelControl4.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl4.Location = new System.Drawing.Point(3, 68);
|
||||||
|
labelControl4.Name = "labelControl4";
|
||||||
|
labelControl4.Size = new System.Drawing.Size(34, 13);
|
||||||
|
labelControl4.TabIndex = 3;
|
||||||
|
labelControl4.Text = "Modell:";
|
||||||
|
//
|
||||||
|
// labelControl5
|
||||||
|
//
|
||||||
|
labelControl5.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl5.Location = new System.Drawing.Point(3, 98);
|
||||||
|
labelControl5.Name = "labelControl5";
|
||||||
|
labelControl5.Size = new System.Drawing.Size(72, 13);
|
||||||
|
labelControl5.TabIndex = 4;
|
||||||
|
labelControl5.Text = "Seriennummer:";
|
||||||
|
//
|
||||||
|
// labelControl2
|
||||||
|
//
|
||||||
|
labelControl2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl2.Location = new System.Drawing.Point(3, 128);
|
||||||
|
labelControl2.Name = "labelControl2";
|
||||||
|
labelControl2.Size = new System.Drawing.Size(64, 13);
|
||||||
|
labelControl2.TabIndex = 1;
|
||||||
|
labelControl2.Text = "Bezeichnung:";
|
||||||
|
//
|
||||||
|
// txtName
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtName, 3);
|
||||||
|
txtName.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtName.Location = new System.Drawing.Point(86, 3);
|
||||||
|
txtName.Name = "txtName";
|
||||||
|
txtName.Size = new System.Drawing.Size(243, 20);
|
||||||
|
txtName.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// txtModell
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtModell, 3);
|
||||||
|
txtModell.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtModell.Location = new System.Drawing.Point(86, 63);
|
||||||
|
txtModell.Name = "txtModell";
|
||||||
|
txtModell.Size = new System.Drawing.Size(243, 20);
|
||||||
|
txtModell.TabIndex = 10;
|
||||||
|
//
|
||||||
|
// txtSeriennummer
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtSeriennummer, 3);
|
||||||
|
txtSeriennummer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtSeriennummer.Location = new System.Drawing.Point(86, 93);
|
||||||
|
txtSeriennummer.Name = "txtSeriennummer";
|
||||||
|
txtSeriennummer.Size = new System.Drawing.Size(243, 20);
|
||||||
|
txtSeriennummer.TabIndex = 11;
|
||||||
|
//
|
||||||
|
// txtBezeichnung
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(txtBezeichnung, 6);
|
||||||
|
txtBezeichnung.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
txtBezeichnung.Location = new System.Drawing.Point(86, 123);
|
||||||
|
txtBezeichnung.Name = "txtBezeichnung";
|
||||||
|
txtBezeichnung.Size = new System.Drawing.Size(581, 20);
|
||||||
|
txtBezeichnung.TabIndex = 12;
|
||||||
|
//
|
||||||
|
// lueHersteller
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(lueHersteller, 3);
|
||||||
|
lueHersteller.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
lueHersteller.Location = new System.Drawing.Point(86, 33);
|
||||||
|
lueHersteller.Name = "lueHersteller";
|
||||||
|
lueHersteller.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
lueHersteller.Size = new System.Drawing.Size(243, 20);
|
||||||
|
lueHersteller.TabIndex = 17;
|
||||||
|
//
|
||||||
|
// btnWerkzeugHinzufügen
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(btnWerkzeugHinzufügen, 2);
|
||||||
|
btnWerkzeugHinzufügen.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
btnWerkzeugHinzufügen.Location = new System.Drawing.Point(169, 183);
|
||||||
|
btnWerkzeugHinzufügen.Name = "btnWerkzeugHinzufügen";
|
||||||
|
btnWerkzeugHinzufügen.Size = new System.Drawing.Size(160, 24);
|
||||||
|
btnWerkzeugHinzufügen.TabIndex = 18;
|
||||||
|
btnWerkzeugHinzufügen.Text = "Werkzeug hinzufügen";
|
||||||
|
btnWerkzeugHinzufügen.Click += btnWerkzeugHinzufügen_Click;
|
||||||
|
//
|
||||||
|
// labelControl3
|
||||||
|
//
|
||||||
|
labelControl3.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||||
|
labelControl3.Location = new System.Drawing.Point(3, 38);
|
||||||
|
labelControl3.Name = "labelControl3";
|
||||||
|
labelControl3.Size = new System.Drawing.Size(50, 13);
|
||||||
|
labelControl3.TabIndex = 22;
|
||||||
|
labelControl3.Text = "Hersteller:";
|
||||||
|
//
|
||||||
|
// sePreisProTag
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(sePreisProTag, 2);
|
||||||
|
sePreisProTag.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
sePreisProTag.EditValue = new decimal(new int[] { 0, 0, 0, 0 });
|
||||||
|
sePreisProTag.Location = new System.Drawing.Point(466, 3);
|
||||||
|
sePreisProTag.Name = "sePreisProTag";
|
||||||
|
sePreisProTag.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
sePreisProTag.Properties.MaskSettings.Set("mask", "c2");
|
||||||
|
sePreisProTag.Properties.UseMaskAsDisplayFormat = true;
|
||||||
|
sePreisProTag.Size = new System.Drawing.Size(201, 20);
|
||||||
|
sePreisProTag.TabIndex = 23;
|
||||||
|
//
|
||||||
|
// sePreisProWochenende
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(sePreisProWochenende, 2);
|
||||||
|
sePreisProWochenende.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
sePreisProWochenende.EditValue = new decimal(new int[] { 0, 0, 0, 0 });
|
||||||
|
sePreisProWochenende.Location = new System.Drawing.Point(466, 33);
|
||||||
|
sePreisProWochenende.Name = "sePreisProWochenende";
|
||||||
|
sePreisProWochenende.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
sePreisProWochenende.Properties.MaskSettings.Set("mask", "c2");
|
||||||
|
sePreisProWochenende.Properties.UseMaskAsDisplayFormat = true;
|
||||||
|
sePreisProWochenende.Size = new System.Drawing.Size(201, 20);
|
||||||
|
sePreisProWochenende.TabIndex = 24;
|
||||||
|
//
|
||||||
|
// sePreisProWoche
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(sePreisProWoche, 2);
|
||||||
|
sePreisProWoche.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
sePreisProWoche.EditValue = new decimal(new int[] { 0, 0, 0, 0 });
|
||||||
|
sePreisProWoche.Location = new System.Drawing.Point(466, 63);
|
||||||
|
sePreisProWoche.Name = "sePreisProWoche";
|
||||||
|
sePreisProWoche.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) });
|
||||||
|
sePreisProWoche.Properties.MaskSettings.Set("mask", "c2");
|
||||||
|
sePreisProWoche.Properties.UseMaskAsDisplayFormat = true;
|
||||||
|
sePreisProWoche.Size = new System.Drawing.Size(201, 20);
|
||||||
|
sePreisProWoche.TabIndex = 25;
|
||||||
|
//
|
||||||
|
// FrmWerkzeugeHinzufügen
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Name = "FrmWerkzeugeHinzufügen";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
Text = "Werkzeuge - Hinzufügen";
|
||||||
|
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
tableLayoutPanel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)seKaution.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtName.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtModell.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtSeriennummer.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)txtBezeichnung.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)lueHersteller.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProTag.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProWochenende.Properties).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)sePreisProWoche.Properties).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl2;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl4;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl5;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl6;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl7;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl8;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl9;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtName;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtModell;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtSeriennummer;
|
||||||
|
private DevExpress.XtraEditors.TextEdit txtBezeichnung;
|
||||||
|
private DevExpress.XtraEditors.LookUpEdit lueHersteller;
|
||||||
|
private DevExpress.XtraEditors.SimpleButton btnWerkzeugHinzufügen;
|
||||||
|
private DevExpress.XtraEditors.LabelControl labelControl3;
|
||||||
|
private DevExpress.XtraEditors.SpinEdit seKaution;
|
||||||
|
private DevExpress.XtraEditors.SpinEdit sePreisProTag;
|
||||||
|
private DevExpress.XtraEditors.SpinEdit sePreisProWochenende;
|
||||||
|
private DevExpress.XtraEditors.SpinEdit sePreisProWoche;
|
||||||
|
}
|
||||||
|
}
|
||||||
110
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.cs
Normal file
110
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.cs
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
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 Werkzeugverleih.Klassen;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Formen.Werkzeuge
|
||||||
|
{
|
||||||
|
public partial class FrmWerkzeugeHinzufügen : Form
|
||||||
|
{
|
||||||
|
public FrmWerkzeugeHinzufügen()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
lueHerstellerFüllen();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrmWerkzeugeHinzufügen_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void lueHerstellerFüllen()
|
||||||
|
{
|
||||||
|
List<Hersteller> hersteller = new List<Hersteller>();
|
||||||
|
|
||||||
|
using (var con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
const string sql = @"SELECT id, name FROM tool_manufacturer ORDER BY name;";
|
||||||
|
|
||||||
|
using (var cmd = new MySqlCommand(sql, con))
|
||||||
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
hersteller.Add(new Hersteller
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32("id"),
|
||||||
|
Name = reader.GetString("name")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lueHersteller.Properties.DataSource = hersteller;
|
||||||
|
lueHersteller.Properties.DisplayMember = nameof(Hersteller.Name);
|
||||||
|
lueHersteller.Properties.ValueMember = nameof(Hersteller.Id);
|
||||||
|
|
||||||
|
lueHersteller.Properties.NullText = "(kein Hersteller)";
|
||||||
|
lueHersteller.EditValue = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnWerkzeugHinzufügen_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string name = txtName.Text;
|
||||||
|
int manufacturer_id = Convert.ToInt32(lueHersteller.EditValue);
|
||||||
|
string model = txtModell.Text;
|
||||||
|
|
||||||
|
// Hol den 'decimal'-Wert aus den SpinEdits, multipliziere mit 100 und konvertiere zu int.
|
||||||
|
// Dies ist der sichere und richtige Weg!
|
||||||
|
int daily_price_cents = Convert.ToInt32(sePreisProTag.Value * 100);
|
||||||
|
int weekend_price_cents = Convert.ToInt32(sePreisProWochenende.Value * 100);
|
||||||
|
int weekly_price_cents = Convert.ToInt32(sePreisProWoche.Value * 100);
|
||||||
|
int deposit_cents = Convert.ToInt32(seKaution.Value * 100);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (MySqlConnection con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
string sql = @"INSERT INTO tools (name, manufacturer_id, model, daily_price_cents, weekend_price_cents, weekly_price_cents, deposit_cents)
|
||||||
|
VALUES (@name, @manufacturer_id, @model, @daily_price_cents, @weekend_price_cents, @weekly_price_cents, @deposit_cents)";
|
||||||
|
|
||||||
|
using (MySqlCommand cmd = new MySqlCommand(sql, con))
|
||||||
|
{
|
||||||
|
// Die Parameter werden jetzt mit den korrekten Integer-Werten (in Cent) befüllt.
|
||||||
|
cmd.Parameters.AddWithValue("@name", name);
|
||||||
|
cmd.Parameters.AddWithValue("@manufacturer_id", manufacturer_id);
|
||||||
|
cmd.Parameters.AddWithValue("@model", model);
|
||||||
|
cmd.Parameters.AddWithValue("@daily_price_cents", daily_price_cents);
|
||||||
|
cmd.Parameters.AddWithValue("@weekend_price_cents", weekend_price_cents);
|
||||||
|
cmd.Parameters.AddWithValue("@weekly_price_cents", weekly_price_cents);
|
||||||
|
cmd.Parameters.AddWithValue("@deposit_cents", deposit_cents);
|
||||||
|
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//txtName.Clear();
|
||||||
|
}
|
||||||
|
catch (MySqlException ex) when (ex.Number == 1062)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"Das Werkzeug '{name}' existiert bereits!", "Duplikat", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Fange auch andere mögliche Fehler ab
|
||||||
|
MessageBox.Show("Ein unerwarteter Fehler ist aufgetreten: " + ex.Message, "Fehler", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.resx
Normal file
120
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeHinzufügen.resx
Normal 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>
|
||||||
107
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.Designer.cs
generated
Normal file
107
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.Designer.cs
generated
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
namespace Werkzeugverleih.Formen.Werkzeuge
|
||||||
|
{
|
||||||
|
partial class FrmWerkzeugeÜbersicht
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
gcWerkzeugÜbersicht = new DevExpress.XtraGrid.GridControl();
|
||||||
|
gvWerkzeugÜbersicht = new DevExpress.XtraGrid.Views.Grid.GridView();
|
||||||
|
tableLayoutPanel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gcWerkzeugÜbersicht).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gvWerkzeugÜbersicht).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// tableLayoutPanel1
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.ColumnCount = 8;
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 12.5F));
|
||||||
|
tableLayoutPanel1.Controls.Add(gcWerkzeugÜbersicht, 0, 1);
|
||||||
|
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
|
tableLayoutPanel1.RowCount = 8;
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.666666F));
|
||||||
|
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
|
||||||
|
tableLayoutPanel1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// gcWerkzeugÜbersicht
|
||||||
|
//
|
||||||
|
tableLayoutPanel1.SetColumnSpan(gcWerkzeugÜbersicht, 8);
|
||||||
|
gcWerkzeugÜbersicht.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
gcWerkzeugÜbersicht.Location = new System.Drawing.Point(3, 33);
|
||||||
|
gcWerkzeugÜbersicht.MainView = gvWerkzeugÜbersicht;
|
||||||
|
gcWerkzeugÜbersicht.Name = "gcWerkzeugÜbersicht";
|
||||||
|
tableLayoutPanel1.SetRowSpan(gcWerkzeugÜbersicht, 6);
|
||||||
|
gcWerkzeugÜbersicht.Size = new System.Drawing.Size(794, 384);
|
||||||
|
gcWerkzeugÜbersicht.TabIndex = 0;
|
||||||
|
gcWerkzeugÜbersicht.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gvWerkzeugÜbersicht });
|
||||||
|
//
|
||||||
|
// gvWerkzeugÜbersicht
|
||||||
|
//
|
||||||
|
gvWerkzeugÜbersicht.GridControl = gcWerkzeugÜbersicht;
|
||||||
|
gvWerkzeugÜbersicht.Name = "gvWerkzeugÜbersicht";
|
||||||
|
//
|
||||||
|
// FrmWerkzeugeÜbersicht
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(800, 450);
|
||||||
|
Controls.Add(tableLayoutPanel1);
|
||||||
|
Name = "FrmWerkzeugeÜbersicht";
|
||||||
|
ShowIcon = false;
|
||||||
|
ShowInTaskbar = false;
|
||||||
|
Text = "Werkzeuge - Übersicht";
|
||||||
|
WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||||
|
Shown += FrmWerkzeugeÜbersicht_Shown;
|
||||||
|
tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)gcWerkzeugÜbersicht).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)gvWerkzeugÜbersicht).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||||
|
private DevExpress.XtraGrid.GridControl gcWerkzeugÜbersicht;
|
||||||
|
private DevExpress.XtraGrid.Views.Grid.GridView gvWerkzeugÜbersicht;
|
||||||
|
}
|
||||||
|
}
|
||||||
55
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.cs
Normal file
55
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.cs
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
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 Werkzeugverleih.Klassen;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Formen.Werkzeuge
|
||||||
|
{
|
||||||
|
public partial class FrmWerkzeugeÜbersicht : Form
|
||||||
|
{
|
||||||
|
public FrmWerkzeugeÜbersicht()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FrmWerkzeugeÜbersicht_Shown(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
List<Werkzeug> werkzeug = new List<Werkzeug>();
|
||||||
|
|
||||||
|
using (var con = new MySqlConnection(DBTools.ConnectionString()))
|
||||||
|
{
|
||||||
|
con.Open();
|
||||||
|
|
||||||
|
string sql = @"SELECT id, name, description, model, serial_number, daily_price_cents, weekend_price_cents, weekly_price_cents, deposit_cents FROM tools;";
|
||||||
|
|
||||||
|
using (var cmd = new MySqlCommand(sql, con))
|
||||||
|
using (var reader = cmd.ExecuteReader())
|
||||||
|
{
|
||||||
|
while (reader.Read())
|
||||||
|
{
|
||||||
|
werkzeug.Add(new Werkzeug
|
||||||
|
{
|
||||||
|
Id = reader.GetInt32("id"),
|
||||||
|
Name = reader.GetString("name"),
|
||||||
|
Beschreibung = reader.GetString("description"),
|
||||||
|
Model = reader.GetString("model"),
|
||||||
|
Seriennummer = reader.GetString("serial_number"),
|
||||||
|
PreisProTag = reader.GetInt32("daily_price_cents"),
|
||||||
|
PreisProWochenende = reader.GetInt32("weekend_price_cents"),
|
||||||
|
PreisProWoche = reader.GetInt32("weekly_price_cents"),
|
||||||
|
Kaution = reader.GetInt32("deposit_cents")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gcWerkzeugÜbersicht.DataSource = werkzeug;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.resx
Normal file
120
Werkzeugverleih/Formen/Werkzeuge/FrmWerkzeugeÜbersicht.resx
Normal 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>
|
||||||
229
Werkzeugverleih/FrmMain.Designer.cs
generated
Normal file
229
Werkzeugverleih/FrmMain.Designer.cs
generated
Normal file
@ -0,0 +1,229 @@
|
|||||||
|
namespace Werkzeugverleih
|
||||||
|
{
|
||||||
|
partial class FrmMain
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
|
||||||
|
ribbonControl1 = new DevExpress.XtraBars.Ribbon.RibbonControl();
|
||||||
|
btnWerkzeugÜbersicht = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
barButtonItem2 = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
barButtonItem3 = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
btnKategorieHinzufügen = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
btnHerstellerHinzufügen = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
btnHerstellerÜbersicht = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||||
|
ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
ribbonPage5 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||||
|
ribbonPageGroup5 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
ribbonPage2 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||||
|
ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
ribbonPage3 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||||
|
ribbonPageGroup6 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
ribbonPageGroup7 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
ribbonPage4 = new DevExpress.XtraBars.Ribbon.RibbonPage();
|
||||||
|
ribbonPageGroup4 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
|
||||||
|
btnWerkzeugHinzufügen = new DevExpress.XtraBars.BarButtonItem();
|
||||||
|
((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// ribbonControl1
|
||||||
|
//
|
||||||
|
ribbonControl1.ExpandCollapseItem.Id = 0;
|
||||||
|
ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, btnWerkzeugÜbersicht, barButtonItem1, barButtonItem2, barButtonItem3, btnKategorieHinzufügen, btnHerstellerHinzufügen, btnHerstellerÜbersicht, btnWerkzeugHinzufügen });
|
||||||
|
ribbonControl1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
ribbonControl1.MaxItemId = 10;
|
||||||
|
ribbonControl1.Name = "ribbonControl1";
|
||||||
|
ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1, ribbonPage5, ribbonPage2, ribbonPage3, ribbonPage4 });
|
||||||
|
ribbonControl1.Size = new System.Drawing.Size(956, 158);
|
||||||
|
//
|
||||||
|
// btnWerkzeugÜbersicht
|
||||||
|
//
|
||||||
|
btnWerkzeugÜbersicht.Caption = "Übersicht";
|
||||||
|
btnWerkzeugÜbersicht.Description = "Übersicht über alle Geräte und die wichtigsten Daten";
|
||||||
|
btnWerkzeugÜbersicht.Id = 1;
|
||||||
|
btnWerkzeugÜbersicht.Name = "btnWerkzeugÜbersicht";
|
||||||
|
btnWerkzeugÜbersicht.ItemClick += btnWerkzeugÜbersicht_ItemClick;
|
||||||
|
//
|
||||||
|
// barButtonItem1
|
||||||
|
//
|
||||||
|
barButtonItem1.Caption = "barButtonItem1";
|
||||||
|
barButtonItem1.Id = 2;
|
||||||
|
barButtonItem1.Name = "barButtonItem1";
|
||||||
|
//
|
||||||
|
// barButtonItem2
|
||||||
|
//
|
||||||
|
barButtonItem2.Caption = "barButtonItem2";
|
||||||
|
barButtonItem2.Id = 3;
|
||||||
|
barButtonItem2.Name = "barButtonItem2";
|
||||||
|
//
|
||||||
|
// barButtonItem3
|
||||||
|
//
|
||||||
|
barButtonItem3.Caption = "barButtonItem3";
|
||||||
|
barButtonItem3.Id = 4;
|
||||||
|
barButtonItem3.Name = "barButtonItem3";
|
||||||
|
//
|
||||||
|
// btnKategorieHinzufügen
|
||||||
|
//
|
||||||
|
btnKategorieHinzufügen.Caption = "Hinzufügen";
|
||||||
|
btnKategorieHinzufügen.Id = 6;
|
||||||
|
btnKategorieHinzufügen.Name = "btnKategorieHinzufügen";
|
||||||
|
btnKategorieHinzufügen.ItemClick += btnKategorieHinzufügen_ItemClick;
|
||||||
|
//
|
||||||
|
// btnHerstellerHinzufügen
|
||||||
|
//
|
||||||
|
btnHerstellerHinzufügen.Caption = "Hinzufügen";
|
||||||
|
btnHerstellerHinzufügen.Id = 7;
|
||||||
|
btnHerstellerHinzufügen.ImageOptions.Image = (System.Drawing.Image)resources.GetObject("btnHerstellerHinzufügen.ImageOptions.Image");
|
||||||
|
btnHerstellerHinzufügen.Name = "btnHerstellerHinzufügen";
|
||||||
|
btnHerstellerHinzufügen.ItemClick += btnHerstellerHinzufügen_ItemClick;
|
||||||
|
//
|
||||||
|
// btnHerstellerÜbersicht
|
||||||
|
//
|
||||||
|
btnHerstellerÜbersicht.Caption = "Übersicht";
|
||||||
|
btnHerstellerÜbersicht.Id = 8;
|
||||||
|
btnHerstellerÜbersicht.ImageOptions.Image = (System.Drawing.Image)resources.GetObject("btnHerstellerÜbersicht.ImageOptions.Image");
|
||||||
|
btnHerstellerÜbersicht.Name = "btnHerstellerÜbersicht";
|
||||||
|
btnHerstellerÜbersicht.ItemClick += btnHerstellerÜbersicht_ItemClick;
|
||||||
|
//
|
||||||
|
// ribbonPage1
|
||||||
|
//
|
||||||
|
ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup1 });
|
||||||
|
ribbonPage1.Name = "ribbonPage1";
|
||||||
|
ribbonPage1.Text = "ribbonPage1";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup1
|
||||||
|
//
|
||||||
|
ribbonPageGroup1.AllowTextClipping = false;
|
||||||
|
ribbonPageGroup1.Name = "ribbonPageGroup1";
|
||||||
|
ribbonPageGroup1.Text = "ribbonPageGroup1";
|
||||||
|
//
|
||||||
|
// ribbonPage5
|
||||||
|
//
|
||||||
|
ribbonPage5.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup5 });
|
||||||
|
ribbonPage5.Name = "ribbonPage5";
|
||||||
|
ribbonPage5.Text = "Werkzeuge";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup5
|
||||||
|
//
|
||||||
|
ribbonPageGroup5.AllowTextClipping = false;
|
||||||
|
ribbonPageGroup5.ItemLinks.Add(btnWerkzeugÜbersicht);
|
||||||
|
ribbonPageGroup5.ItemLinks.Add(btnWerkzeugHinzufügen);
|
||||||
|
ribbonPageGroup5.Name = "ribbonPageGroup5";
|
||||||
|
ribbonPageGroup5.Text = "Übersicht";
|
||||||
|
//
|
||||||
|
// ribbonPage2
|
||||||
|
//
|
||||||
|
ribbonPage2.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup2 });
|
||||||
|
ribbonPage2.Name = "ribbonPage2";
|
||||||
|
ribbonPage2.Text = "Kunden";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup2
|
||||||
|
//
|
||||||
|
ribbonPageGroup2.Name = "ribbonPageGroup2";
|
||||||
|
ribbonPageGroup2.Text = "ribbonPageGroup2";
|
||||||
|
//
|
||||||
|
// ribbonPage3
|
||||||
|
//
|
||||||
|
ribbonPage3.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup6, ribbonPageGroup7 });
|
||||||
|
ribbonPage3.Name = "ribbonPage3";
|
||||||
|
ribbonPage3.Text = "Stammdaten";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup6
|
||||||
|
//
|
||||||
|
ribbonPageGroup6.ItemLinks.Add(btnKategorieHinzufügen);
|
||||||
|
ribbonPageGroup6.Name = "ribbonPageGroup6";
|
||||||
|
ribbonPageGroup6.Text = "Kategorien";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup7
|
||||||
|
//
|
||||||
|
ribbonPageGroup7.AllowTextClipping = false;
|
||||||
|
ribbonPageGroup7.ItemLinks.Add(btnHerstellerHinzufügen);
|
||||||
|
ribbonPageGroup7.ItemLinks.Add(btnHerstellerÜbersicht);
|
||||||
|
ribbonPageGroup7.Name = "ribbonPageGroup7";
|
||||||
|
ribbonPageGroup7.Text = "Hersteller";
|
||||||
|
//
|
||||||
|
// ribbonPage4
|
||||||
|
//
|
||||||
|
ribbonPage4.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { ribbonPageGroup4 });
|
||||||
|
ribbonPage4.Name = "ribbonPage4";
|
||||||
|
ribbonPage4.Text = "ribbonPage4";
|
||||||
|
//
|
||||||
|
// ribbonPageGroup4
|
||||||
|
//
|
||||||
|
ribbonPageGroup4.Name = "ribbonPageGroup4";
|
||||||
|
ribbonPageGroup4.Text = "ribbonPageGroup4";
|
||||||
|
//
|
||||||
|
// btnWerkzeugHinzufügen
|
||||||
|
//
|
||||||
|
btnWerkzeugHinzufügen.Caption = "Hinzufügen";
|
||||||
|
btnWerkzeugHinzufügen.Id = 9;
|
||||||
|
btnWerkzeugHinzufügen.Name = "btnWerkzeugHinzufügen";
|
||||||
|
btnWerkzeugHinzufügen.ItemClick += btnWerkzeugHinzufügen_ItemClick;
|
||||||
|
//
|
||||||
|
// FrmMain
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
ClientSize = new System.Drawing.Size(956, 532);
|
||||||
|
Controls.Add(ribbonControl1);
|
||||||
|
IsMdiContainer = true;
|
||||||
|
Name = "FrmMain";
|
||||||
|
Ribbon = ribbonControl1;
|
||||||
|
Text = "Form1";
|
||||||
|
((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl1;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage1;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup1;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage5;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup5;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage2;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup2;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage3;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage4;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup4;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem btnWerkzeugÜbersicht;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem barButtonItem1;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem barButtonItem2;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem barButtonItem3;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem btnKategorieHinzufügen;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup6;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem btnHerstellerHinzufügen;
|
||||||
|
private DevExpress.XtraBars.Ribbon.RibbonPageGroup ribbonPageGroup7;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem btnHerstellerÜbersicht;
|
||||||
|
private DevExpress.XtraBars.BarButtonItem btnWerkzeugHinzufügen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
56
Werkzeugverleih/FrmMain.cs
Normal file
56
Werkzeugverleih/FrmMain.cs
Normal 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.Windows.Forms;
|
||||||
|
using Werkzeugverleih.Formen.Stammdaten;
|
||||||
|
using Werkzeugverleih.Formen.Werkzeuge;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih
|
||||||
|
{
|
||||||
|
public partial class FrmMain : DevExpress.XtraBars.Ribbon.RibbonForm
|
||||||
|
{
|
||||||
|
public FrmMain()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnKategorieHinzufügen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
FrmKategorieHinzufügen form = new FrmKategorieHinzufügen();
|
||||||
|
form.MdiParent = this;
|
||||||
|
form.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnWerkzeugÜbersicht_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
FrmWerkzeugeÜbersicht form = new FrmWerkzeugeÜbersicht();
|
||||||
|
form.MdiParent = this;
|
||||||
|
form.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnHerstellerHinzufügen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
FrmHerstellerHinzufügen form = new FrmHerstellerHinzufügen();
|
||||||
|
form.MdiParent = this;
|
||||||
|
form.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnHerstellerÜbersicht_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
FrmHerstellerÜbersicht form = new FrmHerstellerÜbersicht();
|
||||||
|
form.MdiParent = this;
|
||||||
|
form.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btnWerkzeugHinzufügen_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||||
|
{
|
||||||
|
FrmWerkzeugeHinzufügen form = new FrmWerkzeugeHinzufügen();
|
||||||
|
form.MdiParent = this;
|
||||||
|
form.Show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
204
Werkzeugverleih/FrmMain.resx
Normal file
204
Werkzeugverleih/FrmMain.resx
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
<?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>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="btnHerstellerHinzufügen.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
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
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnHerstellerÜbersicht.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||||
|
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAedEVYdFRpdGxlAEF1dG9GaXQ7Rml0O0NvbHVtbjtH
|
||||||
|
cmlkO61jphwAAAYWSURBVFhHxZZZUxRXGIY/s5jExH3N9hMCyDbMwr5ortyQRWFE0KSSC/UqqAhIrMiO
|
||||||
|
JiVYgIkaZcAoygzDJsguYC7UACpLobe5MIbdAqz6Uu/p7qFn8yKpJFP11Dl9OOc87/ma6m5iZvo/cRr4
|
||||||
|
r6Hgz78UBIn2CwoCWwVZQVsPUuCWgxQYdUBgiDrAhqgUMkSmkD4ymfQRErqI/aQN30/asH2sDUsibaiR
|
||||||
|
AsKMFBCaSJqQxCxNCNoE8g9OIL/gveQXtId8A+OVADYhQRgkhELKhqgDWUIopMmQMmR6CCOSSBeeRNrw
|
||||||
|
fRQQJhNq5ABFJgmz/IP3MoR+gSCefA3x5GOIIx9DrBRACBWkU0pEprAhMpn1kclZEOrCBayFVAiVUxoJ
|
||||||
|
UiEMSWB/+YR+QXuyfAP3sG9gPPuopN76WNqsixGIAIFbUlBW1gMIIyQg04UnoaSM0sqnZCEMhTCRNMGJ
|
||||||
|
JAmVsgoh+Rri2EdBH8veuljerIsReGl3s5c2mr0ColkEEPcycj/pxL1ESSUkmRBmQCrfR9bYhIv3Ujqh
|
||||||
|
JMYJBbrYDCHV7gbkFRBNngHR5KVBu4s8NDulCkilVd1LcUIjaUKN7B+SkCHdS5uUfYPiVdI48jbEko8+
|
||||||
|
jrz1MeQthDEkhNpokOEZsIsh9NSAneSh2UGf+e8gD//tUgB3P//gvRmOY76G+NesIAid/u6h2em0j/Jz
|
||||||
|
DLBE5g13eOt3Y4XTuIKnZsdr/y4Dh1MADL5JREuJ6F0ieo+Ilv1N3ncD9nxH9ogQ6gBItvT81e6OclMf
|
||||||
|
l1fKmPq4rLKPy0Tby2m5FntyzILjuTI5Fi4z9XJpRS+Xmvq4FH20uK7o5ZIrXR1yCPicAizD4tmXr3jm
|
||||||
|
5SvROnKraZBHnj3n/pHfnRh+9pyrGwfs1jvuc/5qD4yoBqpgFwADH2ACFr2YmOM/weSc1J+UyDrTyB2/
|
||||||
|
PuO6jmGuB+1Dol/XPsTt957yyaIG2zpHZl4ucPGVuzAudxdgecmVu2LiC4hlua0/OScEEFnbhiTa5bZt
|
||||||
|
iNvuPeWMwvrFAKq1uJ5GgMvdMK4gordcBViBCQggNsEGMsp1ZmEDt90bY2vbE7a2PuFawZBoW/vGpAAO
|
||||||
|
cuUQCHDuYheMK10FwMAKTJiZlQI4nh7XmYX1QmSR5Wgtdx4L7vSNcXpB3aJUvcfEHE/PLvD3P3XCuMpd
|
||||||
|
gJWY0NI9wuWmXi6v7LVrL1T2CoEd+facyK/jclMPl5l6pLVyHzR1DvOZC+0wrnYXYNXZHztEUqXsjqeA
|
||||||
|
pKVnlGtaHrG55ZFowa3mx9xyd5RP5Fud18pMzS5wYVkbjGuI6G1XAVYXlbXbArgCAohuNQ/auCnT3D3K
|
||||||
|
abm1TmvUAQpKW2Fc6yoABtZgAiY6LrYFyLPy7e5Rvnl7UFAttzebBripa4TT8mr5DxfrMDY1s8B5JS0w
|
||||||
|
rpN9SxwDrMUETHS1Adq0XKsQVTcNcnXTgOBGowTGj+eqAozL68blCswscHZxM4zr3QVYl1PcLAXAInmh
|
||||||
|
LcT4HB/PtXBj5zBfh7Shn280DPD1hn5BfecwH8uptYkF6Mv7TM4s8Olzt2Hc4BgALwYMrMeEmqZBLvm5
|
||||||
|
W+Jylx141kNyDG02+sAsX5vFGOYVqyi51MnFlzq5ur6fT/3QBONG+aXnFGADJiCpcmK7co7PCVF9xxD/
|
||||||
|
Uveb4JqNh1zX/oSPZpsX16lOLyowNc/fnm2AcZOrABjYeOpsI09OL9jK51jOo9kWIaqyPrRRKYOnY+pp
|
||||||
|
s1Pplf7k9DyfLKp/bYBNWUX1YqLjYuVEOCEewRCaah/YUXvnMad+V+O0Vvl/mpie58zCOhg/dBsAE1Aq
|
||||||
|
dQnVlUg9XSNEJssDrrDcZ5P5Plegb77PlpZH/I0cQB1c6SNAekEtjB/J3wROATakF1jFxImp+cVWBZ5k
|
||||||
|
tpeRQqtEW98Y55e28vjUvFtO5Fnc3gLxKP762KWOI5lVfDjjmkSm1B4R11W83VjA24z5vM1YoOqrSMwX
|
||||||
|
8w5hfvo1PpRexYfTcS21X6Ve7JQfxfDZPQfwRYSy4E2FhB/LfPIP+FQFrnHv8SLCN6fTJ5nyNYxkKA/C
|
||||||
|
/Btgf9uXMQL8BZ/GNictdAmlAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
16
Werkzeugverleih/Klassen/DBTools.cs
Normal file
16
Werkzeugverleih/Klassen/DBTools.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Klassen
|
||||||
|
{
|
||||||
|
public class DBTools
|
||||||
|
{
|
||||||
|
public static string ConnectionString()
|
||||||
|
{
|
||||||
|
return "Server=192.168.178.201;Database=werkzeugverleih;User ID=werkzeugverleih;Password=1td5rugut8;";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
36
Werkzeugverleih/Klassen/Werkzeug.cs
Normal file
36
Werkzeugverleih/Klassen/Werkzeug.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Klassen
|
||||||
|
{
|
||||||
|
public class Werkzeug
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Beschreibung { get; set; }
|
||||||
|
public int? HerstellerId { get; set; }
|
||||||
|
public Hersteller? Hersteller { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string Seriennummer { get; set; }
|
||||||
|
public int PreisProTag { get; set; }
|
||||||
|
public int PreisProWochenende { get; set; }
|
||||||
|
public int PreisProWoche { get; set; }
|
||||||
|
public int Kaution { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Hersteller
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; } = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Hauptkategorie
|
||||||
|
{
|
||||||
|
public int Id { get; init; }
|
||||||
|
public string Name { get; init; } = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
23
Werkzeugverleih/Program.cs
Normal file
23
Werkzeugverleih/Program.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using DevExpress.Skins;
|
||||||
|
using DevExpress.UserSkins;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Werkzeugverleih
|
||||||
|
{
|
||||||
|
internal static class Program
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point for the application.
|
||||||
|
/// </summary>
|
||||||
|
[STAThread]
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Application.EnableVisualStyles();
|
||||||
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
Application.Run(new FrmMain());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
63
Werkzeugverleih/Properties/Resources.Designer.cs
generated
Normal file
63
Werkzeugverleih/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// Dieser Code wurde von einem Tool generiert.
|
||||||
|
// Laufzeitversion:4.0.30319.42000
|
||||||
|
//
|
||||||
|
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
// der Code erneut generiert wird.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Properties {
|
||||||
|
using System;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
/// </summary>
|
||||||
|
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
// -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 /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.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 (object.ReferenceEquals(resourceMan, null)) {
|
||||||
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Werkzeugverleih.Properties.Resources", typeof(Resources).Assembly);
|
||||||
|
resourceMan = temp;
|
||||||
|
}
|
||||||
|
return resourceMan;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
/// Ressourcenzuordnungen, 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
120
Werkzeugverleih/Properties/Resources.resx
Normal file
120
Werkzeugverleih/Properties/Resources.resx
Normal 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>
|
||||||
30
Werkzeugverleih/Properties/Settings.Designer.cs
generated
Normal file
30
Werkzeugverleih/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.18047
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace Werkzeugverleih.Properties
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Werkzeugverleih/Properties/Settings.settings
Normal file
7
Werkzeugverleih/Properties/Settings.settings
Normal 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>
|
||||||
29
Werkzeugverleih/Werkzeugverleih.csproj
Normal file
29
Werkzeugverleih/Werkzeugverleih.csproj
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="DevExpress.Win.Design" Version="25.2.4" />
|
||||||
|
<PackageReference Include="MySql.Data" Version="9.6.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Update="Properties\Resources.resx">
|
||||||
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Loading…
Reference in New Issue
Block a user