Gesamtsicherheiten: Änderungen von Mestan durchgeführt

This commit is contained in:
2022-11-09 09:21:11 +01:00
parent 9145618f58
commit aa03ff853c
2 changed files with 157 additions and 28 deletions

View File

@@ -32,7 +32,14 @@ Partial Class frmGesamtsicherheitenNEU
Me.ContextMenuStripGesSicherh = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ATBNraendernToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.pnlChangeATCNr = New System.Windows.Forms.Panel()
Me.lblATCwarning = New System.Windows.Forms.Label()
Me.FlatButton3 = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.txtATCaendern = New System.Windows.Forms.TextBox()
Me.Label34 = New System.Windows.Forms.Label()
Me.FlatButton4 = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.pnlChangeATBNr = New System.Windows.Forms.Panel()
Me.lblWarningATB = New System.Windows.Forms.Label()
Me.FlatButton1 = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.txtATBNraendern = New System.Windows.Forms.TextBox()
Me.Label32 = New System.Windows.Forms.Label()
@@ -125,9 +132,9 @@ Partial Class frmGesamtsicherheitenNEU
Me.txtSicherheitFreitext = New System.Windows.Forms.TextBox()
Me.btnAddPos = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.btnAddSicherheit = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.lblWarningATB = New System.Windows.Forms.Label()
Me.ContextMenuStripGesSicherh.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.pnlChangeATCNr.SuspendLayout()
Me.pnlChangeATBNr.SuspendLayout()
Me.panOverlay.SuspendLayout()
CType(Me.dgvGesamtsicherheit, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -153,6 +160,7 @@ Partial Class frmGesamtsicherheitenNEU
'
'Panel2
'
Me.Panel2.Controls.Add(Me.pnlChangeATCNr)
Me.Panel2.Controls.Add(Me.pnlChangeATBNr)
Me.Panel2.Controls.Add(Me.panOverlay)
Me.Panel2.Controls.Add(Me.dgvGesamtsicherheit)
@@ -164,6 +172,79 @@ Partial Class frmGesamtsicherheitenNEU
Me.Panel2.Size = New System.Drawing.Size(1384, 486)
Me.Panel2.TabIndex = 1
'
'pnlChangeATCNr
'
Me.pnlChangeATCNr.BackColor = System.Drawing.SystemColors.ButtonHighlight
Me.pnlChangeATCNr.Controls.Add(Me.lblATCwarning)
Me.pnlChangeATCNr.Controls.Add(Me.FlatButton3)
Me.pnlChangeATCNr.Controls.Add(Me.txtATCaendern)
Me.pnlChangeATCNr.Controls.Add(Me.Label34)
Me.pnlChangeATCNr.Controls.Add(Me.FlatButton4)
Me.pnlChangeATCNr.Location = New System.Drawing.Point(1051, 42)
Me.pnlChangeATCNr.Name = "pnlChangeATCNr"
Me.pnlChangeATCNr.Size = New System.Drawing.Size(292, 103)
Me.pnlChangeATCNr.TabIndex = 13
Me.pnlChangeATCNr.Visible = False
'
'lblATCwarning
'
Me.lblATCwarning.AutoSize = True
Me.lblATCwarning.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblATCwarning.ForeColor = System.Drawing.Color.Red
Me.lblATCwarning.Location = New System.Drawing.Point(10, 7)
Me.lblATCwarning.Name = "lblATCwarning"
Me.lblATCwarning.Size = New System.Drawing.Size(0, 13)
Me.lblATCwarning.TabIndex = 10
'
'FlatButton3
'
Me.FlatButton3.allowBorder = False
Me.FlatButton3.BackColor = System.Drawing.Color.Gainsboro
Me.FlatButton3.FlatAppearance.BorderSize = 0
Me.FlatButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.FlatButton3.ForeColor = System.Drawing.Color.Black
Me.FlatButton3.Location = New System.Drawing.Point(210, 77)
Me.FlatButton3.Name = "FlatButton3"
Me.FlatButton3.Size = New System.Drawing.Size(75, 23)
Me.FlatButton3.TabIndex = 9
Me.FlatButton3.Text = "Ändern"
Me.FlatButton3.UseVisualStyleBackColor = False
'
'txtATCaendern
'
Me.txtATCaendern.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtATCaendern.Location = New System.Drawing.Point(95, 40)
Me.txtATCaendern.Margin = New System.Windows.Forms.Padding(0)
Me.txtATCaendern.Name = "txtATCaendern"
Me.txtATCaendern.Size = New System.Drawing.Size(186, 24)
Me.txtATCaendern.TabIndex = 6
'
'Label34
'
Me.Label34.AutoSize = True
Me.Label34.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label34.Location = New System.Drawing.Point(10, 40)
Me.Label34.Name = "Label34"
Me.Label34.Size = New System.Drawing.Size(80, 20)
Me.Label34.TabIndex = 5
Me.Label34.Text = "ATC/MRN"
'
'FlatButton4
'
Me.FlatButton4.allowBorder = False
Me.FlatButton4.BackColor = System.Drawing.Color.White
Me.FlatButton4.BackgroundImage = Global.AVISO.My.Resources.Resources.del2
Me.FlatButton4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.FlatButton4.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.FlatButton4.FlatAppearance.BorderSize = 0
Me.FlatButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.FlatButton4.ForeColor = System.Drawing.Color.Black
Me.FlatButton4.Location = New System.Drawing.Point(261, 3)
Me.FlatButton4.Name = "FlatButton4"
Me.FlatButton4.Size = New System.Drawing.Size(24, 24)
Me.FlatButton4.TabIndex = 0
Me.FlatButton4.UseVisualStyleBackColor = False
'
'pnlChangeATBNr
'
Me.pnlChangeATBNr.BackColor = System.Drawing.SystemColors.ButtonHighlight
@@ -178,6 +259,16 @@ Partial Class frmGesamtsicherheitenNEU
Me.pnlChangeATBNr.TabIndex = 12
Me.pnlChangeATBNr.Visible = False
'
'lblWarningATB
'
Me.lblWarningATB.AutoSize = True
Me.lblWarningATB.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblWarningATB.ForeColor = System.Drawing.Color.Red
Me.lblWarningATB.Location = New System.Drawing.Point(10, 7)
Me.lblWarningATB.Name = "lblWarningATB"
Me.lblWarningATB.Size = New System.Drawing.Size(0, 13)
Me.lblWarningATB.TabIndex = 10
'
'FlatButton1
'
Me.FlatButton1.allowBorder = False
@@ -1386,16 +1477,6 @@ Partial Class frmGesamtsicherheitenNEU
Me.btnAddSicherheit.TabIndex = 36
Me.btnAddSicherheit.UseVisualStyleBackColor = False
'
'lblWarningATB
'
Me.lblWarningATB.AutoSize = True
Me.lblWarningATB.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblWarningATB.ForeColor = System.Drawing.Color.Red
Me.lblWarningATB.Location = New System.Drawing.Point(10, 7)
Me.lblWarningATB.Name = "lblWarningATB"
Me.lblWarningATB.Size = New System.Drawing.Size(0, 13)
Me.lblWarningATB.TabIndex = 10
'
'frmGesamtsicherheitenNEU
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -1411,6 +1492,8 @@ Partial Class frmGesamtsicherheitenNEU
Me.Text = "frmGesSich"
Me.ContextMenuStripGesSicherh.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.pnlChangeATCNr.ResumeLayout(False)
Me.pnlChangeATCNr.PerformLayout()
Me.pnlChangeATBNr.ResumeLayout(False)
Me.pnlChangeATBNr.PerformLayout()
Me.panOverlay.ResumeLayout(False)
@@ -1525,4 +1608,10 @@ Partial Class frmGesamtsicherheitenNEU
Friend WithEvents Label32 As Label
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents lblWarningATB As Label
Friend WithEvents pnlChangeATCNr As Panel
Friend WithEvents lblATCwarning As Label
Friend WithEvents FlatButton3 As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents txtATCaendern As TextBox
Friend WithEvents Label34 As Label
Friend WithEvents FlatButton4 As VERAG_PROG_ALLGEMEIN.FlatButton
End Class

View File

@@ -60,7 +60,7 @@ Public Class frmGesamtsicherheitenNEU
panOverlay.Visible = True
cboFiliale.fillWithSQL("SELECT FilialenNr, cast(FilialenNr as varchar(4)) + ' ' + Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True)
cboWarenort.fillWithSQL("SELECT [grz_Grenzstelle], [grz_Bezeichnung] FROM [tblGrenzstelle] WHERE [grz_Aktiv] ='1' AND [grz_Warenort] ='1' ORDER BY [grz_Reihenfolge] ", True, "AVISO", True)
cboWarenort.fillWithSQL("SELECT [grz_Grenzstelle], [grz_Bezeichnung] FROM [tblGrenzstelle] WHERE [grz_Aktiv] ='1' AND [grz_Warenort] ='1' ORDER BY [grz_BezeichnungCBO] ", True, "AVISO", True)
If datum = Nothing Then datum = Date.Now
nextGessicherheitID = -1
@@ -116,7 +116,7 @@ Public Class frmGesamtsicherheitenNEU
Case True
.Columns("gs_ATBNr").HeaderText = "ATB"
.Columns("gs_ATBNr").Width = 130
.Columns("gs_atr").HeaderText = "MRN"
.Columns("gs_atr").HeaderText = "ATR"
.Columns("gs_atr").Visible = True
.Columns("gs_atr").Width = 35
.Columns("gs_ust").Width = 70
@@ -428,7 +428,6 @@ Public Class frmGesamtsicherheitenNEU
.gsp_ust = ""
.gsp_avisoId = Me.avisioID
'.gsp_ATCNr = ""
'.gsp_MRNNr = ""
.gsp_gsNr = OPEN.gs_gsNr
End With
@@ -493,7 +492,6 @@ Public Class frmGesamtsicherheitenNEU
.gsp_erstellungsdatum = DateTimeString2DateTimeKonvertinator(txtPosDate.Text, txtPosTime.Text)
.gsp_ust = currentSicherheit.gs_ust
.gsp_ATCNr = txtPositionenCRN.Text
.gsp_MRNNr = txtPositionenCRN.Text
.gsp_avisoId = Me.avisioID
End With
@@ -1178,7 +1176,28 @@ Public Class frmGesamtsicherheitenNEU
End Sub
Private Sub ATCMRNNraendernToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATCMRNNraendernToolStripMenuItem.Click
Dim ATCNr As String
Dim mutlitpleATCNr As Boolean = False
ATCNr = dgvSicherheitsPos.SelectedRows(0).Cells("gsp_ATCNr").Value.ToString
If dgvSicherheitsPos.SelectedRows.Count > 1 Then
For Each row As DataGridViewRow In dgvSicherheitsPos.Rows
If row.Cells("gsp_ATCNr").Value.ToString <> ATCNr Then
mutlitpleATCNr = True
End If
Next
End If
If mutlitpleATCNr Then
lblATCwarning.Text = "ACHTUNG!" & vbCrLf & "Es wurden unterschiedl. ATC-Nummern markiert!"
Else
lblATCwarning.Text = ""
End If
dgvSicherheitsPos.Enabled = False
txtATCaendern.Text = ATCNr
pnlChangeATCNr.Visible = True
End Sub
@@ -1198,20 +1217,15 @@ Public Class frmGesamtsicherheitenNEU
End If
If dgvGesamtsicherheit.SelectedRows.Count > 1 Then
For Each row As DataGridViewRow In dgvGesamtsicherheit.Rows
Dim test As New cSicherheiten(row.Cells("gs_gsId").Value, row.Cells("gs_posNr").Value)
test.gs_ATBNr = txtATBNraendern.Text
currentSicherheit = test
currentSicherheit.SAVE()
For Each row As DataGridViewRow In dgvGesamtsicherheit.SelectedRows
Dim sicherh As New cSicherheiten(row.Cells("gs_gsId").Value, row.Cells("gs_posNr").Value)
sicherh.gs_ATBNr = txtATBNraendern.Text
sicherh.SAVE()
Next
Else
Dim Sicherh As New cSicherheiten(dgvGesamtsicherheit.SelectedRows(0).Cells("gs_gsId").Value, dgvGesamtsicherheit.SelectedRows(0).Cells("gs_posNr").Value)
Sicherh.gs_ATBNr = txtATBNraendern.Text
currentSicherheit = Sicherh
currentSicherheit.SAVE()
Next
End If
pnlChangeATBNr.Visible = False
dgvGesamtsicherheit.Enabled = True
AfterButton()
@@ -1221,5 +1235,31 @@ Public Class frmGesamtsicherheitenNEU
pnlChangeATBNr.Visible = False
dgvGesamtsicherheit.Enabled = True
End Sub
End Class
Private Sub FlatButton3_Click(sender As Object, e As EventArgs) Handles FlatButton3.Click
If txtATCaendern.Text = "" Then
MsgBox("Bitte ATC/MRN-Nr angeben!")
Exit Sub
End If
If dgvSicherheitsPos.SelectedRows.Count > 0 Then
For Each row As DataGridViewRow In dgvSicherheitsPos.SelectedRows
Dim SicherhPos As New cGesamtsicherheitsPositionen(row.Cells("gsp_gsId").Value, row.Cells("gsp_gspPosId").Value)
SicherhPos.gsp_ATCNr = txtATCaendern.Text
SicherhPos.SAVE()
Next
End If
pnlChangeATCNr.Visible = False
dgvSicherheitsPos.Enabled = True
AfterButton()
End Sub
Private Sub FlatButton4_Click(sender As Object, e As EventArgs) Handles FlatButton4.Click
pnlChangeATCNr.Visible = False
dgvSicherheitsPos.Enabled = True
End Sub
End Class