Berechtigung

This commit is contained in:
2024-05-14 10:40:35 +02:00
parent 885f6da247
commit a60b6023ac
3 changed files with 157 additions and 41 deletions

View File

@@ -78,6 +78,11 @@ Partial Class frmBerechtigungsObjekte
Me.Button5 = New System.Windows.Forms.Button()
Me.txtSuche = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.Label21 = New System.Windows.Forms.Label()
Me.MyTextBox7 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label22 = New System.Windows.Forms.Label()
Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button7 = New System.Windows.Forms.Button()
Me.pnl.SuspendLayout()
CType(Me.gdvGruppen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvGruppenBenutzer, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -158,7 +163,7 @@ Partial Class frmBerechtigungsObjekte
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(770, 415)
Me.Button2.Location = New System.Drawing.Point(770, 453)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(34, 23)
Me.Button2.TabIndex = 11
@@ -169,7 +174,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label5.AutoSize = True
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(560, 401)
Me.Label5.Location = New System.Drawing.Point(560, 439)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(123, 13)
Me.Label5.TabIndex = 13
@@ -187,7 +192,7 @@ Partial Class frmBerechtigungsObjekte
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(725, 401)
Me.Label7.Location = New System.Drawing.Point(725, 439)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(35, 13)
Me.Label7.TabIndex = 18
@@ -449,7 +454,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox3._Waehrung = False
Me.MyTextBox3._WaehrungZeichen = True
Me.MyTextBox3.ForeColor = System.Drawing.Color.Black
Me.MyTextBox3.Location = New System.Drawing.Point(728, 417)
Me.MyTextBox3.Location = New System.Drawing.Point(728, 455)
Me.MyTextBox3.MaxLineLength = -1
Me.MyTextBox3.MaxLines_Warning = ""
Me.MyTextBox3.MaxLines_Warning_Label = Nothing
@@ -555,7 +560,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyComboBox3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.MyComboBox3.FormattingEnabled = True
Me.MyComboBox3.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.MyComboBox3.Location = New System.Drawing.Point(563, 417)
Me.MyComboBox3.Location = New System.Drawing.Point(563, 455)
Me.MyComboBox3.Name = "MyComboBox3"
Me.MyComboBox3.Size = New System.Drawing.Size(159, 21)
Me.MyComboBox3.TabIndex = 12
@@ -593,7 +598,7 @@ Partial Class frmBerechtigungsObjekte
'Label17
'
Me.Label17.AutoSize = True
Me.Label17.Location = New System.Drawing.Point(725, 321)
Me.Label17.Location = New System.Drawing.Point(725, 359)
Me.Label17.Name = "Label17"
Me.Label17.Size = New System.Drawing.Size(35, 13)
Me.Label17.TabIndex = 36
@@ -614,7 +619,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox5._Waehrung = False
Me.MyTextBox5._WaehrungZeichen = True
Me.MyTextBox5.ForeColor = System.Drawing.Color.Black
Me.MyTextBox5.Location = New System.Drawing.Point(728, 337)
Me.MyTextBox5.Location = New System.Drawing.Point(728, 375)
Me.MyTextBox5.MaxLineLength = -1
Me.MyTextBox5.MaxLines_Warning = ""
Me.MyTextBox5.MaxLines_Warning_Label = Nothing
@@ -627,7 +632,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label18.AutoSize = True
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label18.Location = New System.Drawing.Point(560, 321)
Me.Label18.Location = New System.Drawing.Point(560, 359)
Me.Label18.Name = "Label18"
Me.Label18.Size = New System.Drawing.Size(153, 13)
Me.Label18.TabIndex = 34
@@ -643,7 +648,7 @@ Partial Class frmBerechtigungsObjekte
Me.cboNiederlassung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboNiederlassung.FormattingEnabled = True
Me.cboNiederlassung.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboNiederlassung.Location = New System.Drawing.Point(563, 337)
Me.cboNiederlassung.Location = New System.Drawing.Point(563, 375)
Me.cboNiederlassung.Name = "cboNiederlassung"
Me.cboNiederlassung.Size = New System.Drawing.Size(159, 21)
Me.cboNiederlassung.TabIndex = 33
@@ -651,7 +656,7 @@ Partial Class frmBerechtigungsObjekte
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.Location = New System.Drawing.Point(770, 335)
Me.Button4.Location = New System.Drawing.Point(770, 373)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(34, 23)
Me.Button4.TabIndex = 32
@@ -661,7 +666,7 @@ Partial Class frmBerechtigungsObjekte
'Label19
'
Me.Label19.AutoSize = True
Me.Label19.Location = New System.Drawing.Point(725, 361)
Me.Label19.Location = New System.Drawing.Point(725, 399)
Me.Label19.Name = "Label19"
Me.Label19.Size = New System.Drawing.Size(35, 13)
Me.Label19.TabIndex = 41
@@ -682,7 +687,7 @@ Partial Class frmBerechtigungsObjekte
Me.MyTextBox6._Waehrung = False
Me.MyTextBox6._WaehrungZeichen = True
Me.MyTextBox6.ForeColor = System.Drawing.Color.Black
Me.MyTextBox6.Location = New System.Drawing.Point(728, 377)
Me.MyTextBox6.Location = New System.Drawing.Point(728, 415)
Me.MyTextBox6.MaxLineLength = -1
Me.MyTextBox6.MaxLines_Warning = ""
Me.MyTextBox6.MaxLines_Warning_Label = Nothing
@@ -695,7 +700,7 @@ Partial Class frmBerechtigungsObjekte
'
Me.Label20.AutoSize = True
Me.Label20.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label20.Location = New System.Drawing.Point(560, 361)
Me.Label20.Location = New System.Drawing.Point(560, 399)
Me.Label20.Name = "Label20"
Me.Label20.Size = New System.Drawing.Size(126, 13)
Me.Label20.TabIndex = 39
@@ -711,7 +716,7 @@ Partial Class frmBerechtigungsObjekte
Me.cboAbteilung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboAbteilung.FormattingEnabled = True
Me.cboAbteilung.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboAbteilung.Location = New System.Drawing.Point(563, 377)
Me.cboAbteilung.Location = New System.Drawing.Point(563, 415)
Me.cboAbteilung.Name = "cboAbteilung"
Me.cboAbteilung.Size = New System.Drawing.Size(159, 21)
Me.cboAbteilung.TabIndex = 38
@@ -719,7 +724,7 @@ Partial Class frmBerechtigungsObjekte
'Button5
'
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Location = New System.Drawing.Point(770, 375)
Me.Button5.Location = New System.Drawing.Point(770, 413)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(34, 23)
Me.Button5.TabIndex = 37
@@ -759,12 +764,85 @@ Partial Class frmBerechtigungsObjekte
Me.PictureBox1.TabIndex = 43
Me.PictureBox1.TabStop = False
'
'Label21
'
Me.Label21.AutoSize = True
Me.Label21.Location = New System.Drawing.Point(725, 317)
Me.Label21.Name = "Label21"
Me.Label21.Size = New System.Drawing.Size(35, 13)
Me.Label21.TabIndex = 48
Me.Label21.Text = "Stufe:"
'
'MyTextBox7
'
Me.MyTextBox7._DateTimeOnly = False
Me.MyTextBox7._numbersOnly = False
Me.MyTextBox7._numbersOnlyKommastellen = ""
Me.MyTextBox7._numbersOnlyTrennzeichen = True
Me.MyTextBox7._Prozent = False
Me.MyTextBox7._ShortDateNew = False
Me.MyTextBox7._ShortDateOnly = False
Me.MyTextBox7._TimeOnly = False
Me.MyTextBox7._TimeOnly_Seconds = False
Me.MyTextBox7._value = "0"
Me.MyTextBox7._Waehrung = False
Me.MyTextBox7._WaehrungZeichen = True
Me.MyTextBox7.ForeColor = System.Drawing.Color.Black
Me.MyTextBox7.Location = New System.Drawing.Point(728, 333)
Me.MyTextBox7.MaxLineLength = -1
Me.MyTextBox7.MaxLines_Warning = ""
Me.MyTextBox7.MaxLines_Warning_Label = Nothing
Me.MyTextBox7.Name = "MyTextBox7"
Me.MyTextBox7.Size = New System.Drawing.Size(36, 20)
Me.MyTextBox7.TabIndex = 47
Me.MyTextBox7.Text = "0"
'
'Label22
'
Me.Label22.AutoSize = True
Me.Label22.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label22.Location = New System.Drawing.Point(560, 317)
Me.Label22.Name = "Label22"
Me.Label22.Size = New System.Drawing.Size(103, 13)
Me.Label22.TabIndex = 46
Me.Label22.Text = "Firma hinzufügen"
'
'cboFirma
'
Me.cboFirma._allowedValuesFreiText = Nothing
Me.cboFirma._allowFreiText = False
Me.cboFirma._value = ""
Me.cboFirma.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboFirma.DropDownWidth = 300
Me.cboFirma.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboFirma.FormattingEnabled = True
Me.cboFirma.Items.AddRange(New Object() {"FORM", "FUNC", "GLOBAL"})
Me.cboFirma.Location = New System.Drawing.Point(563, 333)
Me.cboFirma.Name = "cboFirma"
Me.cboFirma.Size = New System.Drawing.Size(159, 21)
Me.cboFirma.TabIndex = 45
'
'Button7
'
Me.Button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button7.Location = New System.Drawing.Point(770, 331)
Me.Button7.Name = "Button7"
Me.Button7.Size = New System.Drawing.Size(34, 23)
Me.Button7.TabIndex = 44
Me.Button7.Text = "OK"
Me.Button7.UseVisualStyleBackColor = True
'
'frmBerechtigungsObjekte
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(836, 658)
Me.Controls.Add(Me.Label21)
Me.Controls.Add(Me.MyTextBox7)
Me.Controls.Add(Me.Label22)
Me.Controls.Add(Me.cboFirma)
Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.PictureBox1)
Me.Controls.Add(Me.txtSuche)
Me.Controls.Add(Me.Label19)
@@ -872,4 +950,9 @@ Partial Class frmBerechtigungsObjekte
Friend WithEvents Button6 As Button
Friend WithEvents txtSuche As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents Label21 As Label
Friend WithEvents MyTextBox7 As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label22 As Label
Friend WithEvents cboFirma As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents Button7 As Button
End Class

View File

@@ -60,6 +60,16 @@
cboFirma.Items.Clear()
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG", "VERAG"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IMEX", "IMEX"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ATILLA", "ATILLA"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("UNISPED", "UNISPED"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBAR", "AMBAR"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FRONTOFFICE", "FRONTOFFICE"))
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERIMEX", "VERIMEX"))
cboAbteilung.Items.Clear()
cboAbteilung.fillWithSQL("SELECT [abt_id],[abt_bezeichnung] FROM tblAbteilungen", False, "ADMIN", True)
cboNiederlassung.Items.Clear()
@@ -285,5 +295,21 @@
End Sub
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
If dgvObjekte.SelectedRows.Count = 0 Then Exit Sub
'Gruppe zuordnen
If cboFirma._value = String.Empty Then Exit Sub
If Not IsNumeric(MyTextBox6.Text) Then Exit Sub
Dim BOZ As New VERAG_PROG_ALLGEMEIN.cBerechtigungsObjekteZuordnung
BOZ.beroz_beroId = dgvObjekte.SelectedRows(0).Cells("id").Value
BOZ.beroz_bergrId = cboFirma._value
BOZ.beroz_art = "F"
BOZ.beroz_berechtigungsstufe = MyTextBox6.Text
BOZ.INSERT()
BerechtigungsObjekte.LOAD_LIST()
loadGruppen()
cboFirma.SelectedIndex = 0
MyTextBox6.Text = "0"
End Sub
End Class