2021-05-19 SQL & Template für Aufgabe
This commit is contained in:
530
powershell/11fi3_ste_v3_schueler.ps1
Normal file
530
powershell/11fi3_ste_v3_schueler.ps1
Normal file
@ -0,0 +1,530 @@
|
||||
#. C:\tmp\controller_ste.ps1
|
||||
|
||||
#Generated Form Function
|
||||
function GenerateForm {
|
||||
########################################################################
|
||||
# Code Generated By: SAPIEN Technologies PrimalForms (Community Edition) v1.0.10.0
|
||||
# Generated On: 17.03.2021 18:07
|
||||
# Generated By: Steinam
|
||||
########################################################################
|
||||
|
||||
#region Import the Assemblies
|
||||
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null
|
||||
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null
|
||||
#endregion
|
||||
|
||||
#region Generated Form Objects
|
||||
$form1 = New-Object System.Windows.Forms.Form
|
||||
$btnSearch = New-Object System.Windows.Forms.Button
|
||||
$lblAbteilung_User = New-Object System.Windows.Forms.Label
|
||||
$lstAbeilung = New-Object System.Windows.Forms.ListBox
|
||||
$lblSuche = New-Object System.Windows.Forms.Label
|
||||
$txtSearch = New-Object System.Windows.Forms.TextBox
|
||||
$lblAbteilung = New-Object System.Windows.Forms.Label
|
||||
$btnDelete = New-Object System.Windows.Forms.Button
|
||||
$lblIDValue = New-Object System.Windows.Forms.Label
|
||||
$lblID = New-Object System.Windows.Forms.Label
|
||||
$btnUpdate = New-Object System.Windows.Forms.Button
|
||||
$btnInsert = New-Object System.Windows.Forms.Button
|
||||
$txtEmail = New-Object System.Windows.Forms.TextBox
|
||||
$txtPassword = New-Object System.Windows.Forms.TextBox
|
||||
$txtVorname = New-Object System.Windows.Forms.TextBox
|
||||
$txtName = New-Object System.Windows.Forms.TextBox
|
||||
$lblEmail = New-Object System.Windows.Forms.Label
|
||||
$lblPassword = New-Object System.Windows.Forms.Label
|
||||
$lblVorname = New-Object System.Windows.Forms.Label
|
||||
$lblName = New-Object System.Windows.Forms.Label
|
||||
$dataGridView = New-Object System.Windows.Forms.DataGridView
|
||||
$cboAbteilung = New-Object System.Windows.Forms.ComboBox
|
||||
$InitialFormWindowState = New-Object System.Windows.Forms.FormWindowState
|
||||
#endregion Generated Form Objects
|
||||
|
||||
#----------------------------------------------
|
||||
#Generated Event Script Blocks
|
||||
#----------------------------------------------
|
||||
#Provide Custom Code for events specified in PrimalForms.
|
||||
$handler_dataGridView_SelectionChanged=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
Write-Host "DaVIW SelectionChanged "
|
||||
|
||||
fillTextBoxes
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$btnSearch_OnClick=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
searchUsersForDGridview $txtSearch.Text
|
||||
|
||||
|
||||
}
|
||||
|
||||
$handler_cboAbteilung_SelectedIndexChanged=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
|
||||
fillDataGridForAbteilung $cboAbteilung.Text
|
||||
|
||||
}
|
||||
|
||||
$handler_dataGridView_RowsRemoved=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$handler_dataGridView_CellEnter=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$handler_btnUpdate_Click=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
updateUser $txtEmail.Text $txtPassword.Text $txtName.Text $lblIDValue.Text $lstAbeilung.Text
|
||||
fillDataGridForAbteilung $cboAbteilung.Text
|
||||
[System.Windows.Forms.MessageBox]::Show("Deine Nachricht","Dein Titel",0)
|
||||
|
||||
}
|
||||
|
||||
$handler_dataGridView_CellContentClick=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$handler_cboAbteilung_Click=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$handler_dataGridView_Click=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$handler_btnDelete_Click=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
deleteUser $lblIDValue.Text
|
||||
#[System.Windows.Forms.MessageBox]::Show("Deine Nachricht","Dein Titel",0)
|
||||
|
||||
}
|
||||
|
||||
$handler_form1_Load=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
|
||||
fillcboAbteilung
|
||||
filllboAbteilung
|
||||
|
||||
}
|
||||
|
||||
$handler_cboAbteilung_SelectedValueChanged=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
|
||||
}
|
||||
|
||||
$handler_btnInsert_Click=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
#[System.Windows.Forms.MessageBox]::Show("Deine Nachricht","Dein Titel",0)
|
||||
|
||||
insertUser $txtEmail.Text $txtPassword.Text $txtName.Text $lstAbeilung.Text
|
||||
fillDataGridForAbteilung $cboAbteilung.Text
|
||||
|
||||
|
||||
}
|
||||
|
||||
$handler_dataGridView_CellClick=
|
||||
{
|
||||
#TODO: Place custom script here
|
||||
|
||||
}
|
||||
|
||||
$OnLoadForm_StateCorrection=
|
||||
{#Correct the initial state of the form to prevent the .Net maximized form issue
|
||||
$form1.WindowState = $InitialFormWindowState
|
||||
$dataGridView.Visible = $true
|
||||
}
|
||||
|
||||
#----------------------------------------------
|
||||
#region Generated Form Code
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 502
|
||||
$System_Drawing_Size.Width = 1100
|
||||
$form1.ClientSize = $System_Drawing_Size
|
||||
$form1.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$form1.Name = "form1"
|
||||
$form1.Text = "Primal Form"
|
||||
$form1.add_Load($handler_form1_Load)
|
||||
|
||||
|
||||
$btnSearch.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 108
|
||||
$btnSearch.Location = $System_Drawing_Point
|
||||
$btnSearch.Name = "btnSearch"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 171
|
||||
$btnSearch.Size = $System_Drawing_Size
|
||||
$btnSearch.TabIndex = 20
|
||||
$btnSearch.Text = "Suche"
|
||||
$btnSearch.UseVisualStyleBackColor = $True
|
||||
$btnSearch.add_Click($btnSearch_OnClick)
|
||||
|
||||
$form1.Controls.Add($btnSearch)
|
||||
|
||||
$lblAbteilung_User.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 320
|
||||
$lblAbteilung_User.Location = $System_Drawing_Point
|
||||
$lblAbteilung_User.Name = "lblAbteilung_User"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 69
|
||||
$lblAbteilung_User.Size = $System_Drawing_Size
|
||||
$lblAbteilung_User.TabIndex = 19
|
||||
$lblAbteilung_User.Text = "Abteilung"
|
||||
|
||||
$form1.Controls.Add($lblAbteilung_User)
|
||||
|
||||
$lstAbeilung.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$lstAbeilung.FormattingEnabled = $True
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 320
|
||||
$lstAbeilung.Location = $System_Drawing_Point
|
||||
$lstAbeilung.Name = "lstAbeilung"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 69
|
||||
$System_Drawing_Size.Width = 171
|
||||
$lstAbeilung.Size = $System_Drawing_Size
|
||||
$lstAbeilung.TabIndex = 18
|
||||
|
||||
$form1.Controls.Add($lstAbeilung)
|
||||
|
||||
$lblSuche.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 61
|
||||
$lblSuche.Location = $System_Drawing_Point
|
||||
$lblSuche.Name = "lblSuche"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 69
|
||||
$lblSuche.Size = $System_Drawing_Size
|
||||
$lblSuche.TabIndex = 17
|
||||
$lblSuche.Text = "Suche"
|
||||
|
||||
$form1.Controls.Add($lblSuche)
|
||||
|
||||
$txtSearch.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 64
|
||||
$txtSearch.Location = $System_Drawing_Point
|
||||
$txtSearch.Name = "txtSearch"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 20
|
||||
$System_Drawing_Size.Width = 171
|
||||
$txtSearch.Size = $System_Drawing_Size
|
||||
$txtSearch.TabIndex = 16
|
||||
|
||||
$form1.Controls.Add($txtSearch)
|
||||
|
||||
$lblAbteilung.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 37
|
||||
$System_Drawing_Point.Y = 40
|
||||
$lblAbteilung.Location = $System_Drawing_Point
|
||||
$lblAbteilung.Name = "lblAbteilung"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 100
|
||||
$lblAbteilung.Size = $System_Drawing_Size
|
||||
$lblAbteilung.TabIndex = 15
|
||||
$lblAbteilung.Text = "Abteilung"
|
||||
|
||||
$form1.Controls.Add($lblAbteilung)
|
||||
|
||||
|
||||
$btnDelete.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 904
|
||||
$System_Drawing_Point.Y = 420
|
||||
$btnDelete.Location = $System_Drawing_Point
|
||||
$btnDelete.Name = "btnDelete"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 29
|
||||
$System_Drawing_Size.Width = 78
|
||||
$btnDelete.Size = $System_Drawing_Size
|
||||
$btnDelete.TabIndex = 14
|
||||
$btnDelete.Text = "Löschen"
|
||||
$btnDelete.UseVisualStyleBackColor = $True
|
||||
$btnDelete.add_Click($handler_btnDelete_Click)
|
||||
|
||||
$form1.Controls.Add($btnDelete)
|
||||
|
||||
$lblIDValue.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 167
|
||||
$lblIDValue.Location = $System_Drawing_Point
|
||||
$lblIDValue.Name = "lblIDValue"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 171
|
||||
$lblIDValue.Size = $System_Drawing_Size
|
||||
$lblIDValue.TabIndex = 13
|
||||
|
||||
$form1.Controls.Add($lblIDValue)
|
||||
|
||||
$lblID.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 167
|
||||
$lblID.Location = $System_Drawing_Point
|
||||
$lblID.Name = "lblID"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 26
|
||||
$System_Drawing_Size.Width = 51
|
||||
$lblID.Size = $System_Drawing_Size
|
||||
$lblID.TabIndex = 12
|
||||
$lblID.Text = "ID"
|
||||
|
||||
$form1.Controls.Add($lblID)
|
||||
|
||||
|
||||
$btnUpdate.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 420
|
||||
$btnUpdate.Location = $System_Drawing_Point
|
||||
$btnUpdate.Name = "btnUpdate"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 29
|
||||
$System_Drawing_Size.Width = 75
|
||||
$btnUpdate.Size = $System_Drawing_Size
|
||||
$btnUpdate.TabIndex = 11
|
||||
$btnUpdate.Text = "Ändern"
|
||||
$btnUpdate.UseVisualStyleBackColor = $True
|
||||
$btnUpdate.add_Click($handler_btnUpdate_Click)
|
||||
|
||||
$form1.Controls.Add($btnUpdate)
|
||||
|
||||
|
||||
$btnInsert.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 420
|
||||
$btnInsert.Location = $System_Drawing_Point
|
||||
$btnInsert.Name = "btnInsert"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 29
|
||||
$System_Drawing_Size.Width = 71
|
||||
$btnInsert.Size = $System_Drawing_Size
|
||||
$btnInsert.TabIndex = 10
|
||||
$btnInsert.Text = "Einfügen"
|
||||
$btnInsert.UseVisualStyleBackColor = $True
|
||||
$btnInsert.add_Click($handler_btnInsert_Click)
|
||||
|
||||
$form1.Controls.Add($btnInsert)
|
||||
|
||||
$txtEmail.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 287
|
||||
$txtEmail.Location = $System_Drawing_Point
|
||||
$txtEmail.Name = "txtEmail"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 20
|
||||
$System_Drawing_Size.Width = 171
|
||||
$txtEmail.Size = $System_Drawing_Size
|
||||
$txtEmail.TabIndex = 9
|
||||
|
||||
$form1.Controls.Add($txtEmail)
|
||||
|
||||
$txtPassword.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 251
|
||||
$txtPassword.Location = $System_Drawing_Point
|
||||
$txtPassword.Name = "txtPassword"
|
||||
$txtPassword.PasswordChar = '*'
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 20
|
||||
$System_Drawing_Size.Width = 171
|
||||
$txtPassword.Size = $System_Drawing_Size
|
||||
$txtPassword.TabIndex = 8
|
||||
|
||||
$form1.Controls.Add($txtPassword)
|
||||
|
||||
$txtVorname.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 219
|
||||
$txtVorname.Location = $System_Drawing_Point
|
||||
$txtVorname.Name = "txtVorname"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 20
|
||||
$System_Drawing_Size.Width = 171
|
||||
$txtVorname.Size = $System_Drawing_Size
|
||||
$txtVorname.TabIndex = 7
|
||||
|
||||
$form1.Controls.Add($txtVorname)
|
||||
|
||||
$txtName.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 811
|
||||
$System_Drawing_Point.Y = 193
|
||||
$txtName.Location = $System_Drawing_Point
|
||||
$txtName.Name = "txtName"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 20
|
||||
$System_Drawing_Size.Width = 171
|
||||
$txtName.Size = $System_Drawing_Size
|
||||
$txtName.TabIndex = 6
|
||||
|
||||
$form1.Controls.Add($txtName)
|
||||
|
||||
$lblEmail.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 734
|
||||
$System_Drawing_Point.Y = 287
|
||||
$lblEmail.Location = $System_Drawing_Point
|
||||
$lblEmail.Name = "lblEmail"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 17
|
||||
$System_Drawing_Size.Width = 71
|
||||
$lblEmail.Size = $System_Drawing_Size
|
||||
$lblEmail.TabIndex = 5
|
||||
$lblEmail.Text = "Email"
|
||||
|
||||
$form1.Controls.Add($lblEmail)
|
||||
|
||||
$lblPassword.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 254
|
||||
$lblPassword.Location = $System_Drawing_Point
|
||||
$lblPassword.Name = "lblPassword"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 71
|
||||
$lblPassword.Size = $System_Drawing_Size
|
||||
$lblPassword.TabIndex = 4
|
||||
$lblPassword.Text = "Password"
|
||||
|
||||
$form1.Controls.Add($lblPassword)
|
||||
|
||||
$lblVorname.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 734
|
||||
$System_Drawing_Point.Y = 222
|
||||
$lblVorname.Location = $System_Drawing_Point
|
||||
$lblVorname.Name = "lblVorname"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 71
|
||||
$lblVorname.Size = $System_Drawing_Size
|
||||
$lblVorname.TabIndex = 3
|
||||
$lblVorname.Text = "Vorname"
|
||||
|
||||
$form1.Controls.Add($lblVorname)
|
||||
|
||||
$lblName.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 732
|
||||
$System_Drawing_Point.Y = 193
|
||||
$lblName.Location = $System_Drawing_Point
|
||||
$lblName.Name = "lblName"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 23
|
||||
$System_Drawing_Size.Width = 73
|
||||
$lblName.Size = $System_Drawing_Size
|
||||
$lblName.TabIndex = 2
|
||||
$lblName.Text = "Name"
|
||||
|
||||
$form1.Controls.Add($lblName)
|
||||
|
||||
$dataGridView.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 37
|
||||
$System_Drawing_Point.Y = 113
|
||||
$dataGridView.Location = $System_Drawing_Point
|
||||
$dataGridView.Name = "dataGridView"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 341
|
||||
$System_Drawing_Size.Width = 613
|
||||
$dataGridView.Size = $System_Drawing_Size
|
||||
$dataGridView.TabIndex = 1
|
||||
$dataGridView.add_CellClick($handler_dataGridView_CellClick)
|
||||
$dataGridView.add_CellEnter($handler_dataGridView_CellEnter)
|
||||
$dataGridView.add_RowsRemoved($handler_dataGridView_RowsRemoved)
|
||||
$dataGridView.add_SelectionChanged($handler_dataGridView_SelectionChanged)
|
||||
$dataGridView.add_Click($handler_dataGridView_Click)
|
||||
$dataGridView.add_CellContentClick($handler_dataGridView_CellContentClick)
|
||||
|
||||
$form1.Controls.Add($dataGridView)
|
||||
|
||||
$cboAbteilung.DataBindings.DefaultDataSourceUpdateMode = 0
|
||||
$cboAbteilung.FormattingEnabled = $True
|
||||
$System_Drawing_Point = New-Object System.Drawing.Point
|
||||
$System_Drawing_Point.X = 37
|
||||
$System_Drawing_Point.Y = 69
|
||||
$cboAbteilung.Location = $System_Drawing_Point
|
||||
$cboAbteilung.Name = "cboAbteilung"
|
||||
$System_Drawing_Size = New-Object System.Drawing.Size
|
||||
$System_Drawing_Size.Height = 21
|
||||
$System_Drawing_Size.Width = 172
|
||||
$cboAbteilung.Size = $System_Drawing_Size
|
||||
$cboAbteilung.TabIndex = 0
|
||||
$cboAbteilung.add_SelectedIndexChanged($handler_cboAbteilung_SelectedIndexChanged)
|
||||
$cboAbteilung.add_SelectedValueChanged($handler_cboAbteilung_SelectedValueChanged)
|
||||
$cboAbteilung.add_Click($handler_cboAbteilung_Click)
|
||||
|
||||
$form1.Controls.Add($cboAbteilung)
|
||||
|
||||
#endregion Generated Form Code
|
||||
|
||||
#Save the initial state of the form
|
||||
$InitialFormWindowState = $form1.WindowState
|
||||
#Init the OnLoad event to correct the initial state of the form
|
||||
$form1.add_Load($OnLoadForm_StateCorrection)
|
||||
#Show the Form
|
||||
$form1.ShowDialog()| Out-Null
|
||||
|
||||
} #End Function
|
||||
|
||||
#Call the Function
|
||||
GenerateForm
|
||||
98
powershell/ad_manager.sql
Normal file
98
powershell/ad_manager.sql
Normal file
@ -0,0 +1,98 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.0.4
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Erstellungszeit: 18. Mrz 2021 um 10:48
|
||||
-- Server-Version: 10.4.17-MariaDB
|
||||
-- PHP-Version: 8.0.2
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Datenbank: `ad_manager`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `ad_abteilung`
|
||||
--
|
||||
|
||||
CREATE TABLE `ad_abteilung` (
|
||||
`Abt_ID` int(11) NOT NULL,
|
||||
`Abt_Name` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ad_abteilung`
|
||||
--
|
||||
|
||||
INSERT INTO `ad_abteilung` (`Abt_ID`, `Abt_Name`) VALUES
|
||||
(1, 'IT'),
|
||||
(2, 'Personal'),
|
||||
(3, 'EInkauf');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `ad_user`
|
||||
--
|
||||
|
||||
CREATE TABLE `ad_user` (
|
||||
`User_ID` int(11) NOT NULL,
|
||||
`Nachname` varchar(20) DEFAULT NULL,
|
||||
`Email` varchar(100) DEFAULT NULL,
|
||||
`Password` varchar(30) NOT NULL,
|
||||
`TelNr` varchar(30) DEFAULT NULL,
|
||||
`Abt_ID` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `ad_user`
|
||||
--
|
||||
|
||||
INSERT INTO `ad_user` (`User_ID`, `Nachname`, `Email`, `Password`, `TelNr`, `Abt_ID`) VALUES
|
||||
(1, 'Steinam', 'steinam@klara-oppenheimer-schule.de', 'geheim', '0931/7908-182', 1),
|
||||
(2, 'Sych', 'sych@klara-oppenheimer-schule.de', 'test1234', '0931-7908-124', 1),
|
||||
(3, 'Schellenberger', 'schellenberger@klara-oppenheimer-schule.de', 'echtschwierig', '0931-7908-100', 2);
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `ad_abteilung`
|
||||
--
|
||||
ALTER TABLE `ad_abteilung`
|
||||
ADD PRIMARY KEY (`Abt_ID`);
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `ad_user`
|
||||
--
|
||||
ALTER TABLE `ad_user`
|
||||
ADD PRIMARY KEY (`User_ID`),
|
||||
ADD KEY `Abt_ID` (`Abt_ID`);
|
||||
|
||||
--
|
||||
-- Constraints der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Constraints der Tabelle `ad_user`
|
||||
--
|
||||
ALTER TABLE `ad_user`
|
||||
ADD CONSTRAINT `ad_user_ibfk_1` FOREIGN KEY (`Abt_ID`) REFERENCES `ad_abteilung` (`Abt_ID`);
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
@ -94,32 +94,5 @@ $button = New-Object System.Windows.Forms.Button -Property @{
|
||||
$form.Controls.Add($listBox)
|
||||
$form.Controls.Add($button)
|
||||
|
||||
# $okButton = New-Object System.Windows.Forms.Button
|
||||
# $okButton.Location = New-Object System.Drawing.Point(75,120)
|
||||
# $okButton.Size = New-Object System.Drawing.Size(75,23)
|
||||
# $okButton.Text = 'OK'
|
||||
# $okButton.DialogResult = [System.Windows.Forms.DialogResult]::OK
|
||||
# $form.AcceptButton = $okButton
|
||||
# $form.Controls.Add($okButton)
|
||||
|
||||
# $cancelButton = New-Object System.Windows.Forms.Button
|
||||
# $cancelButton.Location = New-Object System.Drawing.Point(150,120)
|
||||
# $cancelButton.Size = New-Object System.Drawing.Size(75,23)
|
||||
# $cancelButton.Text = 'Cancel'
|
||||
# $cancelButton.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
|
||||
# $form.CancelButton = $cancelButton
|
||||
# $form.Controls.Add($cancelButton)
|
||||
|
||||
# $label = New-Object System.Windows.Forms.Label
|
||||
# $label.Location = New-Object System.Drawing.Point(10,20)
|
||||
# $label.Size = New-Object System.Drawing.Size(280,20)
|
||||
# $label.Text = 'Please enter the information in the space below:'
|
||||
# $form.Controls.Add($label)
|
||||
|
||||
# $textBox = New-Object System.Windows.Forms.TextBox
|
||||
# $textBox.Location = New-Object System.Drawing.Point(10,40)
|
||||
# $textBox.Size = New-Object System.Drawing.Size(260,20)
|
||||
# $form.Controls.Add($textBox)
|
||||
|
||||
$form.Topmost = $true
|
||||
$form.ShowDialog()
|
||||
Reference in New Issue
Block a user