gesamtsicherheiten: Positionsnummerierung und AvisoID eingebaut
This commit is contained in:
@@ -5,7 +5,7 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
|
|
||||||
Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
Dim GesSichRef As VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz
|
Dim GesSichRef As VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz
|
||||||
Public dt As DataTable
|
Public dataTable As DataTable
|
||||||
Public Property Standort As String = ""
|
Public Property Standort As String = ""
|
||||||
|
|
||||||
|
|
||||||
@@ -102,9 +102,9 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
|
|
||||||
If dgvListe.Rows.Count = 0 Then Exit Function
|
If dgvListe.Rows.Count = 0 Then Exit Function
|
||||||
|
|
||||||
dt = New DataTable()
|
dataTable = New DataTable()
|
||||||
dt.Columns.Add("gs_gsnr", GetType(Integer))
|
dataTable.Columns.Add("gs_gsnr", GetType(Integer))
|
||||||
dt.Columns.Add("gs_isOpen", GetType(Boolean))
|
dataTable.Columns.Add("gs_isOpen", GetType(Boolean))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -112,9 +112,9 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
For Each row As DataGridViewRow In dgvListe.Rows
|
For Each row As DataGridViewRow In dgvListe.Rows
|
||||||
If row.Cells("gs_SicherheitsSaldo").Value <> 0 Then
|
If row.Cells("gs_SicherheitsSaldo").Value <> 0 Then
|
||||||
|
|
||||||
dt.Rows.Add(row.Cells("gs_gsnr").Value, True)
|
dataTable.Rows.Add(row.Cells("gs_gsnr").Value, True)
|
||||||
Else
|
Else
|
||||||
dt.Rows.Add(row.Cells("gs_gsnr").Value, False)
|
dataTable.Rows.Add(row.Cells("gs_gsnr").Value, False)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
.FilialNummer = dgvListe.CurrentRow.Cells("gs_filialenNr").Value
|
.FilialNummer = dgvListe.CurrentRow.Cells("gs_filialenNr").Value
|
||||||
.Abfertigungsnummer = dgvListe.CurrentRow.Cells("gs_abfertigungsNr").Value
|
.Abfertigungsnummer = dgvListe.CurrentRow.Cells("gs_abfertigungsNr").Value
|
||||||
.warenortID = dgvListe.CurrentRow.Cells("gs_warenort").Value
|
.warenortID = dgvListe.CurrentRow.Cells("gs_warenort").Value
|
||||||
.dt = Me.dt
|
.dataTable = Me.dataTable
|
||||||
End With
|
End With
|
||||||
|
|
||||||
AddHandler frm.FormClosing, Function()
|
AddHandler frm.FormClosing, Function()
|
||||||
@@ -176,7 +176,7 @@ Public Class frmGesamtsicherheitenMenuNEU
|
|||||||
.Standort = Me.Standort
|
.Standort = Me.Standort
|
||||||
.datum = Date.Now
|
.datum = Date.Now
|
||||||
.Neu = True
|
.Neu = True
|
||||||
.dt = Me.dt
|
.dataTable = Me.dataTable
|
||||||
End With
|
End With
|
||||||
AddHandler frm.FormClosing, Function()
|
AddHandler frm.FormClosing, Function()
|
||||||
GesSichRef.CalcSaldo()
|
GesSichRef.CalcSaldo()
|
||||||
|
|||||||
49
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
49
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
@@ -33,6 +33,8 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
Me.ClosedErzeugenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ClosedErzeugenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.Panel2 = New System.Windows.Forms.Panel()
|
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||||
Me.panOverlay = New System.Windows.Forms.Panel()
|
Me.panOverlay = New System.Windows.Forms.Panel()
|
||||||
|
Me.txtlkwIdSearch = New VERAG_PROG_ALLGEMEIN.MySearchBox()
|
||||||
|
Me.Label23 = New System.Windows.Forms.Label()
|
||||||
Me.cboWarenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
Me.cboWarenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
Me.lblWarenort = New System.Windows.Forms.Label()
|
Me.lblWarenort = New System.Windows.Forms.Label()
|
||||||
Me.cboFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
Me.cboFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
@@ -153,6 +155,8 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
'panOverlay
|
'panOverlay
|
||||||
'
|
'
|
||||||
Me.panOverlay.BackColor = System.Drawing.SystemColors.ButtonHighlight
|
Me.panOverlay.BackColor = System.Drawing.SystemColors.ButtonHighlight
|
||||||
|
Me.panOverlay.Controls.Add(Me.txtlkwIdSearch)
|
||||||
|
Me.panOverlay.Controls.Add(Me.Label23)
|
||||||
Me.panOverlay.Controls.Add(Me.cboWarenort)
|
Me.panOverlay.Controls.Add(Me.cboWarenort)
|
||||||
Me.panOverlay.Controls.Add(Me.lblWarenort)
|
Me.panOverlay.Controls.Add(Me.lblWarenort)
|
||||||
Me.panOverlay.Controls.Add(Me.cboFiliale)
|
Me.panOverlay.Controls.Add(Me.cboFiliale)
|
||||||
@@ -165,10 +169,45 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
Me.panOverlay.Controls.Add(Me.btnClosePanOverlay)
|
Me.panOverlay.Controls.Add(Me.btnClosePanOverlay)
|
||||||
Me.panOverlay.Location = New System.Drawing.Point(493, 15)
|
Me.panOverlay.Location = New System.Drawing.Point(493, 15)
|
||||||
Me.panOverlay.Name = "panOverlay"
|
Me.panOverlay.Name = "panOverlay"
|
||||||
Me.panOverlay.Size = New System.Drawing.Size(527, 275)
|
Me.panOverlay.Size = New System.Drawing.Size(527, 297)
|
||||||
Me.panOverlay.TabIndex = 2
|
Me.panOverlay.TabIndex = 2
|
||||||
Me.panOverlay.Visible = False
|
Me.panOverlay.Visible = False
|
||||||
'
|
'
|
||||||
|
'txtlkwIdSearch
|
||||||
|
'
|
||||||
|
Me.txtlkwIdSearch._allowFreitext = False
|
||||||
|
Me.txtlkwIdSearch._AllowSetValue = False
|
||||||
|
Me.txtlkwIdSearch._allowSpaceAsSplitter = False
|
||||||
|
Me.txtlkwIdSearch._autoSizeGross = False
|
||||||
|
Me.txtlkwIdSearch._hideIfListEmpty = True
|
||||||
|
Me.txtlkwIdSearch._value = Nothing
|
||||||
|
Me.txtlkwIdSearch.conn_art = "FMZOLL"
|
||||||
|
Me.txtlkwIdSearch.dgvpos = "LEFT"
|
||||||
|
Me.txtlkwIdSearch.DISPLAY_PARAM = Nothing
|
||||||
|
Me.txtlkwIdSearch.INVISIBLE_COLUMNS = Nothing
|
||||||
|
Me.txtlkwIdSearch.key_visible = False
|
||||||
|
Me.txtlkwIdSearch.KEYPARAM = Nothing
|
||||||
|
Me.txtlkwIdSearch.Location = New System.Drawing.Point(279, 184)
|
||||||
|
Me.txtlkwIdSearch.Name = "txtlkwIdSearch"
|
||||||
|
Me.txtlkwIdSearch.searchActive = True
|
||||||
|
Me.txtlkwIdSearch.Size = New System.Drawing.Size(186, 20)
|
||||||
|
Me.txtlkwIdSearch.SQL_ORDER_BY = Nothing
|
||||||
|
Me.txtlkwIdSearch.SQL_SELECT = Nothing
|
||||||
|
Me.txtlkwIdSearch.SQL_WHERE = Nothing
|
||||||
|
Me.txtlkwIdSearch.SQL_WhereParamList = Nothing
|
||||||
|
Me.txtlkwIdSearch.TabIndex = 11
|
||||||
|
Me.txtlkwIdSearch.usrcntl = Nothing
|
||||||
|
'
|
||||||
|
'Label23
|
||||||
|
'
|
||||||
|
Me.Label23.AutoSize = True
|
||||||
|
Me.Label23.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Label23.Location = New System.Drawing.Point(176, 184)
|
||||||
|
Me.Label23.Name = "Label23"
|
||||||
|
Me.Label23.Size = New System.Drawing.Size(73, 20)
|
||||||
|
Me.Label23.TabIndex = 10
|
||||||
|
Me.Label23.Text = "LKW-Id:"
|
||||||
|
'
|
||||||
'cboWarenort
|
'cboWarenort
|
||||||
'
|
'
|
||||||
Me.cboWarenort._allowedValuesFreiText = Nothing
|
Me.cboWarenort._allowedValuesFreiText = Nothing
|
||||||
@@ -214,7 +253,7 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
Me.btnSave.FlatAppearance.BorderSize = 0
|
Me.btnSave.FlatAppearance.BorderSize = 0
|
||||||
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.btnSave.ForeColor = System.Drawing.Color.Black
|
Me.btnSave.ForeColor = System.Drawing.Color.Black
|
||||||
Me.btnSave.Location = New System.Drawing.Point(389, 228)
|
Me.btnSave.Location = New System.Drawing.Point(389, 252)
|
||||||
Me.btnSave.Name = "btnSave"
|
Me.btnSave.Name = "btnSave"
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnSave.TabIndex = 9
|
Me.btnSave.TabIndex = 9
|
||||||
@@ -224,7 +263,7 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
'txtLKWID
|
'txtLKWID
|
||||||
'
|
'
|
||||||
Me.txtLKWID.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.txtLKWID.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.txtLKWID.Location = New System.Drawing.Point(279, 178)
|
Me.txtLKWID.Location = New System.Drawing.Point(279, 216)
|
||||||
Me.txtLKWID.Margin = New System.Windows.Forms.Padding(0)
|
Me.txtLKWID.Margin = New System.Windows.Forms.Padding(0)
|
||||||
Me.txtLKWID.Name = "txtLKWID"
|
Me.txtLKWID.Name = "txtLKWID"
|
||||||
Me.txtLKWID.Size = New System.Drawing.Size(186, 24)
|
Me.txtLKWID.Size = New System.Drawing.Size(186, 24)
|
||||||
@@ -243,7 +282,7 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
'
|
'
|
||||||
Me.Label18.AutoSize = True
|
Me.Label18.AutoSize = True
|
||||||
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Label18.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.Label18.Location = New System.Drawing.Point(89, 180)
|
Me.Label18.Location = New System.Drawing.Point(89, 218)
|
||||||
Me.Label18.Name = "Label18"
|
Me.Label18.Name = "Label18"
|
||||||
Me.Label18.Size = New System.Drawing.Size(160, 20)
|
Me.Label18.Size = New System.Drawing.Size(160, 20)
|
||||||
Me.Label18.TabIndex = 7
|
Me.Label18.TabIndex = 7
|
||||||
@@ -1376,4 +1415,6 @@ Partial Class frmGesamtsicherheitenNEU
|
|||||||
Friend WithEvents txtSicherheitsbGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtSicherheitsbGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
Friend WithEvents txtPosWarenwertGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtPosWarenwertGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
Friend WithEvents txtPosSicherheitsbGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtPosSicherheitsbGes As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
|
Friend WithEvents Label23 As Label
|
||||||
|
Friend WithEvents txtlkwIdSearch As VERAG_PROG_ALLGEMEIN.MySearchBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,15 +1,8 @@
|
|||||||
Imports System.Reflection
|
|
||||||
Imports System.Web.UI.WebControls
|
|
||||||
Imports System.Web.UI.WebControls.Expressions
|
|
||||||
Imports DocumentFormat.OpenXml.Bibliography
|
|
||||||
Imports DocumentFormat.OpenXml.Presentation
|
|
||||||
Imports DocumentFormat.OpenXml.Spreadsheet
|
|
||||||
Imports Spire.Pdf.General.Render.Decode
|
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
Public Class frmGesamtsicherheitenNEU
|
Public Class frmGesamtsicherheitenNEU
|
||||||
|
|
||||||
|
|
||||||
Property currentSicherheit As cSicherheiten
|
Property currentSicherheit As cSicherheiten
|
||||||
Property currentSPos As cGesamtsicherheitsPositionen
|
Property currentSPos As cGesamtsicherheitsPositionen
|
||||||
Property currentGesSichRef As cGesamtsicherheitsReferenz
|
Property currentGesSichRef As cGesamtsicherheitsReferenz
|
||||||
@@ -35,6 +28,8 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Public warenortID As String
|
Public warenortID As String
|
||||||
|
|
||||||
|
Public avisioID As Integer
|
||||||
|
|
||||||
Dim indexGsId As Integer
|
Dim indexGsId As Integer
|
||||||
|
|
||||||
Dim indexGspPosId As Integer
|
Dim indexGspPosId As Integer
|
||||||
@@ -43,7 +38,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
Public dt As New DataTable
|
Public dataTable As New DataTable()
|
||||||
|
|
||||||
|
|
||||||
Private Sub frmGesamtsicherheitNEU_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmGesamtsicherheitNEU_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
@@ -69,6 +64,8 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
nextGessicherheitID = -1
|
nextGessicherheitID = -1
|
||||||
prevGessicherheitID = -1
|
prevGessicherheitID = -1
|
||||||
|
|
||||||
|
txtlkwIdSearch.initSearchBox(Me.FindForm, " [LKW_Nr], [AvisoID] FROM [Aviso]", {"LKW_Nr", "AvisoID"}, "", "LKW_Nr", "LKW_Nr", "AvisoID", "AVISO",, 150, 200)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
LoadDGVSicherheiten()
|
LoadDGVSicherheiten()
|
||||||
End If
|
End If
|
||||||
@@ -87,7 +84,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Public Sub LoadDGVSicherheiten(Optional withFilterParam As Boolean = False)
|
Public Sub LoadDGVSicherheiten(Optional withFilterParam As Boolean = False)
|
||||||
|
|
||||||
'lblSaldo.Text = "Saldo: € " & currentGesSichRef.gsr_Saldo.ToString()
|
'lblSaldo.Text = "Saldo: € " & currentGesSichRef.gsr_Saldo.ToString()
|
||||||
lblGestellungNr.Text = ""
|
lblGestellungNr.Text = ""
|
||||||
Dim sqladd1 As String = ""
|
Dim sqladd1 As String = ""
|
||||||
If currentGesSichRef.gsr_ustEnabled Then sqladd1 &= ", FORMAT((([gs_warenwert] + [gs_sicherheitsbetrag]) * " & currentGesSichRef.gsr_ust & "/100), 'C', 'de-DE') as gs_ust"
|
If currentGesSichRef.gsr_ustEnabled Then sqladd1 &= ", FORMAT((([gs_warenwert] + [gs_sicherheitsbetrag]) * " & currentGesSichRef.gsr_ust & "/100), 'C', 'de-DE') as gs_ust"
|
||||||
@@ -242,12 +239,14 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
|
|
||||||
If dt.Rows.Count > 0 Then
|
If dt.Rows.Count > 0 Then
|
||||||
|
Me.avisioID = setNullToZero(dt.Rows(0).Item("gs_avisioId"))
|
||||||
Me.LKWKZ = setNullToZero(dt.Rows(0).Item("gs_LKWKZ"))
|
Me.LKWKZ = setNullToZero(dt.Rows(0).Item("gs_LKWKZ"))
|
||||||
Me.FilialNummer = setNullToZero(dt.Rows(0).Item("gs_filialenNr"))
|
Me.FilialNummer = setNullToZero(dt.Rows(0).Item("gs_filialenNr"))
|
||||||
Me.Abfertigungsnummer = setNullToZero(dt.Rows(0).Item("gs_abfertigungsNr"))
|
Me.Abfertigungsnummer = setNullToZero(dt.Rows(0).Item("gs_abfertigungsNr"))
|
||||||
Me.warenortID = setNullToZero(dt.Rows(0).Item("gs_warenort"))
|
Me.warenortID = setNullToZero(dt.Rows(0).Item("gs_warenort"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Me.avisioID.ToString.Length > 0 Then lblGestellungNr.Text &= "Aviso-ID: " & Me.LKWKZ & " "
|
||||||
If Me.LKWKZ.ToString.Length > 0 Then lblGestellungNr.Text &= "LKW-ID: " & Me.LKWKZ & " "
|
If Me.LKWKZ.ToString.Length > 0 Then lblGestellungNr.Text &= "LKW-ID: " & Me.LKWKZ & " "
|
||||||
If Me.FilialNummer.ToString.Length > 0 Then lblGestellungNr.Text &= "FilialNr: " & Me.FilialNummer & " "
|
If Me.FilialNummer.ToString.Length > 0 Then lblGestellungNr.Text &= "FilialNr: " & Me.FilialNummer & " "
|
||||||
If Me.Abfertigungsnummer.Length > 0 Then lblGestellungNr.Text &= "AbfNr: " & Me.Abfertigungsnummer & " "
|
If Me.Abfertigungsnummer.Length > 0 Then lblGestellungNr.Text &= "AbfNr: " & Me.Abfertigungsnummer & " "
|
||||||
@@ -361,6 +360,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
.gs_saldo = currentGesSichRef.gsr_Saldo
|
.gs_saldo = currentGesSichRef.gsr_Saldo
|
||||||
.gs_atr = setNullToZero(cboSicherheitATR.SelectedItem)
|
.gs_atr = setNullToZero(cboSicherheitATR.SelectedItem)
|
||||||
.gs_zollsatz = Me.Zollsatz
|
.gs_zollsatz = Me.Zollsatz
|
||||||
|
.gs_avisoId = Me.avisioID
|
||||||
setEnviromentDataToObject(OPEN, Me)
|
setEnviromentDataToObject(OPEN, Me)
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -403,6 +403,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
.gsp_erstellungsdatum = Me.datum
|
.gsp_erstellungsdatum = Me.datum
|
||||||
.gsp_avisoId = ""
|
.gsp_avisoId = ""
|
||||||
.gsp_ust = ""
|
.gsp_ust = ""
|
||||||
|
.gsp_avisoId = Me.avisioID
|
||||||
'.gsp_ATCNr = ""
|
'.gsp_ATCNr = ""
|
||||||
'.gsp_MRNNr = ""
|
'.gsp_MRNNr = ""
|
||||||
.gsp_gsNr = OPEN.gs_gsNr
|
.gsp_gsNr = OPEN.gs_gsNr
|
||||||
@@ -448,6 +449,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
.gs_saldo = currentGesSichRef.gsr_Saldo
|
.gs_saldo = currentGesSichRef.gsr_Saldo
|
||||||
.gs_atr = setNullToZero(cboSicherheitATR.SelectedItem)
|
.gs_atr = setNullToZero(cboSicherheitATR.SelectedItem)
|
||||||
.gs_zollsatz = Me.Zollsatz
|
.gs_zollsatz = Me.Zollsatz
|
||||||
|
.gs_avisoId = Me.avisioID
|
||||||
setEnviromentDataToObject(OPEN, Me)
|
setEnviromentDataToObject(OPEN, Me)
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -469,6 +471,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
.gsp_ust = currentSicherheit.gs_ust
|
.gsp_ust = currentSicherheit.gs_ust
|
||||||
.gsp_ATCNr = txtPositionenCRN.Text
|
.gsp_ATCNr = txtPositionenCRN.Text
|
||||||
.gsp_MRNNr = txtPositionenCRN.Text
|
.gsp_MRNNr = txtPositionenCRN.Text
|
||||||
|
.gsp_avisoId = Me.avisioID
|
||||||
End With
|
End With
|
||||||
|
|
||||||
SicherheitsPos.SAVE()
|
SicherheitsPos.SAVE()
|
||||||
@@ -682,7 +685,11 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Private Sub btnDeleteSicherheit_Click(sender As Object, e As EventArgs) Handles btnDeleteSicherheit.Click
|
Private Sub btnDeleteSicherheit_Click(sender As Object, e As EventArgs) Handles btnDeleteSicherheit.Click
|
||||||
Try
|
Try
|
||||||
|
Dim posNr = currentSicherheit.gs_posNr
|
||||||
|
Dim ATBNr = currentSicherheit.gs_ATBNr
|
||||||
|
Dim gsNr = currentSicherheit.gs_gsNr
|
||||||
currentSicherheit.Delete()
|
currentSicherheit.Delete()
|
||||||
|
rearangePosNr(gsNr, ATBNr, posNr)
|
||||||
btnUpdateSicherheit.Visible = False
|
btnUpdateSicherheit.Visible = False
|
||||||
btnAddSicherheit.Visible = True
|
btnAddSicherheit.Visible = True
|
||||||
btnDeleteSicherheit.Visible = False
|
btnDeleteSicherheit.Visible = False
|
||||||
@@ -883,7 +890,7 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Dim onlyOpenDT As DataTable
|
Dim onlyOpenDT As DataTable
|
||||||
|
|
||||||
onlyOpenDT = dt.Select("gs_isOpen = True").CopyToDataTable
|
onlyOpenDT = dataTable.Select("gs_isOpen = True").CopyToDataTable
|
||||||
|
|
||||||
|
|
||||||
For i As Integer = 0 To onlyOpenDT.Rows.Count - 1
|
For i As Integer = 0 To onlyOpenDT.Rows.Count - 1
|
||||||
@@ -913,16 +920,16 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
If isInList = False AndAlso onlyOpenDT.Rows.Count - 1 <> 0 Then
|
If isInList = False AndAlso onlyOpenDT.Rows.Count - 1 <> 0 Then
|
||||||
|
|
||||||
For i As Integer = 0 To dt.Rows.Count - 1
|
For i As Integer = 0 To dataTable.Rows.Count - 1
|
||||||
If dt.Rows(i).Item("gs_gsnr") = Me.gessicherheitID Then
|
If dataTable.Rows(i).Item("gs_gsnr") = Me.gessicherheitID Then
|
||||||
|
|
||||||
If i = 0 Then
|
If i = 0 Then
|
||||||
prevGessicherheitID = -1 ' no prev Sicherheit
|
prevGessicherheitID = -1 ' no prev Sicherheit
|
||||||
Else
|
Else
|
||||||
|
|
||||||
For j As Integer = i To 0
|
For j As Integer = i To 0
|
||||||
If dt.Rows(j).Item("gs_isOpen") Then
|
If dataTable.Rows(j).Item("gs_isOpen") Then
|
||||||
prevGessicherheitID = dt.Rows(j).Item("gs_gsnr")
|
prevGessicherheitID = dataTable.Rows(j).Item("gs_gsnr")
|
||||||
'MsgBox("prevGessicherheitID " & prevGessicherheitID)
|
'MsgBox("prevGessicherheitID " & prevGessicherheitID)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -930,12 +937,12 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If i = dt.Rows.Count - 1 Then
|
If i = dataTable.Rows.Count - 1 Then
|
||||||
nextGessicherheitID = -1 ' ' no next Sicherheit
|
nextGessicherheitID = -1 ' ' no next Sicherheit
|
||||||
Else
|
Else
|
||||||
For k As Integer = i To dt.Rows.Count - 1
|
For k As Integer = i To dataTable.Rows.Count - 1
|
||||||
If dt.Rows(k).Item("gs_isOpen") Then
|
If dataTable.Rows(k).Item("gs_isOpen") Then
|
||||||
nextGessicherheitID = dt.Rows(k).Item("gs_gsnr")
|
nextGessicherheitID = dataTable.Rows(k).Item("gs_gsnr")
|
||||||
'MsgBox("nextGessicherheitID " & nextGessicherheitID)
|
'MsgBox("nextGessicherheitID " & nextGessicherheitID)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -953,16 +960,16 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
Private Function setPrevAndNextGesAll()
|
Private Function setPrevAndNextGesAll()
|
||||||
|
|
||||||
For i As Integer = 0 To dt.Rows.Count - 1
|
For i As Integer = 0 To dataTable.Rows.Count - 1
|
||||||
If dt.Rows(i).Item("gs_gsnr") = Me.gessicherheitID Then
|
If dataTable.Rows(i).Item("gs_gsnr") = Me.gessicherheitID Then
|
||||||
|
|
||||||
prevGessicherheitID = dt.Rows(i).Item("gs_gsnr") - 1
|
prevGessicherheitID = dataTable.Rows(i).Item("gs_gsnr") - 1
|
||||||
|
|
||||||
nextGessicherheitID = dt.Rows(i).Item("gs_gsnr") + 1
|
nextGessicherheitID = dataTable.Rows(i).Item("gs_gsnr") + 1
|
||||||
|
|
||||||
|
|
||||||
If i = 0 Then prevGessicherheitID = -1 ' no prev Sicherheit
|
If i = 0 Then prevGessicherheitID = -1 ' no prev Sicherheit
|
||||||
If i = dt.Rows.Count - 1 Then nextGessicherheitID = -1 ' ' no next Sicherheit
|
If i = dataTable.Rows.Count - 1 Then nextGessicherheitID = -1 ' ' no next Sicherheit
|
||||||
|
|
||||||
'MsgBox("prevGessicherheitID " & prevGessicherheitID)
|
'MsgBox("prevGessicherheitID " & prevGessicherheitID)
|
||||||
'MsgBox("nextGessicherheitID " & nextGessicherheitID)
|
'MsgBox("nextGessicherheitID " & nextGessicherheitID)
|
||||||
@@ -1088,5 +1095,37 @@ Public Class frmGesamtsicherheitenNEU
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub rearangePosNr(gsNr As Integer, ATBNr As String, posNr As Integer)
|
||||||
|
|
||||||
|
If posNr = -1 Or posNr = 1 Then Exit Sub
|
||||||
|
|
||||||
|
Dim sqlq As String = "select [gs_gsId], [gs_posNr] from [tblGesamtsicherheit] where gs_gsnr = " & gsNr & " AND gs_ATBNR = '" & ATBNr & "' AND gs_posNr > '" & posNr & "'"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(sqlq, "AVISO", 100, True)
|
||||||
|
|
||||||
|
If (dt.Rows.Count = 0) Then Exit Sub
|
||||||
|
|
||||||
|
|
||||||
|
For i As Integer = 0 To dt.Rows.Count - 1
|
||||||
|
MsgBox("gs_gsId: " & dt.Rows(i).Item("gs_gsId").ToString & " " & "gs_posNr: " & dt.Rows(i).Item("gs_posNr").ToString)
|
||||||
|
Dim sicherheit = New cSicherheiten(dt.Rows(i).Item("gs_gsId"), dt.Rows(i).Item("gs_posNr"))
|
||||||
|
Dim currentPos = sicherheit.gs_posNr
|
||||||
|
sicherheit.gs_posNr = currentPos - 1
|
||||||
|
sicherheit.UPDATEWithNewPosNr()
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub txtlkwIdSearch_VALUE_CHANGED() Handles txtlkwIdSearch.VALUE_CHANGED
|
||||||
|
If (txtlkwIdSearch._value <> "") Then
|
||||||
|
txtLKWID.Text = txtlkwIdSearch._value
|
||||||
|
txtLKWID.ReadOnly = True
|
||||||
|
Else
|
||||||
|
txtLKWID.Clear()
|
||||||
|
txtLKWID.ReadOnly = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user