diff --git a/AWP_11fi5/2021-05-17 Übung 1 Beispiel Luna.sql b/AWP_11fi5/2021-05-17 Übung 1 Beispiel Luna.sql index 8eba348..840cb5c 100644 --- a/AWP_11fi5/2021-05-17 Übung 1 Beispiel Luna.sql +++ b/AWP_11fi5/2021-05-17 Übung 1 Beispiel Luna.sql @@ -31,7 +31,7 @@ SELECT DISTINCT A_Nr FROM tblmitarbeiter, tbltaetigkeit WHERE tblmitarbeiter.M_Nr = tbltaetigkeit.M_Nr AND T_Einstellungsdatum = "1989-10-15"; -#4 +#4 falsch, aufgabe falsch gelesen SELECT M_Name, M_Vorname FROM tblmitarbeiter, tblabteilung WHERE tblmitarbeiter.A_Nr = tblabteilung.A_Nr AND A_Stadt = "Stuttgart"; diff --git a/powershell/datenbankanbindung/11fi3_ste_v3_schueler.ps1 b/powershell/datenbankanbindung/11fi3_ste_v3_schueler.ps1 deleted file mode 100644 index a618ae6..0000000 --- a/powershell/datenbankanbindung/11fi3_ste_v3_schueler.ps1 +++ /dev/null @@ -1,530 +0,0 @@ -#. 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