Merge branch 'master' of https://verag.visualstudio.com/AVISO/_git/AVISO
This commit is contained in:
@@ -540,6 +540,12 @@
|
|||||||
<Compile Include="frmFreigabeSetzenAnhaenge.vb">
|
<Compile Include="frmFreigabeSetzenAnhaenge.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="frmGesamtsicherheitenNEU.Designer.vb">
|
||||||
|
<DependentUpon>frmGesamtsicherheitenNEU.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="frmGesamtsicherheitenNEU.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="frmNCTSRouten.Designer.vb">
|
<Compile Include="frmNCTSRouten.Designer.vb">
|
||||||
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
|
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -606,16 +612,16 @@
|
|||||||
<Compile Include="frmGelangensbestaetigung.vb">
|
<Compile Include="frmGelangensbestaetigung.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmGesSich.Designer.vb">
|
<Compile Include="frmGesamtsicherheiten.Designer.vb">
|
||||||
<DependentUpon>frmGesSich.vb</DependentUpon>
|
<DependentUpon>frmGesamtsicherheiten.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmGesSich.vb">
|
<Compile Include="frmGesamtsicherheiten.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmGesSichMenu.Designer.vb">
|
<Compile Include="frmGesamtsicherheitenMenu.Designer.vb">
|
||||||
<DependentUpon>frmGesSichMenu.vb</DependentUpon>
|
<DependentUpon>frmGesamtsicherheitenMenu.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmGesSichMenu.vb">
|
<Compile Include="frmGesamtsicherheitenMenu.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmHauptfenster.Designer.vb">
|
<Compile Include="frmHauptfenster.Designer.vb">
|
||||||
@@ -1068,6 +1074,9 @@
|
|||||||
<EmbeddedResource Include="frmFreigabeSetzenAnhaenge.resx">
|
<EmbeddedResource Include="frmFreigabeSetzenAnhaenge.resx">
|
||||||
<DependentUpon>frmFreigabeSetzenAnhaenge.vb</DependentUpon>
|
<DependentUpon>frmFreigabeSetzenAnhaenge.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="frmGesamtsicherheitenNEU.resx">
|
||||||
|
<DependentUpon>frmGesamtsicherheitenNEU.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmNCTSRouten.resx">
|
<EmbeddedResource Include="frmNCTSRouten.resx">
|
||||||
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
|
<DependentUpon>frmNCTSRouten.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@@ -1101,11 +1110,11 @@
|
|||||||
<EmbeddedResource Include="frmGelangensbestaetigung.resx">
|
<EmbeddedResource Include="frmGelangensbestaetigung.resx">
|
||||||
<DependentUpon>frmGelangensbestaetigung.vb</DependentUpon>
|
<DependentUpon>frmGelangensbestaetigung.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmGesSich.resx">
|
<EmbeddedResource Include="frmGesamtsicherheiten.resx">
|
||||||
<DependentUpon>frmGesSich.vb</DependentUpon>
|
<DependentUpon>frmGesamtsicherheiten.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmGesSichMenu.resx">
|
<EmbeddedResource Include="frmGesamtsicherheitenMenu.resx">
|
||||||
<DependentUpon>frmGesSichMenu.vb</DependentUpon>
|
<DependentUpon>frmGesamtsicherheitenMenu.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmHauptfenster.resx">
|
<EmbeddedResource Include="frmHauptfenster.resx">
|
||||||
<DependentUpon>frmHauptfenster.vb</DependentUpon>
|
<DependentUpon>frmHauptfenster.vb</DependentUpon>
|
||||||
|
|||||||
10
Aviso/frmFrachtkostenBerechnen.Designer.vb
generated
10
Aviso/frmFrachtkostenBerechnen.Designer.vb
generated
@@ -291,7 +291,7 @@ Partial Class frmFrachtkostenBerechnen
|
|||||||
Me.cbxLandNach.FormattingEnabled = True
|
Me.cbxLandNach.FormattingEnabled = True
|
||||||
Me.cbxLandNach.Location = New System.Drawing.Point(255, 23)
|
Me.cbxLandNach.Location = New System.Drawing.Point(255, 23)
|
||||||
Me.cbxLandNach.Name = "cbxLandNach"
|
Me.cbxLandNach.Name = "cbxLandNach"
|
||||||
Me.cbxLandNach.Size = New System.Drawing.Size(35, 21)
|
Me.cbxLandNach.Size = New System.Drawing.Size(45, 21)
|
||||||
Me.cbxLandNach.TabIndex = 6
|
Me.cbxLandNach.TabIndex = 6
|
||||||
'
|
'
|
||||||
'cbxLandVon
|
'cbxLandVon
|
||||||
@@ -304,7 +304,7 @@ Partial Class frmFrachtkostenBerechnen
|
|||||||
Me.cbxLandVon.FormattingEnabled = True
|
Me.cbxLandVon.FormattingEnabled = True
|
||||||
Me.cbxLandVon.Location = New System.Drawing.Point(75, 22)
|
Me.cbxLandVon.Location = New System.Drawing.Point(75, 22)
|
||||||
Me.cbxLandVon.Name = "cbxLandVon"
|
Me.cbxLandVon.Name = "cbxLandVon"
|
||||||
Me.cbxLandVon.Size = New System.Drawing.Size(35, 21)
|
Me.cbxLandVon.Size = New System.Drawing.Size(45, 21)
|
||||||
Me.cbxLandVon.TabIndex = 3
|
Me.cbxLandVon.TabIndex = 3
|
||||||
'
|
'
|
||||||
'txbCalcDistanceNichtEU
|
'txbCalcDistanceNichtEU
|
||||||
@@ -516,7 +516,7 @@ Partial Class frmFrachtkostenBerechnen
|
|||||||
Me.txbVonOrt.MaxLines_Warning = ""
|
Me.txbVonOrt.MaxLines_Warning = ""
|
||||||
Me.txbVonOrt.MaxLines_Warning_Label = Nothing
|
Me.txbVonOrt.MaxLines_Warning_Label = Nothing
|
||||||
Me.txbVonOrt.Name = "txbVonOrt"
|
Me.txbVonOrt.Name = "txbVonOrt"
|
||||||
Me.txbVonOrt.Size = New System.Drawing.Size(105, 20)
|
Me.txbVonOrt.Size = New System.Drawing.Size(106, 20)
|
||||||
Me.txbVonOrt.TabIndex = 9
|
Me.txbVonOrt.TabIndex = 9
|
||||||
'
|
'
|
||||||
'txbNachPLZ
|
'txbNachPLZ
|
||||||
@@ -557,12 +557,12 @@ Partial Class frmFrachtkostenBerechnen
|
|||||||
Me.txbVonPLZ._Waehrung = False
|
Me.txbVonPLZ._Waehrung = False
|
||||||
Me.txbVonPLZ._WaehrungZeichen = True
|
Me.txbVonPLZ._WaehrungZeichen = True
|
||||||
Me.txbVonPLZ.ForeColor = System.Drawing.Color.Black
|
Me.txbVonPLZ.ForeColor = System.Drawing.Color.Black
|
||||||
Me.txbVonPLZ.Location = New System.Drawing.Point(116, 23)
|
Me.txbVonPLZ.Location = New System.Drawing.Point(121, 23)
|
||||||
Me.txbVonPLZ.MaxLineLength = -1
|
Me.txbVonPLZ.MaxLineLength = -1
|
||||||
Me.txbVonPLZ.MaxLines_Warning = ""
|
Me.txbVonPLZ.MaxLines_Warning = ""
|
||||||
Me.txbVonPLZ.MaxLines_Warning_Label = Nothing
|
Me.txbVonPLZ.MaxLines_Warning_Label = Nothing
|
||||||
Me.txbVonPLZ.Name = "txbVonPLZ"
|
Me.txbVonPLZ.Name = "txbVonPLZ"
|
||||||
Me.txbVonPLZ.Size = New System.Drawing.Size(64, 20)
|
Me.txbVonPLZ.Size = New System.Drawing.Size(60, 20)
|
||||||
Me.txbVonPLZ.TabIndex = 4
|
Me.txbVonPLZ.TabIndex = 4
|
||||||
'
|
'
|
||||||
'tbNichtEUAnteil
|
'tbNichtEUAnteil
|
||||||
|
|||||||
@@ -1,632 +0,0 @@
|
|||||||
Imports System.Reflection
|
|
||||||
|
|
||||||
Public Class frmGesSich
|
|
||||||
|
|
||||||
Public Property GesamtsichNr As Integer
|
|
||||||
Public Property MakeDate As DateTime = Nothing
|
|
||||||
Property GesSichRef As cGesamtSicherheitsReferenz
|
|
||||||
Property Standort As String = ""
|
|
||||||
Public ZollsatzMulti As Double = 0
|
|
||||||
Public Saldo As Integer = 0
|
|
||||||
Public Neu As Boolean = False
|
|
||||||
Public FilialNummer As Integer
|
|
||||||
Public Abfertigungsnummer As String
|
|
||||||
Public LKWID As String
|
|
||||||
|
|
||||||
Dim openopened As cSicherheit
|
|
||||||
dim closedopened as cSicherheit
|
|
||||||
|
|
||||||
|
|
||||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
|
||||||
|
|
||||||
Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
|
|
||||||
|
|
||||||
Dim dgv As String = ""
|
|
||||||
For Each c As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
|
||||||
dgv &= c.Width & c.HeaderText & vbCrLf
|
|
||||||
Next
|
|
||||||
' MsgBox(dgv)
|
|
||||||
LoadDGV()
|
|
||||||
GesSichRef.LoadStandort(Standort)
|
|
||||||
LoadStandort()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub frmGesamtsicherheit_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
||||||
If nixzunull(GesamtsichNr) = 0 Or Neu = True Then
|
|
||||||
panOben.Enabled = False : panOben.Enabled = False
|
|
||||||
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)
|
|
||||||
If MakeDate = Nothing Then MakeDate = Date.Now
|
|
||||||
Else
|
|
||||||
LoadDGV()
|
|
||||||
End If
|
|
||||||
LoadStandort()
|
|
||||||
cboATR.Enabled = GesSichRef.ATR
|
|
||||||
|
|
||||||
Me.Text = "Gesamtsicherheit " & Standort
|
|
||||||
frmHauptfenster.EnableDoubleBuffered(dgvGesamtsicherheitCRN)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub LoadDGV()
|
|
||||||
lblSaldo.Text = "Saldo: € " & GesSichRef.Saldo.ToString("N")
|
|
||||||
lblGestellungNr.Text = ""
|
|
||||||
Dim sqladd1 As String = ""
|
|
||||||
If GesSichRef.UstEnabled Then sqladd1 &= ", FORMAT(((Warenwert + Sicherheitsbetrag) * " & GesSichRef.Ust & "/100), 'C', 'de-DE') as Ust"
|
|
||||||
If GesSichRef.ATR Then sqladd1 &= ", ATRJN"
|
|
||||||
|
|
||||||
|
|
||||||
Dim addtosqlstring As String = ""
|
|
||||||
Dim SQLStringMRN As String = "select GesamtSichID, Kennnummer, PosNr, DateTime, Warenwert, Sicherheitsbetrag, Saldo " & sqladd1 & " , Freitext from [tblGesamtsicherheit] where GesamtsichNr = '" & GesamtsichNr & "' and Art = 'Open' order by DateTime"
|
|
||||||
dgvGesamtsicherheitMRN.SET_SQL(SQLStringMRN, "AVISO", ,)
|
|
||||||
dgvGesamtsicherheitMRN.LOAD()
|
|
||||||
|
|
||||||
Dim SQLStringCRN As String = "select GesamtSichID, Kennnummer, DateTime, Warenwert, Sicherheitsbetrag, Saldo, Freitext from [tblGesamtsicherheit] where GesamtsichNr = '" & GesamtsichNr & "' and Art = 'Close' order by DateTime"
|
|
||||||
dgvGesamtsicherheitCRN.SET_SQL(SQLStringCRN, "AVISO", ,)
|
|
||||||
dgvGesamtsicherheitCRN.LOAD()
|
|
||||||
|
|
||||||
Dim StandortSqlString As String = "select * from [tblGesamtsicherheit] where GesamtsichNr = '" & GesamtsichNr & "'"
|
|
||||||
Dim dt As New DataTable
|
|
||||||
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
|
||||||
|
|
||||||
If dt.Rows.Count > 0 Then
|
|
||||||
'Me.GesamtsichNr = dt.Rows(0).Item("GesamtsichNr")
|
|
||||||
Me.FilialNummer = dt.Rows(0).Item("FilialNummer")
|
|
||||||
Me.Abfertigungsnummer = dt.Rows(0).Item("Abfertigungsnummer")
|
|
||||||
|
|
||||||
If Me.FilialNummer.ToString.Length > 0 Then lblGestellungNr.Text &= "FilialNr: " & Me.FilialNummer
|
|
||||||
If Me.Abfertigungsnummer.Length > 0 Then lblGestellungNr.Text &= "Abfertigungsnummer: " & Me.Abfertigungsnummer
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If dgvGesamtsicherheitMRN.Columns.Count > 0 Then
|
|
||||||
With dgvGesamtsicherheitMRN
|
|
||||||
.RowHeadersWidth = 10
|
|
||||||
.Columns("GesamtSichID").Visible = False
|
|
||||||
.Columns("Warenwert").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Saldo").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Saldo").Visible = False
|
|
||||||
Select Case GesSichRef.ATR
|
|
||||||
Case True
|
|
||||||
.Columns("Kennnummer").HeaderText = "ATB"
|
|
||||||
.Columns("AtrJN").HeaderText = "ATR"
|
|
||||||
.Columns("AtrJN").Width = 33
|
|
||||||
.Columns("Ust").Width = 69
|
|
||||||
Case Else
|
|
||||||
.Columns("Kennnummer").HeaderText = "CRN"
|
|
||||||
End Select
|
|
||||||
.Columns("Kennnummer").Width = 146
|
|
||||||
|
|
||||||
.Columns("PosNr").Width = 20
|
|
||||||
.Columns("DateTime").Width = 95
|
|
||||||
.Columns("Warenwert").Width = 100
|
|
||||||
.Columns("Saldo").Width = 100
|
|
||||||
|
|
||||||
.Columns("Sicherheitsbetrag").Width = 100
|
|
||||||
.Columns("Freitext").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
|
||||||
End With
|
|
||||||
' For Each col As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
|
||||||
'col.Width = 120
|
|
||||||
'Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
If dgvGesamtsicherheitCRN.Columns.Count > 0 Then
|
|
||||||
With dgvGesamtsicherheitCRN
|
|
||||||
.RowHeadersWidth = 10
|
|
||||||
.Columns("GesamtSichID").Visible = False
|
|
||||||
.Columns("Warenwert").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Saldo").DefaultCellStyle.Format = "c"
|
|
||||||
.Columns("Saldo").Visible = False
|
|
||||||
Select Case GesSichRef.ATR
|
|
||||||
Case True
|
|
||||||
.Columns("Kennnummer").HeaderText = "ATC / MRN"
|
|
||||||
Case Else
|
|
||||||
.Columns("Kennnummer").HeaderText = "CRN"
|
|
||||||
End Select
|
|
||||||
.Columns("Kennnummer").Width = 120
|
|
||||||
.Columns("DateTime").Width = 140
|
|
||||||
.Columns("Warenwert").Width = 100
|
|
||||||
.Columns("Sicherheitsbetrag").Width = 100
|
|
||||||
.Columns("Freitext").Width = 220
|
|
||||||
End With
|
|
||||||
'For Each col As DataGridViewColumn In dgvGesamtsicherheitCRN.Columns
|
|
||||||
' col.Width = 120
|
|
||||||
'Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Public Sub LoadStandort()
|
|
||||||
'Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where Standort = " & "'" & Standort & "'"
|
|
||||||
'Dim dt As New DataTable
|
|
||||||
'dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
|
||||||
'Zollsatz = dt.Rows(0).Item("Zollsatz")
|
|
||||||
'Referenzwert = dt.Rows(0).Item("Referenzwert")
|
|
||||||
|
|
||||||
lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.Referenzwert.ToString("N")
|
|
||||||
lblZollsatz.Text = "Zollsatz: " & GesSichRef.Zollsatz & "%"
|
|
||||||
ZollsatzMulti = GesSichRef.Zollsatz / 100
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Private Sub CalcSaldo()
|
|
||||||
' Dim SaldoString As String = "select SUM([MRN_Sicherheitsbetrag]) as sumone, SUM([CRN_Sicherheitsbetrag]) As sumtwo from [tblGesamtsicherheit]"
|
|
||||||
' Dim dt As New DataTable
|
|
||||||
' dt = SQL.loadDgvBySql(SaldoString, "AVISO", 100, True)
|
|
||||||
' Dim mrn As Integer = dt.Rows(0).Item(0)
|
|
||||||
' Dim crn As Integer = dt.Rows(0).Item(1)
|
|
||||||
|
|
||||||
' Saldo = Referenzwert - mrn + crn
|
|
||||||
|
|
||||||
' lblSaldo.Text = "Saldo: €" & Saldo.ToString("N")
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub Warenwert_TextChanged(sender As Object, e As EventArgs) Handles txtMRNWarenwert.TextChanged, txtCRNWarenwert.TextChanged
|
|
||||||
Try
|
|
||||||
Select Case sender.name
|
|
||||||
Case "txtMRNWarenwert"
|
|
||||||
txtMRNSicherheitsbetrag.Text = (txtMRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
|
||||||
If GesSichRef.UstEnabled Then txtEust.Text = (Double.Parse(txtMRNWarenwert.Text) + Double.Parse(txtMRNSicherheitsbetrag.Text)) * (GesSichRef.Ust / 100)
|
|
||||||
Case "txtCRNWarenwert"
|
|
||||||
txtCRNSicherheitsbetrag.Text = (txtCRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
|
||||||
End Select
|
|
||||||
Catch
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub Warenwert_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtMRNWarenwert.KeyPress, txtCRNWarenwert.KeyPress, txtPos.KeyPress
|
|
||||||
Select Case Asc(e.KeyChar)
|
|
||||||
Case 48 To 57, 8, 44
|
|
||||||
' Zahlen, Backspace und , zulassen
|
|
||||||
|
|
||||||
Case Else
|
|
||||||
' alle anderen Eingaben unterdrücken
|
|
||||||
e.Handled = True
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub DateTime_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtCRNDate.KeyPress, txtCRNTime.KeyPress, txtMRNDate.KeyPress, txtMRNTime.KeyPress
|
|
||||||
Select Case Asc(e.KeyChar)
|
|
||||||
Case 48 To 57, 8, 46, 58
|
|
||||||
' Zahlen, Backspace, . und : zulassen
|
|
||||||
|
|
||||||
Case Else
|
|
||||||
' alle anderen Eingaben unterdrücken
|
|
||||||
e.Handled = True
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
|
||||||
Try
|
|
||||||
Dim a As Date = Date.ParseExact(txtMRNDate.Text, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
|
||||||
Dim b As Date = Date.ParseExact(txtMRNTime.Text, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
|
||||||
|
|
||||||
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
|
||||||
MsgBox(ab.ToString)
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtMRNDate.GotFocus, txtCRNDate.GotFocus, txtMRNTime.GotFocus, txtCRNTime.GotFocus
|
|
||||||
Select Case sender.name
|
|
||||||
Case "txtMRNDate"
|
|
||||||
If txtMRNDate.Text.Length < 1 Then txtMRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
|
||||||
Case "txtCRNDate"
|
|
||||||
If txtCRNDate.Text.Length < 1 Then txtCRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
|
||||||
Case "txtMRNTime"
|
|
||||||
If txtMRNTime.Text.Length < 1 Then txtMRNTime.Text = Date.Now.ToString("HH:mm")
|
|
||||||
Case "txtCRNTime"
|
|
||||||
If txtCRNTime.Text.Length < 1 Then txtCRNTime.Text = Date.Now.ToString("HH:mm")
|
|
||||||
End Select
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnAddMRN_Click(sender As Object, e As EventArgs) Handles btnAddOpen.Click
|
|
||||||
Try
|
|
||||||
|
|
||||||
Dim OPEN As New cSicherheit(Me)
|
|
||||||
With OPEN
|
|
||||||
.Kennnummer = txtMRN.Text
|
|
||||||
.PosNr = Double.Parse(nixzunull(txtPos.Text))
|
|
||||||
.DateTime = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
|
||||||
.Warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.Sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.standort = Me.Standort
|
|
||||||
.Art = "OPEN"
|
|
||||||
.GesamtsichNr = Me.GesamtsichNr
|
|
||||||
.MakeDate = Me.MakeDate
|
|
||||||
.Freitext = Me.txtFreitextOpen.Text
|
|
||||||
.saldo = GesSichRef.Saldo
|
|
||||||
.ATRJN = nixzunull(cboATR.SelectedItem)
|
|
||||||
End With
|
|
||||||
|
|
||||||
If Neu = True Then OPEN.GesamtsichNr = AddNewGesamtSichNr()
|
|
||||||
|
|
||||||
Select Case TestIfExist(OPEN.Kennnummer, GesamtsichNr)
|
|
||||||
Case "Neu"
|
|
||||||
OPEN.Save()
|
|
||||||
Case Else
|
|
||||||
MsgBox("INFO: Dieser Eintrag wurde bereits bei GesamtsichNr " & TestIfExist(OPEN.Kennnummer, GesamtsichNr) & "eingetragen") : OPEN.Save()
|
|
||||||
End Select
|
|
||||||
|
|
||||||
AfterButton()
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnAddCRN_Click(sender As Object, e As EventArgs) Handles btnAddClose.Click
|
|
||||||
Try
|
|
||||||
Dim Close As New cSicherheit(Me)
|
|
||||||
With Close
|
|
||||||
.Kennnummer = txtCRN.Text
|
|
||||||
.DateTime = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
|
||||||
.Warenwert = Double.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.Sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.standort = Me.Standort
|
|
||||||
.Art = "Close"
|
|
||||||
.GesamtsichNr = Me.GesamtsichNr
|
|
||||||
.MakeDate = Me.MakeDate
|
|
||||||
.Freitext = Me.txtFreitextClose.Text
|
|
||||||
.saldo = GesSichRef.Saldo
|
|
||||||
End With
|
|
||||||
|
|
||||||
If Neu = True Then Close.GesamtsichNr = AddNewGesamtSichNr()
|
|
||||||
|
|
||||||
Select Case TestIfExist(Close.Kennnummer, GesamtsichNr)
|
|
||||||
Case "Neu"
|
|
||||||
Close.Save()
|
|
||||||
Case Else
|
|
||||||
MsgBox("Dieser Eintrag wurde bereits bei GesamtsichNr " & TestIfExist(Close.Kennnummer, GesamtsichNr) & "eingetragen") : Exit Sub
|
|
||||||
End Select
|
|
||||||
|
|
||||||
AfterButton()
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Function nixzunull(s As String, Optional type As String = "")
|
|
||||||
|
|
||||||
If s = "" Then
|
|
||||||
Dim O As Double = 0
|
|
||||||
|
|
||||||
Return O
|
|
||||||
Else
|
|
||||||
Return s
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
Function AfterButton()
|
|
||||||
GesSichRef.CalcSaldo()
|
|
||||||
LoadDGV()
|
|
||||||
EmptyTXT()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function AddNewGesamtSichNr() As Integer
|
|
||||||
Dim sqlq As String = "select MAX([GesamtsichNr]) as MaxGesSich from tblGesamtsicherheit"
|
|
||||||
Dim dt As New DataTable
|
|
||||||
dt = SQL.loadDgvBySql(sqlq, "AVISO", 100, True)
|
|
||||||
Dim LetzteGesSichNum As Integer = dt.Rows(0).Item(0)
|
|
||||||
Me.GesamtsichNr = LetzteGesSichNum + 1
|
|
||||||
Me.Neu = False
|
|
||||||
Return Me.GesamtsichNr
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Sub EmptyTXT()
|
|
||||||
Dim a As New List(Of Control)
|
|
||||||
For Each contr As Control In panOben.Controls
|
|
||||||
If contr.GetType.FullName = "System.Windows.Forms.TextBox" Then contr.Text = ""
|
|
||||||
Next
|
|
||||||
cboATR.SelectedItem = Nothing
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function TestIfExist(KennnummerStr As String, Optional ByVal lkw As String = "")
|
|
||||||
If lkw = "" And Me.GesamtsichNr > 0 Then lkw = GesamtsichNr
|
|
||||||
|
|
||||||
Dim SQLString As String = "Select * from [tblGesamtsicherheit] where Kennnummer = '" & KennnummerStr & "'"
|
|
||||||
Dim dt As New DataTable
|
|
||||||
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
|
||||||
If dt.Rows.Count > 0 Then
|
|
||||||
Return dt.Rows(0).Item("GesamtsichNr").ToString
|
|
||||||
Else
|
|
||||||
Return "Neu"
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function DateTimeString2DateTimeKonvertinator(datum As String, uhrzeit As String) As DateTime
|
|
||||||
Try
|
|
||||||
Dim a As Date = Date.ParseExact(datum, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
|
||||||
Dim b As Date = Date.ParseExact(uhrzeit, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
|
||||||
|
|
||||||
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
|
||||||
Return ab
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
Return Date.Now
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub FlatButton2_Click(sender As Object, e As EventArgs) Handles FlatButton2.Click
|
|
||||||
Try
|
|
||||||
Me.FilialNummer = returnnothingehschonwissen(cboFiliale.SelectedItem, "Integer")
|
|
||||||
Catch
|
|
||||||
Me.FilialNummer = "0"
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Me.Abfertigungsnummer = txtAbfertNum.Text
|
|
||||||
Me.LKWID = txtLKWID.Text
|
|
||||||
|
|
||||||
If nixzunull(Me.GesamtsichNr) > 0 Then
|
|
||||||
Dim sqlstring = "Update [tblGesamtsicherheit] set FilialNummer = '" & Me.FilialNummer & "', Abfertigungsnummer = '" & Me.Abfertigungsnummer & "', LKWID = '" & Me.LKWID & "' WHERE GesamtSichNr = '" & Me.GesamtsichNr & "' "
|
|
||||||
SQL.doSQL(sqlstring, "AVISO")
|
|
||||||
LoadDGV()
|
|
||||||
End If
|
|
||||||
|
|
||||||
panOben.Enabled = True : panOben.Enabled = True
|
|
||||||
panOverlay.Visible = False
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function returnnothingehschonwissen(obj As Object, Optional type As String = "String")
|
|
||||||
Select Case type
|
|
||||||
Case "String"
|
|
||||||
If obj Is Nothing Then
|
|
||||||
Return ""
|
|
||||||
Else
|
|
||||||
Return obj.value.ToString
|
|
||||||
End If
|
|
||||||
Case "Integer"
|
|
||||||
If obj Is Nothing Then
|
|
||||||
Return Nothing
|
|
||||||
Else
|
|
||||||
Return Integer.Parse(obj.value)
|
|
||||||
End If
|
|
||||||
End Select
|
|
||||||
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Sub dgvGesamtsicherheitMRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitMRN.CellDoubleClick
|
|
||||||
|
|
||||||
Dim Sicherh As New cSicherheit
|
|
||||||
Sicherh.Load(dgvGesamtsicherheitMRN.CurrentRow.Cells("GesamtSichID").Value)
|
|
||||||
|
|
||||||
txtMRN.Text = Sicherh.Kennnummer
|
|
||||||
txtPos.Text = Sicherh.PosNr
|
|
||||||
txtMRNWarenwert.Text = Sicherh.Warenwert
|
|
||||||
txtFreitextOpen.Text = Sicherh.Freitext
|
|
||||||
cboATR.SelectedItem = Sicherh.ATRJN
|
|
||||||
txtMRNDate.Text = Sicherh.DateTime.ToString("dd.MM.yyyy")
|
|
||||||
txtMRNTime.Text = Sicherh.DateTime.ToString("HH:mm")
|
|
||||||
|
|
||||||
openopened = Sicherh
|
|
||||||
|
|
||||||
btnAddOpen.Visible = False
|
|
||||||
btnUpdateOpen.Visible = True
|
|
||||||
btnDeleteOpen.Visible = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnUpdateOpen_Click(sender As Object, e As EventArgs) Handles btnUpdateOpen.Click
|
|
||||||
With openopened
|
|
||||||
.Kennnummer = txtMRN.Text
|
|
||||||
.PosNr = Double.Parse(nixzunull(txtPos.Text))
|
|
||||||
.DateTime = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
|
||||||
.Warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.Sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.standort = Me.Standort
|
|
||||||
.Art = "OPEN"
|
|
||||||
.GesamtsichNr = Me.GesamtsichNr
|
|
||||||
'.MakeDate = Me.MakeDate
|
|
||||||
.Freitext = Me.txtFreitextOpen.Text
|
|
||||||
'.saldo = GesSichRef.Saldo
|
|
||||||
.ATRJN = nixzunull(cboATR.SelectedItem)
|
|
||||||
End With
|
|
||||||
openopened.Save()
|
|
||||||
btnUpdateOpen.Visible = False
|
|
||||||
btnAddOpen.Visible = True
|
|
||||||
btnDeleteOpen.Visible = False
|
|
||||||
AfterButton()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub FlatButton4_Click(sender As Object, e As EventArgs) Handles btnUpdateClose.Click
|
|
||||||
With closedopened
|
|
||||||
.Kennnummer = txtCRN.Text
|
|
||||||
.DateTime = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
|
||||||
.Warenwert = Double.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.Sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
|
||||||
.standort = Me.Standort
|
|
||||||
.Art = "Close"
|
|
||||||
.Freitext = Me.txtFreitextClose.Text
|
|
||||||
End With
|
|
||||||
closedopened.Save()
|
|
||||||
btnAddClose.Visible = True
|
|
||||||
btnUpdateClose.Visible = False
|
|
||||||
btnDeleteClose.Visible = False
|
|
||||||
AfterButton()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub dgvGesamtsicherheitCRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitCRN.CellDoubleClick
|
|
||||||
|
|
||||||
Dim Sicherh As New cSicherheit
|
|
||||||
Sicherh.Load(dgvGesamtsicherheitCRN.CurrentRow.Cells("GesamtSichID").Value)
|
|
||||||
|
|
||||||
txtCRN.Text = Sicherh.Kennnummer
|
|
||||||
txtCRNWarenwert.Text = Sicherh.Warenwert
|
|
||||||
txtFreitextClose.Text = Sicherh.Freitext
|
|
||||||
txtCRNDate.Text = Sicherh.DateTime.ToString("dd.MM.yyyy")
|
|
||||||
txtCRNTime.Text = Sicherh.DateTime.ToString("HH:mm")
|
|
||||||
|
|
||||||
closedopened = Sicherh
|
|
||||||
|
|
||||||
btnDeleteClose.Visible = True
|
|
||||||
btnAddClose.Visible = False
|
|
||||||
btnUpdateClose.Visible = True
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnDeleteOpen_Click(sender As Object, e As EventArgs) Handles btnDeleteOpen.Click
|
|
||||||
Try
|
|
||||||
openopened.Delete()
|
|
||||||
btnUpdateOpen.Visible = False
|
|
||||||
btnAddOpen.Visible = True
|
|
||||||
btnDeleteOpen.Visible = False
|
|
||||||
AfterButton()
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub FlatButton4_Click_1(sender As Object, e As EventArgs) Handles btnDeleteClose.Click
|
|
||||||
Try
|
|
||||||
closedopened.Delete()
|
|
||||||
btnUpdateClose.Visible = False
|
|
||||||
btnAddClose.Visible = True
|
|
||||||
btnDeleteClose.Visible = False
|
|
||||||
AfterButton()
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub lblGestellungNr_Click(sender As Object, e As EventArgs) Handles lblGestellungNr.DoubleClick
|
|
||||||
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)
|
|
||||||
cboFiliale.SelectedIndex = cboFiliale.FindString(Me.FilialNummer)
|
|
||||||
txtAbfertNum.Text = Me.Abfertigungsnummer
|
|
||||||
txtLKWID.Text = Me.LKWID
|
|
||||||
panOben.Enabled = False
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class cSicherheit
|
|
||||||
Property GesamtSichID
|
|
||||||
Property Kennnummer As String
|
|
||||||
Property PosNr As Integer
|
|
||||||
Property DateTime As DateTime
|
|
||||||
Property MakeDate As DateTime
|
|
||||||
Property Warenwert As Double
|
|
||||||
Property Sicherheitsbetrag As Double
|
|
||||||
Property saldo As Double
|
|
||||||
Property standort As String
|
|
||||||
Property Art As String
|
|
||||||
Property GesamtsichNr As Integer
|
|
||||||
Property Ust As Integer
|
|
||||||
Property Freitext As String
|
|
||||||
Property FilialNummer As Integer
|
|
||||||
Property Abfertigungsnummer As String
|
|
||||||
Property LKWID As String
|
|
||||||
Property ATRJN As String = ""
|
|
||||||
|
|
||||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
|
||||||
|
|
||||||
Public Sub New(Optional ByVal gessich As frmGesSich = Nothing)
|
|
||||||
If gessich IsNot Nothing Then
|
|
||||||
Me.FilialNummer = gessich.FilialNummer
|
|
||||||
Me.Abfertigungsnummer = gessich.Abfertigungsnummer
|
|
||||||
Me.LKWID = gessich.LKWID
|
|
||||||
Me.GesamtSichID = GenerateID()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function Load(GsID As String)
|
|
||||||
Me.GesamtSichID = GsID
|
|
||||||
Load()
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function Load()
|
|
||||||
Dim dt As New DataTable
|
|
||||||
Dim sqlstring As String = "SELECT * FROM [AVISO].[dbo].[tblGesamtsicherheit] where GesamtsichID = '" & Me.GesamtSichID & "'"
|
|
||||||
dt = SQL.loadDgvBySql(sqlstring, "AVISO", 100, True)
|
|
||||||
Dim test As cSicherheit = SQLEintraege.Loadinator(Me, dt)
|
|
||||||
' MsgBox("")
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function GenerateID() As String
|
|
||||||
Return Date.Now.ToString.Replace(".", "").Replace("-", "").Replace(",", "").Replace(" ", "").Replace(":", "")
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function Save()
|
|
||||||
'MakeDate = frmGesSich.MakeDate
|
|
||||||
Dim ding As New List(Of SQLEintraege)
|
|
||||||
For Each prop As PropertyInfo In Me.GetType().GetProperties()
|
|
||||||
If prop.GetValue(Me, Nothing).GetType = GetType(Double) Then
|
|
||||||
' MsgBox(prop.Name)
|
|
||||||
ding.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing).ToString.Replace(",", ".")))
|
|
||||||
Else
|
|
||||||
ding.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing)))
|
|
||||||
End If
|
|
||||||
' ding.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing)))
|
|
||||||
Next
|
|
||||||
|
|
||||||
'''
|
|
||||||
Dim dt As DataTable = SQL.loadDgvBySql("Select * from [tblGesamtsicherheit] where GesamtSichID = '" & Me.GesamtSichID & "'", "AVISO")
|
|
||||||
If dt.Rows.Count > 0 Then
|
|
||||||
Dim UpdateString As String = ""
|
|
||||||
For Each i In ding
|
|
||||||
If Not i.Spalte = "GesamtSichID" Then
|
|
||||||
UpdateString &= "[" & i.Spalte & "]='" & i.Wert & "',"
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
UpdateString = UpdateString.Substring(0, UpdateString.Length - 1)
|
|
||||||
|
|
||||||
Dim sqlquery As String
|
|
||||||
sqlquery = "update [tblGesamtsicherheit] set " & UpdateString & " where GesamtSichID = '" & Me.GesamtSichID & "'"
|
|
||||||
SQL.doSQL(sqlquery, "AVISO")
|
|
||||||
Else
|
|
||||||
|
|
||||||
Dim text, value, insert As String
|
|
||||||
For Each i In ding
|
|
||||||
text &= i.Spalte & ", "
|
|
||||||
value &= "'" & i.Wert & "', "
|
|
||||||
Next
|
|
||||||
text = text.Substring(0, text.Length - 2)
|
|
||||||
value = value.Substring(0, value.Length - 2)
|
|
||||||
|
|
||||||
insert = "(" & text & ") VALUES (" & value & ")"
|
|
||||||
|
|
||||||
Dim sqlquery As String
|
|
||||||
sqlquery = "insert into [tblGesamtsicherheit] (" & text & ") VALUES (" & value & ")"
|
|
||||||
SQL.doSQL(sqlquery, "AVISO")
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function Delete()
|
|
||||||
SQL.doSQL("delete from [tblGesamtsicherheit] where GesamtSichID = '" & Me.GesamtSichID & "'", "AVISO")
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Class SQLEintraege
|
|
||||||
Property Spalte As String
|
|
||||||
Property Wert As String
|
|
||||||
Public Sub New(_Spalte As String, _Wert As String)
|
|
||||||
Spalte = _Spalte
|
|
||||||
Wert = _Wert
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Shared Function Loadinator(Obj As Object, dt As DataTable) As Object
|
|
||||||
Try
|
|
||||||
For Each prop As PropertyInfo In Obj.GetType().GetProperties()
|
|
||||||
If dt.Rows(0).Item(prop.Name) IsNot Nothing And dt.Rows(0).Item(prop.Name) IsNot DBNull.Value Then
|
|
||||||
If dt.Rows(0).Item(prop.Name).GetType Is GetType(Decimal) Then
|
|
||||||
prop.SetValue(Obj, Double.Parse(dt.Rows(0).Item(prop.Name)))
|
|
||||||
Else
|
|
||||||
prop.SetValue(Obj, dt.Rows(0).Item(prop.Name))
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Return Obj
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox(ex.Message)
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
End Class
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
Partial Class frmGesSich
|
Partial Class frmGesamtsicherheiten
|
||||||
Inherits System.Windows.Forms.Form
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
@@ -28,12 +28,14 @@ Partial Class frmGesSich
|
|||||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmGesSich))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmGesamtsicherheiten))
|
||||||
Me.dgvGesamtsicherheitMRN = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.dgvGesamtsicherheitMRN = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
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.cboWarenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
|
Me.lblWarenort = New System.Windows.Forms.Label()
|
||||||
Me.cboFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
Me.cboFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
Me.FlatButton2 = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
Me.btnSave = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||||
Me.txtLKWID = New System.Windows.Forms.TextBox()
|
Me.txtLKWID = New System.Windows.Forms.TextBox()
|
||||||
Me.txtAbfertNum = New System.Windows.Forms.TextBox()
|
Me.txtAbfertNum = New System.Windows.Forms.TextBox()
|
||||||
Me.Label18 = New System.Windows.Forms.Label()
|
Me.Label18 = New System.Windows.Forms.Label()
|
||||||
@@ -48,7 +50,7 @@ Partial Class frmGesSich
|
|||||||
Me.txtCRNDate = New System.Windows.Forms.TextBox()
|
Me.txtCRNDate = New System.Windows.Forms.TextBox()
|
||||||
Me.txtMRNTime = New System.Windows.Forms.TextBox()
|
Me.txtMRNTime = New System.Windows.Forms.TextBox()
|
||||||
Me.txtMRNDate = New System.Windows.Forms.TextBox()
|
Me.txtMRNDate = New System.Windows.Forms.TextBox()
|
||||||
Me.btnSave = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
Me.btnSaveOben = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||||
Me.txtCRNSicherheitsbetrag = New System.Windows.Forms.TextBox()
|
Me.txtCRNSicherheitsbetrag = New System.Windows.Forms.TextBox()
|
||||||
Me.txtCRNWarenwert = New System.Windows.Forms.TextBox()
|
Me.txtCRNWarenwert = New System.Windows.Forms.TextBox()
|
||||||
Me.txtCRN = New System.Windows.Forms.TextBox()
|
Me.txtCRN = New System.Windows.Forms.TextBox()
|
||||||
@@ -84,11 +86,14 @@ Partial Class frmGesSich
|
|||||||
Me.Label1 = New System.Windows.Forms.Label()
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
Me.txtFreitextClose = New System.Windows.Forms.TextBox()
|
Me.txtFreitextClose = New System.Windows.Forms.TextBox()
|
||||||
Me.txtFreitextOpen = New System.Windows.Forms.TextBox()
|
Me.txtFreitextOpen = New System.Windows.Forms.TextBox()
|
||||||
|
Me.ClosedErzeugenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
CType(Me.dgvGesamtsicherheitMRN, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.dgvGesamtsicherheitMRN, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.Panel2.SuspendLayout()
|
Me.Panel2.SuspendLayout()
|
||||||
Me.panOverlay.SuspendLayout()
|
Me.panOverlay.SuspendLayout()
|
||||||
CType(Me.dgvGesamtsicherheitCRN, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.dgvGesamtsicherheitCRN, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.panOben.SuspendLayout()
|
Me.panOben.SuspendLayout()
|
||||||
|
Me.ContextMenuStrip1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'dgvGesamtsicherheitMRN
|
'dgvGesamtsicherheitMRN
|
||||||
@@ -105,6 +110,7 @@ Partial Class frmGesSich
|
|||||||
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
|
||||||
Me.dgvGesamtsicherheitMRN.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
|
Me.dgvGesamtsicherheitMRN.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
|
||||||
Me.dgvGesamtsicherheitMRN.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
Me.dgvGesamtsicherheitMRN.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||||
|
Me.dgvGesamtsicherheitMRN.ContextMenuStrip = Me.ContextMenuStrip1
|
||||||
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
|
||||||
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
|
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window
|
||||||
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
@@ -143,8 +149,10 @@ Partial Class frmGesSich
|
|||||||
'panOverlay
|
'panOverlay
|
||||||
'
|
'
|
||||||
Me.panOverlay.BackColor = System.Drawing.SystemColors.ButtonHighlight
|
Me.panOverlay.BackColor = System.Drawing.SystemColors.ButtonHighlight
|
||||||
|
Me.panOverlay.Controls.Add(Me.cboWarenort)
|
||||||
|
Me.panOverlay.Controls.Add(Me.lblWarenort)
|
||||||
Me.panOverlay.Controls.Add(Me.cboFiliale)
|
Me.panOverlay.Controls.Add(Me.cboFiliale)
|
||||||
Me.panOverlay.Controls.Add(Me.FlatButton2)
|
Me.panOverlay.Controls.Add(Me.btnSave)
|
||||||
Me.panOverlay.Controls.Add(Me.txtLKWID)
|
Me.panOverlay.Controls.Add(Me.txtLKWID)
|
||||||
Me.panOverlay.Controls.Add(Me.txtAbfertNum)
|
Me.panOverlay.Controls.Add(Me.txtAbfertNum)
|
||||||
Me.panOverlay.Controls.Add(Me.Label18)
|
Me.panOverlay.Controls.Add(Me.Label18)
|
||||||
@@ -157,6 +165,30 @@ Partial Class frmGesSich
|
|||||||
Me.panOverlay.TabIndex = 2
|
Me.panOverlay.TabIndex = 2
|
||||||
Me.panOverlay.Visible = False
|
Me.panOverlay.Visible = False
|
||||||
'
|
'
|
||||||
|
'cboWarenort
|
||||||
|
'
|
||||||
|
Me.cboWarenort._allowedValuesFreiText = Nothing
|
||||||
|
Me.cboWarenort._allowFreiText = False
|
||||||
|
Me.cboWarenort._value = ""
|
||||||
|
Me.cboWarenort.DropDownWidth = 300
|
||||||
|
Me.cboWarenort.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.cboWarenort.FormattingEnabled = True
|
||||||
|
Me.cboWarenort.Location = New System.Drawing.Point(278, 64)
|
||||||
|
Me.cboWarenort.MaxLength = 4
|
||||||
|
Me.cboWarenort.Name = "cboWarenort"
|
||||||
|
Me.cboWarenort.Size = New System.Drawing.Size(186, 24)
|
||||||
|
Me.cboWarenort.TabIndex = 9
|
||||||
|
'
|
||||||
|
'lblWarenort
|
||||||
|
'
|
||||||
|
Me.lblWarenort.AutoSize = True
|
||||||
|
Me.lblWarenort.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblWarenort.Location = New System.Drawing.Point(125, 68)
|
||||||
|
Me.lblWarenort.Name = "lblWarenort"
|
||||||
|
Me.lblWarenort.Size = New System.Drawing.Size(88, 20)
|
||||||
|
Me.lblWarenort.TabIndex = 8
|
||||||
|
Me.lblWarenort.Text = "Warenort:"
|
||||||
|
'
|
||||||
'cboFiliale
|
'cboFiliale
|
||||||
'
|
'
|
||||||
Me.cboFiliale._allowedValuesFreiText = Nothing
|
Me.cboFiliale._allowedValuesFreiText = Nothing
|
||||||
@@ -165,25 +197,25 @@ Partial Class frmGesSich
|
|||||||
Me.cboFiliale.DropDownWidth = 300
|
Me.cboFiliale.DropDownWidth = 300
|
||||||
Me.cboFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.cboFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.cboFiliale.FormattingEnabled = True
|
Me.cboFiliale.FormattingEnabled = True
|
||||||
Me.cboFiliale.Location = New System.Drawing.Point(279, 76)
|
Me.cboFiliale.Location = New System.Drawing.Point(279, 103)
|
||||||
Me.cboFiliale.MaxLength = 4
|
Me.cboFiliale.MaxLength = 4
|
||||||
Me.cboFiliale.Name = "cboFiliale"
|
Me.cboFiliale.Name = "cboFiliale"
|
||||||
Me.cboFiliale.Size = New System.Drawing.Size(186, 24)
|
Me.cboFiliale.Size = New System.Drawing.Size(186, 24)
|
||||||
Me.cboFiliale.TabIndex = 2
|
Me.cboFiliale.TabIndex = 2
|
||||||
'
|
'
|
||||||
'FlatButton2
|
'btnSave
|
||||||
'
|
'
|
||||||
Me.FlatButton2.allowBorder = False
|
Me.btnSave.allowBorder = False
|
||||||
Me.FlatButton2.BackColor = System.Drawing.Color.Gainsboro
|
Me.btnSave.BackColor = System.Drawing.Color.Gainsboro
|
||||||
Me.FlatButton2.FlatAppearance.BorderSize = 0
|
Me.btnSave.FlatAppearance.BorderSize = 0
|
||||||
Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.FlatButton2.ForeColor = System.Drawing.Color.Black
|
Me.btnSave.ForeColor = System.Drawing.Color.Black
|
||||||
Me.FlatButton2.Location = New System.Drawing.Point(424, 232)
|
Me.btnSave.Location = New System.Drawing.Point(424, 232)
|
||||||
Me.FlatButton2.Name = "FlatButton2"
|
Me.btnSave.Name = "btnSave"
|
||||||
Me.FlatButton2.Size = New System.Drawing.Size(75, 23)
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.FlatButton2.TabIndex = 7
|
Me.btnSave.TabIndex = 7
|
||||||
Me.FlatButton2.Text = "Speichern"
|
Me.btnSave.Text = "Speichern"
|
||||||
Me.FlatButton2.UseVisualStyleBackColor = False
|
Me.btnSave.UseVisualStyleBackColor = False
|
||||||
'
|
'
|
||||||
'txtLKWID
|
'txtLKWID
|
||||||
'
|
'
|
||||||
@@ -197,7 +229,7 @@ Partial Class frmGesSich
|
|||||||
'txtAbfertNum
|
'txtAbfertNum
|
||||||
'
|
'
|
||||||
Me.txtAbfertNum.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.txtAbfertNum.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.txtAbfertNum.Location = New System.Drawing.Point(279, 128)
|
Me.txtAbfertNum.Location = New System.Drawing.Point(279, 140)
|
||||||
Me.txtAbfertNum.Margin = New System.Windows.Forms.Padding(0)
|
Me.txtAbfertNum.Margin = New System.Windows.Forms.Padding(0)
|
||||||
Me.txtAbfertNum.Name = "txtAbfertNum"
|
Me.txtAbfertNum.Name = "txtAbfertNum"
|
||||||
Me.txtAbfertNum.Size = New System.Drawing.Size(186, 24)
|
Me.txtAbfertNum.Size = New System.Drawing.Size(186, 24)
|
||||||
@@ -217,7 +249,7 @@ Partial Class frmGesSich
|
|||||||
'
|
'
|
||||||
Me.Label17.AutoSize = True
|
Me.Label17.AutoSize = True
|
||||||
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.Label17.Location = New System.Drawing.Point(68, 130)
|
Me.Label17.Location = New System.Drawing.Point(68, 142)
|
||||||
Me.Label17.Name = "Label17"
|
Me.Label17.Name = "Label17"
|
||||||
Me.Label17.Size = New System.Drawing.Size(181, 20)
|
Me.Label17.Size = New System.Drawing.Size(181, 20)
|
||||||
Me.Label17.TabIndex = 3
|
Me.Label17.TabIndex = 3
|
||||||
@@ -227,7 +259,7 @@ Partial Class frmGesSich
|
|||||||
'
|
'
|
||||||
Me.Label16.AutoSize = True
|
Me.Label16.AutoSize = True
|
||||||
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.Label16.Location = New System.Drawing.Point(126, 80)
|
Me.Label16.Location = New System.Drawing.Point(126, 107)
|
||||||
Me.Label16.Name = "Label16"
|
Me.Label16.Name = "Label16"
|
||||||
Me.Label16.Size = New System.Drawing.Size(123, 20)
|
Me.Label16.Size = New System.Drawing.Size(123, 20)
|
||||||
Me.Label16.TabIndex = 1
|
Me.Label16.TabIndex = 1
|
||||||
@@ -239,6 +271,7 @@ Partial Class frmGesSich
|
|||||||
Me.btnClosePanOverlay.BackColor = System.Drawing.Color.White
|
Me.btnClosePanOverlay.BackColor = System.Drawing.Color.White
|
||||||
Me.btnClosePanOverlay.BackgroundImage = Global.AVISO.My.Resources.Resources.del2
|
Me.btnClosePanOverlay.BackgroundImage = Global.AVISO.My.Resources.Resources.del2
|
||||||
Me.btnClosePanOverlay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
|
Me.btnClosePanOverlay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
|
||||||
|
Me.btnClosePanOverlay.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
Me.btnClosePanOverlay.FlatAppearance.BorderSize = 0
|
Me.btnClosePanOverlay.FlatAppearance.BorderSize = 0
|
||||||
Me.btnClosePanOverlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnClosePanOverlay.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.btnClosePanOverlay.ForeColor = System.Drawing.Color.Black
|
Me.btnClosePanOverlay.ForeColor = System.Drawing.Color.Black
|
||||||
@@ -358,19 +391,19 @@ Partial Class frmGesSich
|
|||||||
Me.txtMRNDate.Size = New System.Drawing.Size(85, 24)
|
Me.txtMRNDate.Size = New System.Drawing.Size(85, 24)
|
||||||
Me.txtMRNDate.TabIndex = 21
|
Me.txtMRNDate.TabIndex = 21
|
||||||
'
|
'
|
||||||
'btnSave
|
'btnSaveOben
|
||||||
'
|
'
|
||||||
Me.btnSave.allowBorder = False
|
Me.btnSaveOben.allowBorder = False
|
||||||
Me.btnSave.BackColor = System.Drawing.Color.White
|
Me.btnSaveOben.BackColor = System.Drawing.Color.White
|
||||||
Me.btnSave.FlatAppearance.BorderSize = 0
|
Me.btnSaveOben.FlatAppearance.BorderSize = 0
|
||||||
Me.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnSaveOben.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.btnSave.ForeColor = System.Drawing.Color.Black
|
Me.btnSaveOben.ForeColor = System.Drawing.Color.Black
|
||||||
Me.btnSave.Location = New System.Drawing.Point(12, 12)
|
Me.btnSaveOben.Location = New System.Drawing.Point(12, 12)
|
||||||
Me.btnSave.Name = "btnSave"
|
Me.btnSaveOben.Name = "btnSaveOben"
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
Me.btnSaveOben.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnSave.TabIndex = 0
|
Me.btnSaveOben.TabIndex = 0
|
||||||
Me.btnSave.Text = "Speichern"
|
Me.btnSaveOben.Text = "Speichern"
|
||||||
Me.btnSave.UseVisualStyleBackColor = False
|
Me.btnSaveOben.UseVisualStyleBackColor = False
|
||||||
'
|
'
|
||||||
'txtCRNSicherheitsbetrag
|
'txtCRNSicherheitsbetrag
|
||||||
'
|
'
|
||||||
@@ -450,7 +483,7 @@ Partial Class frmGesSich
|
|||||||
Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew
|
Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.lblZollsatz.Location = New System.Drawing.Point(1010, 37)
|
Me.lblZollsatz.Location = New System.Drawing.Point(1010, 37)
|
||||||
Me.lblZollsatz.Name = "lblZollsatz"
|
Me.lblZollsatz.Name = "lblZollsatz"
|
||||||
Me.lblZollsatz.Size = New System.Drawing.Size(86, 16)
|
Me.lblZollsatz.Size = New System.Drawing.Size(85, 16)
|
||||||
Me.lblZollsatz.TabIndex = 4
|
Me.lblZollsatz.TabIndex = 4
|
||||||
Me.lblZollsatz.Text = "Zollsatz: 12%"
|
Me.lblZollsatz.Text = "Zollsatz: 12%"
|
||||||
'
|
'
|
||||||
@@ -462,7 +495,7 @@ Partial Class frmGesSich
|
|||||||
Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew
|
Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.lblReferenzwert.Location = New System.Drawing.Point(1010, 15)
|
Me.lblReferenzwert.Location = New System.Drawing.Point(1010, 15)
|
||||||
Me.lblReferenzwert.Name = "lblReferenzwert"
|
Me.lblReferenzwert.Name = "lblReferenzwert"
|
||||||
Me.lblReferenzwert.Size = New System.Drawing.Size(137, 16)
|
Me.lblReferenzwert.Size = New System.Drawing.Size(136, 16)
|
||||||
Me.lblReferenzwert.TabIndex = 1
|
Me.lblReferenzwert.TabIndex = 1
|
||||||
Me.lblReferenzwert.Text = "Referenzwert: €80.000"
|
Me.lblReferenzwert.Text = "Referenzwert: €80.000"
|
||||||
'
|
'
|
||||||
@@ -512,7 +545,7 @@ Partial Class frmGesSich
|
|||||||
Me.panOben.Controls.Add(Me.txtCRNDate)
|
Me.panOben.Controls.Add(Me.txtCRNDate)
|
||||||
Me.panOben.Controls.Add(Me.txtMRNTime)
|
Me.panOben.Controls.Add(Me.txtMRNTime)
|
||||||
Me.panOben.Controls.Add(Me.txtMRNDate)
|
Me.panOben.Controls.Add(Me.txtMRNDate)
|
||||||
Me.panOben.Controls.Add(Me.btnSave)
|
Me.panOben.Controls.Add(Me.btnSaveOben)
|
||||||
Me.panOben.Controls.Add(Me.txtCRNSicherheitsbetrag)
|
Me.panOben.Controls.Add(Me.txtCRNSicherheitsbetrag)
|
||||||
Me.panOben.Controls.Add(Me.txtCRNWarenwert)
|
Me.panOben.Controls.Add(Me.txtCRNWarenwert)
|
||||||
Me.panOben.Controls.Add(Me.txtCRN)
|
Me.panOben.Controls.Add(Me.txtCRN)
|
||||||
@@ -794,7 +827,19 @@ Partial Class frmGesSich
|
|||||||
Me.txtFreitextOpen.Size = New System.Drawing.Size(256, 24)
|
Me.txtFreitextOpen.Size = New System.Drawing.Size(256, 24)
|
||||||
Me.txtFreitextOpen.TabIndex = 40
|
Me.txtFreitextOpen.TabIndex = 40
|
||||||
'
|
'
|
||||||
'frmGesSich
|
'ClosedErzeugenToolStripMenuItem
|
||||||
|
'
|
||||||
|
Me.ClosedErzeugenToolStripMenuItem.Name = "ClosedErzeugenToolStripMenuItem"
|
||||||
|
Me.ClosedErzeugenToolStripMenuItem.Size = New System.Drawing.Size(161, 22)
|
||||||
|
Me.ClosedErzeugenToolStripMenuItem.Text = "Closed erzeugen"
|
||||||
|
'
|
||||||
|
'ContextMenuStrip1
|
||||||
|
'
|
||||||
|
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ClosedErzeugenToolStripMenuItem})
|
||||||
|
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||||
|
Me.ContextMenuStrip1.Size = New System.Drawing.Size(162, 26)
|
||||||
|
'
|
||||||
|
'frmGesamtsicherheiten
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
@@ -804,7 +849,8 @@ Partial Class frmGesSich
|
|||||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||||
Me.MaximumSize = New System.Drawing.Size(1400, 815)
|
Me.MaximumSize = New System.Drawing.Size(1400, 815)
|
||||||
Me.MinimumSize = New System.Drawing.Size(1400, 815)
|
Me.MinimumSize = New System.Drawing.Size(1400, 815)
|
||||||
Me.Name = "frmGesSich"
|
Me.Name = "frmGesamtsicherheiten"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
Me.Text = "frmGesSich"
|
Me.Text = "frmGesSich"
|
||||||
CType(Me.dgvGesamtsicherheitMRN, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.dgvGesamtsicherheitMRN, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.Panel2.ResumeLayout(False)
|
Me.Panel2.ResumeLayout(False)
|
||||||
@@ -813,6 +859,7 @@ Partial Class frmGesSich
|
|||||||
CType(Me.dgvGesamtsicherheitCRN, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.dgvGesamtsicherheitCRN, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.panOben.ResumeLayout(False)
|
Me.panOben.ResumeLayout(False)
|
||||||
Me.panOben.PerformLayout()
|
Me.panOben.PerformLayout()
|
||||||
|
Me.ContextMenuStrip1.ResumeLayout(False)
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -827,7 +874,7 @@ Partial Class frmGesSich
|
|||||||
Friend WithEvents txtCRNDate As TextBox
|
Friend WithEvents txtCRNDate As TextBox
|
||||||
Friend WithEvents txtMRNTime As TextBox
|
Friend WithEvents txtMRNTime As TextBox
|
||||||
Friend WithEvents txtMRNDate As TextBox
|
Friend WithEvents txtMRNDate As TextBox
|
||||||
Friend WithEvents btnSave As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents btnSaveOben As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
Friend WithEvents txtCRNSicherheitsbetrag As TextBox
|
Friend WithEvents txtCRNSicherheitsbetrag As TextBox
|
||||||
Friend WithEvents txtCRNWarenwert As TextBox
|
Friend WithEvents txtCRNWarenwert As TextBox
|
||||||
Friend WithEvents txtCRN As TextBox
|
Friend WithEvents txtCRN As TextBox
|
||||||
@@ -860,7 +907,7 @@ Partial Class frmGesSich
|
|||||||
Friend WithEvents Label15 As Label
|
Friend WithEvents Label15 As Label
|
||||||
Friend WithEvents txtPos As TextBox
|
Friend WithEvents txtPos As TextBox
|
||||||
Friend WithEvents panOverlay As Panel
|
Friend WithEvents panOverlay As Panel
|
||||||
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents btnSave As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
Friend WithEvents txtLKWID As TextBox
|
Friend WithEvents txtLKWID As TextBox
|
||||||
Friend WithEvents txtAbfertNum As TextBox
|
Friend WithEvents txtAbfertNum As TextBox
|
||||||
Friend WithEvents Label18 As Label
|
Friend WithEvents Label18 As Label
|
||||||
@@ -872,4 +919,8 @@ Partial Class frmGesSich
|
|||||||
Friend WithEvents btnUpdateOpen As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents btnUpdateOpen As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
Friend WithEvents btnDeleteClose As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents btnDeleteClose As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
Friend WithEvents btnDeleteOpen As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents btnDeleteOpen As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
|
Friend WithEvents cboWarenort As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||||
|
Friend WithEvents lblWarenort As Label
|
||||||
|
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||||
|
Friend WithEvents ClosedErzeugenToolStripMenuItem As ToolStripMenuItem
|
||||||
End Class
|
End Class
|
||||||
752
Aviso/frmGesamtsicherheiten.vb
Normal file
752
Aviso/frmGesamtsicherheiten.vb
Normal file
@@ -0,0 +1,752 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
|
Public Class frmGesamtsicherheiten
|
||||||
|
|
||||||
|
Public Property gessicherheitID As Integer
|
||||||
|
Public Property datum As DateTime = Nothing
|
||||||
|
Property GesSichRef As cGesamtSicherheitsReferenz
|
||||||
|
Property Standort As String = ""
|
||||||
|
|
||||||
|
Public ZollsatzMulti As Double = 0
|
||||||
|
|
||||||
|
Public Saldo As Integer = 0
|
||||||
|
|
||||||
|
Public Neu As Boolean = False
|
||||||
|
|
||||||
|
Public FilialNummer As Integer
|
||||||
|
|
||||||
|
Public Abfertigungsnummer As String
|
||||||
|
|
||||||
|
Public LKWID As String
|
||||||
|
|
||||||
|
Public warenortID As String
|
||||||
|
|
||||||
|
Dim openopened As cSicherheiten
|
||||||
|
|
||||||
|
Dim closedopened As cSicherheiten
|
||||||
|
|
||||||
|
Dim sicherheiten As cSicherheiten
|
||||||
|
|
||||||
|
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
|
Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
|
||||||
|
|
||||||
|
Dim dgv As String = ""
|
||||||
|
For Each c As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
||||||
|
dgv &= c.Width & c.HeaderText & vbCrLf
|
||||||
|
Next
|
||||||
|
' MsgBox(dgv)
|
||||||
|
LoadDGV()
|
||||||
|
GesSichRef.LOAD()
|
||||||
|
LoadStandort()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmGesamtsicherheit_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
If setNullToZero(gessicherheitID) = "" Or Neu = True Then
|
||||||
|
panOben.Enabled = False : panOben.Enabled = False
|
||||||
|
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)
|
||||||
|
If datum = Nothing Then datum = Date.Now
|
||||||
|
Else
|
||||||
|
LoadDGV()
|
||||||
|
End If
|
||||||
|
LoadStandort()
|
||||||
|
cboATR.Enabled = GesSichRef.gsr_ATR
|
||||||
|
|
||||||
|
Me.Text = "Gesamtsicherheit " & Standort
|
||||||
|
frmHauptfenster.EnableDoubleBuffered(dgvGesamtsicherheitCRN)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub LoadDGV()
|
||||||
|
'lblSaldo.Text = "Saldo: € " & GesSichRef.gsr_Saldo.ToString("N")
|
||||||
|
lblSaldo.Text = "Saldo: € " & GesSichRef.gsr_Saldo.ToString()
|
||||||
|
lblGestellungNr.Text = ""
|
||||||
|
Dim sqladd1 As String = ""
|
||||||
|
If GesSichRef.gsr_ustEnabled Then sqladd1 &= ", FORMAT((([gs_warenwert] + [gs_sicherheitsbetrag]) * " & GesSichRef.gsr_ust & "/100), 'C', 'de-DE') as gs_ust"
|
||||||
|
If GesSichRef.gsr_ATR Then sqladd1 &= ", [gs_atr]"
|
||||||
|
|
||||||
|
|
||||||
|
Dim addtosqlstring As String = ""
|
||||||
|
Dim SQLStringMRN As String = "select [gs_gsId], [gs_ATBNr], [gs_posNr], [gs_datum], [gs_warenwert], [gs_sicherheitsbetrag], [gs_saldo] " & sqladd1 & " , [gs_freitext] from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "' and [gs_art] = 'Open' order by [gs_datum]"
|
||||||
|
dgvGesamtsicherheitMRN.SET_SQL(SQLStringMRN, "AVISO", ,)
|
||||||
|
dgvGesamtsicherheitMRN.LOAD()
|
||||||
|
|
||||||
|
Dim SQLStringCRN As String = "select [gs_gsId], [gs_ATBNr], [gs_datum], [gs_warenwert], [gs_sicherheitsbetrag], [gs_saldo], [gs_freitext] from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "' and [gs_art] = 'Close' order by [gs_datum]"
|
||||||
|
dgvGesamtsicherheitCRN.SET_SQL(SQLStringCRN, "AVISO", ,)
|
||||||
|
dgvGesamtsicherheitCRN.LOAD()
|
||||||
|
|
||||||
|
Dim StandortSqlString As String = "select * from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "'"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
|
|
||||||
|
If dt.Rows.Count > 0 Then
|
||||||
|
'Me.GesamtsichNr = dt.Rows(0).Item("GesamtsichNr")
|
||||||
|
Me.FilialNummer = setNullToZero(dt.Rows(0).Item("gs_filialenNr"))
|
||||||
|
Me.Abfertigungsnummer = setNullToZero(dt.Rows(0).Item("gs_abfertigungsNr"))
|
||||||
|
Me.warenortID = setNullToZero(dt.Rows(0).Item("gs_warenort"))
|
||||||
|
|
||||||
|
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.warenortID.Length > 0 Then lblGestellungNr.Text &= "Warenort: " & Me.warenortID & " "
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If dgvGesamtsicherheitMRN.Columns.Count > 0 Then
|
||||||
|
With dgvGesamtsicherheitMRN
|
||||||
|
.RowHeadersWidth = 10
|
||||||
|
.Columns("gs_gsId").Visible = False
|
||||||
|
.Columns("gs_warenwert").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").Visible = False
|
||||||
|
Select Case GesSichRef.gsr_ATR
|
||||||
|
Case True
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "ATB"
|
||||||
|
.Columns("gs_atr").HeaderText = "ATR"
|
||||||
|
.Columns("gs_atr").Width = 33
|
||||||
|
.Columns("gs_ust").Width = 69
|
||||||
|
Case Else
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "CRN"
|
||||||
|
End Select
|
||||||
|
.Columns("gs_ATBNr").Width = 146
|
||||||
|
|
||||||
|
.Columns("gs_posNr").Width = 20
|
||||||
|
.Columns("gs_datum").Width = 95
|
||||||
|
.Columns("gs_warenwert").Width = 100
|
||||||
|
.Columns("gs_saldo").Width = 100
|
||||||
|
|
||||||
|
.Columns("gs_sicherheitsbetrag").Width = 100
|
||||||
|
.Columns("gs_freitext").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||||
|
End With
|
||||||
|
' For Each col As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
||||||
|
'col.Width = 120
|
||||||
|
'Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dgvGesamtsicherheitCRN.Columns.Count > 0 Then
|
||||||
|
With dgvGesamtsicherheitCRN
|
||||||
|
.RowHeadersWidth = 10
|
||||||
|
.Columns("gs_gsId").Visible = False
|
||||||
|
.Columns("gs_warenwert").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").Visible = False
|
||||||
|
Select Case GesSichRef.gsr_ATR
|
||||||
|
Case True
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "ATC / MRN"
|
||||||
|
Case Else
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "CRN"
|
||||||
|
End Select
|
||||||
|
.Columns("gs_ATBNr").Width = 120
|
||||||
|
.Columns("gs_datum").Width = 140
|
||||||
|
.Columns("gs_warenwert").Width = 100
|
||||||
|
.Columns("gs_sicherheitsbetrag").Width = 100
|
||||||
|
.Columns("gs_freitext").Width = 220
|
||||||
|
End With
|
||||||
|
'For Each col As DataGridViewColumn In dgvGesamtsicherheitCRN.Columns
|
||||||
|
' col.Width = 120
|
||||||
|
'Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub LoadStandort()
|
||||||
|
'Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where Standort = " & "'" & Standort & "'"
|
||||||
|
'Dim dt As New DataTable
|
||||||
|
'dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
|
'Zollsatz = dt.Rows(0).Item("Zollsatz")
|
||||||
|
'Referenzwert = dt.Rows(0).Item("Referenzwert")
|
||||||
|
|
||||||
|
'lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString("N")
|
||||||
|
lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString()
|
||||||
|
lblZollsatz.Text = "Zollsatz: " & GesSichRef.gsr_zollsatz & "%"
|
||||||
|
ZollsatzMulti = GesSichRef.gsr_zollsatz / 100
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Private Sub CalcSaldo()
|
||||||
|
' Dim SaldoString As String = "select SUM([MRN_Sicherheitsbetrag]) as sumone, SUM([CRN_Sicherheitsbetrag]) As sumtwo from [tblGesamtsicherheit]"
|
||||||
|
' Dim dt As New DataTable
|
||||||
|
' dt = SQL.loadDgvBySql(SaldoString, "AVISO", 100, True)
|
||||||
|
' Dim mrn As Integer = dt.Rows(0).Item(0)
|
||||||
|
' Dim crn As Integer = dt.Rows(0).Item(1)
|
||||||
|
|
||||||
|
' Saldo = Referenzwert - mrn + crn
|
||||||
|
|
||||||
|
' lblSaldo.Text = "Saldo: €" & Saldo.ToString("N")
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Warenwert_TextChanged(sender As Object, e As EventArgs) Handles txtMRNWarenwert.TextChanged, txtCRNWarenwert.TextChanged
|
||||||
|
Try
|
||||||
|
Select Case sender.name
|
||||||
|
Case "txtMRNWarenwert"
|
||||||
|
txtMRNSicherheitsbetrag.Text = (txtMRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
||||||
|
If GesSichRef.gsr_ustEnabled Then txtEust.Text = (Double.Parse(txtMRNWarenwert.Text) + Double.Parse(txtMRNSicherheitsbetrag.Text)) * (GesSichRef.gsr_ust / 100)
|
||||||
|
Case "txtCRNWarenwert"
|
||||||
|
txtCRNSicherheitsbetrag.Text = (txtCRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
||||||
|
End Select
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Warenwert_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtMRNWarenwert.KeyPress, txtCRNWarenwert.KeyPress, txtPos.KeyPress
|
||||||
|
Select Case Asc(e.KeyChar)
|
||||||
|
Case 48 To 57, 8, 44
|
||||||
|
' Zahlen, Backspace und , zulassen
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
' alle anderen Eingaben unterdrücken
|
||||||
|
e.Handled = True
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DateTime_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtCRNDate.KeyPress, txtCRNTime.KeyPress, txtMRNDate.KeyPress, txtMRNTime.KeyPress
|
||||||
|
Select Case Asc(e.KeyChar)
|
||||||
|
Case 48 To 57, 8, 46, 58
|
||||||
|
' Zahlen, Backspace, . und : zulassen
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
' alle anderen Eingaben unterdrücken
|
||||||
|
e.Handled = True
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub btnSaveOben_Click(sender As Object, e As EventArgs) Handles btnSaveOben.Click
|
||||||
|
Try
|
||||||
|
Dim a As Date = Date.ParseExact(txtMRNDate.Text, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
Dim b As Date = Date.ParseExact(txtMRNTime.Text, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
|
||||||
|
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
||||||
|
MsgBox(ab.ToString)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtMRNDate.GotFocus, txtCRNDate.GotFocus, txtMRNTime.GotFocus, txtCRNTime.GotFocus
|
||||||
|
Select Case sender.name
|
||||||
|
Case "txtMRNDate"
|
||||||
|
If txtMRNDate.Text.Length < 1 Then txtMRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
|
Case "txtCRNDate"
|
||||||
|
If txtCRNDate.Text.Length < 1 Then txtCRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
|
Case "txtMRNTime"
|
||||||
|
If txtMRNTime.Text.Length < 1 Then txtMRNTime.Text = Date.Now.ToString("HH:mm")
|
||||||
|
Case "txtCRNTime"
|
||||||
|
If txtCRNTime.Text.Length < 1 Then txtCRNTime.Text = Date.Now.ToString("HH:mm")
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAddMRN_Click(sender As Object, e As EventArgs) Handles btnAddOpen.Click
|
||||||
|
Try
|
||||||
|
|
||||||
|
If Integer.Parse(setNullToZero(txtPos.Text)) > 1 Then
|
||||||
|
|
||||||
|
Dim limit As Integer = Integer.Parse(setNullToZero(txtPos.Text))
|
||||||
|
|
||||||
|
For count As Integer = 1 To limit
|
||||||
|
If (count > 1) Then txtMRNWarenwert.Text = 0
|
||||||
|
Dim OPENWithMultiplePosNr As New cSicherheiten()
|
||||||
|
|
||||||
|
With OPENWithMultiplePosNr
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = count
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
setEnviromentDataToObject(OPENWithMultiplePosNr, Me)
|
||||||
|
End With
|
||||||
|
|
||||||
|
If Neu = True AndAlso count <= 1 Then OPENWithMultiplePosNr.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(OPENWithMultiplePosNr.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
OPENWithMultiplePosNr.SAVE()
|
||||||
|
Case Else
|
||||||
|
If (count > 1) Then
|
||||||
|
OPENWithMultiplePosNr.SAVE()
|
||||||
|
Else
|
||||||
|
MsgBox("INFO: Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(OPENWithMultiplePosNr.gs_ATBNr, gessicherheitID) & "eingetragen") : OPENWithMultiplePosNr.SAVE()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
'Dim OPEN As New cSicherheiten(Me)
|
||||||
|
Dim OPEN As New cSicherheiten()
|
||||||
|
|
||||||
|
With OPEN
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = Integer.Parse(setNullToZero(txtPos.Text))
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
setEnviromentDataToObject(OPEN, Me)
|
||||||
|
End With
|
||||||
|
|
||||||
|
|
||||||
|
If Neu = True Then OPEN.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(OPEN.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
OPEN.SAVE()
|
||||||
|
Case Else
|
||||||
|
MsgBox("INFO: Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(OPEN.gs_ATBNr, gessicherheitID) & "eingetragen") : OPEN.SAVE()
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAddCRN_Click(sender As Object, e As EventArgs) Handles btnAddClose.Click
|
||||||
|
Try
|
||||||
|
'Dim Close As New cSicherheiten(Me)
|
||||||
|
Dim Close As New cSicherheiten()
|
||||||
|
With Close
|
||||||
|
.gs_ATBNr = txtCRN.Text
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
||||||
|
.gs_warenwert = Integer.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "CLOSE"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextClose.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
End With
|
||||||
|
|
||||||
|
If Neu = True Then Close.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(Close.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
Close.SAVE()
|
||||||
|
Case Else
|
||||||
|
MsgBox("Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(Close.gs_ATBNr, gessicherheitID) & "eingetragen") : Exit Sub
|
||||||
|
End Select
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function setNullToZero(s As String, Optional type As String = "")
|
||||||
|
|
||||||
|
If s = "" Then
|
||||||
|
Dim zero As Double = 0
|
||||||
|
|
||||||
|
Return zero
|
||||||
|
Else
|
||||||
|
Return s
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Sub AfterButton()
|
||||||
|
GesSichRef.CalcSaldo()
|
||||||
|
LoadDGV()
|
||||||
|
EmptyTXT()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AddNewGesamtSichNr() As Integer
|
||||||
|
Dim sqlq As String = "select MAX([gs_gsNr]) as MaxGesSich from tblGesamtsicherheit"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(sqlq, "AVISO", 100, True)
|
||||||
|
Dim LetzteGesSichNum As Integer = -1
|
||||||
|
If (dt.Rows(0).Item(0) IsNot DBNull.Value) Then
|
||||||
|
|
||||||
|
LetzteGesSichNum = dt.Rows(0).Item(0)
|
||||||
|
Me.gessicherheitID = LetzteGesSichNum + 1
|
||||||
|
Me.Neu = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Me.gessicherheitID
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub EmptyTXT()
|
||||||
|
Dim a As New List(Of Control)
|
||||||
|
For Each contr As Control In panOben.Controls
|
||||||
|
If contr.GetType.FullName = "System.Windows.Forms.TextBox" Then contr.Text = ""
|
||||||
|
Next
|
||||||
|
cboATR.SelectedItem = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function checkIfExist(KennnummerStr As String, Optional ByVal lkw As String = "") As String
|
||||||
|
If lkw = "" And Me.gessicherheitID > 0 Then lkw = gessicherheitID
|
||||||
|
|
||||||
|
Dim SQLString As String = "Select * from [tblGesamtsicherheit] where [gs_ATBNr] = '" & KennnummerStr & "'"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
||||||
|
If dt.Rows.Count > 0 Then
|
||||||
|
Return dt.Rows(0).Item("gs_gsNr").ToString
|
||||||
|
Else
|
||||||
|
Return "Neu"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function DateTimeString2DateTimeKonvertinator(datum As String, uhrzeit As String) As DateTime
|
||||||
|
Try
|
||||||
|
Dim a As Date = Date.ParseExact(datum, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
Dim b As Date = Date.ParseExact(uhrzeit, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
|
||||||
|
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
||||||
|
Return ab
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
Return Date.Now
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click, btnSaveOben.Click
|
||||||
|
|
||||||
|
If checkMandatoryFieldsAreFilled() = False Then Exit Sub
|
||||||
|
|
||||||
|
Try
|
||||||
|
Me.FilialNummer = checkNothingValue(cboFiliale.SelectedItem, "Integer")
|
||||||
|
Catch
|
||||||
|
Me.FilialNummer = "0"
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
Me.warenortID = checkNothingValue(cboWarenort.SelectedItem, "String")
|
||||||
|
|
||||||
|
Catch
|
||||||
|
Me.warenortID = "-"
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Me.Abfertigungsnummer = txtAbfertNum.Text
|
||||||
|
Me.LKWID = txtLKWID.Text
|
||||||
|
|
||||||
|
If setNullToZero(Me.gessicherheitID) >= 0 Then
|
||||||
|
Dim sqlstring = "Update [tblGesamtsicherheit] set [gs_filialenNr] = '" & Me.FilialNummer & "', [gs_abfertigungsNr] = '" & Me.Abfertigungsnummer & "', [gs_LKWID] = '" & Me.LKWID & "', [gs_warenort] = '" & Me.warenortID & "' WHERE [gs_gsNr] = '" & Me.gessicherheitID & "' "
|
||||||
|
SQL.doSQL(sqlstring, "AVISO")
|
||||||
|
LoadDGV()
|
||||||
|
End If
|
||||||
|
|
||||||
|
panOben.Enabled = True : panOben.Enabled = True
|
||||||
|
panOverlay.Visible = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function checkNothingValue(obj As Object, Optional type As String = "String") As Object
|
||||||
|
Select Case type
|
||||||
|
Case "String"
|
||||||
|
If obj Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return obj.value.ToString
|
||||||
|
End If
|
||||||
|
Case "Integer"
|
||||||
|
If obj Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
Return Integer.Parse(obj.value)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub dgvGesamtsicherheitMRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitMRN.CellDoubleClick
|
||||||
|
|
||||||
|
Dim Sicherh As New cSicherheiten(dgvGesamtsicherheitMRN.CurrentRow.Cells("gs_gsId").Value)
|
||||||
|
'Sicherh.Load(dgvGesamtsicherheitMRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
|
||||||
|
txtMRN.Text = Sicherh.gs_ATBNr
|
||||||
|
txtPos.Text = Sicherh.gs_posNr
|
||||||
|
txtMRNWarenwert.Text = Sicherh.gs_warenwert
|
||||||
|
txtFreitextOpen.Text = Sicherh.gs_freitext
|
||||||
|
cboATR.SelectedItem = Sicherh.gs_atr
|
||||||
|
txtMRNDate.Text = Sicherh.gs_erstellungsdatum.ToString("dd.MM.yyyy")
|
||||||
|
txtMRNTime.Text = Sicherh.gs_erstellungsdatum.ToString("HH:mm")
|
||||||
|
|
||||||
|
openopened = Sicherh
|
||||||
|
|
||||||
|
btnAddOpen.Visible = False
|
||||||
|
btnUpdateOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnUpdateOpen_Click(sender As Object, e As EventArgs) Handles btnUpdateOpen.Click
|
||||||
|
With openopened
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = Double.Parse(setNullToZero(txtPos.Text))
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
'.MakeDate = Me.MakeDate
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
'.saldo = GesSichRef.Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
End With
|
||||||
|
openopened.SAVE()
|
||||||
|
btnUpdateOpen.Visible = False
|
||||||
|
btnAddOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteClose_Click(sender As Object, e As EventArgs) Handles btnUpdateClose.Click
|
||||||
|
With closedopened
|
||||||
|
.gs_ATBNr = txtCRN.Text
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "CLOSE"
|
||||||
|
.gs_freitext = Me.txtFreitextClose.Text
|
||||||
|
End With
|
||||||
|
closedopened.SAVE()
|
||||||
|
btnAddClose.Visible = True
|
||||||
|
btnUpdateClose.Visible = False
|
||||||
|
btnDeleteClose.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub dgvGesamtsicherheitCRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitCRN.CellDoubleClick
|
||||||
|
|
||||||
|
Dim Sicherh As New cSicherheiten(dgvGesamtsicherheitCRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
'Sicherh.Load(dgvGesamtsicherheitCRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
|
||||||
|
txtCRN.Text = Sicherh.gs_ATBNr
|
||||||
|
txtCRNWarenwert.Text = Sicherh.gs_warenwert
|
||||||
|
txtFreitextClose.Text = Sicherh.gs_freitext
|
||||||
|
txtCRNDate.Text = Sicherh.gs_erstellungsdatum.ToString("dd.MM.yyyy")
|
||||||
|
txtCRNTime.Text = Sicherh.gs_erstellungsdatum.ToString("HH:mm")
|
||||||
|
|
||||||
|
closedopened = Sicherh
|
||||||
|
|
||||||
|
btnDeleteClose.Visible = True
|
||||||
|
btnAddClose.Visible = False
|
||||||
|
btnUpdateClose.Visible = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteOpen_Click(sender As Object, e As EventArgs) Handles btnDeleteOpen.Click
|
||||||
|
Try
|
||||||
|
openopened.Delete()
|
||||||
|
btnUpdateOpen.Visible = False
|
||||||
|
btnAddOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteClose_Click_1(sender As Object, e As EventArgs) Handles btnDeleteClose.Click
|
||||||
|
Try
|
||||||
|
closedopened.Delete()
|
||||||
|
btnUpdateClose.Visible = False
|
||||||
|
btnAddClose.Visible = True
|
||||||
|
btnDeleteClose.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lblGestellungNr_Click(sender As Object, e As EventArgs) Handles lblGestellungNr.DoubleClick
|
||||||
|
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)
|
||||||
|
cboFiliale.SelectedIndex = cboFiliale.FindString(Me.FilialNummer)
|
||||||
|
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.SelectedIndex = cboWarenort.FindString(Me.warenortID)
|
||||||
|
txtAbfertNum.Text = Me.Abfertigungsnummer
|
||||||
|
txtLKWID.Text = Me.LKWID
|
||||||
|
panOben.Enabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnClosePanOverlay_Click(sender As Object, e As EventArgs) Handles btnClosePanOverlay.Click
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function checkMandatoryFieldsAreFilled() As Boolean
|
||||||
|
Dim isFilled = True
|
||||||
|
|
||||||
|
If cboWarenort._value = Nothing Or cboWarenort._value = "" Then
|
||||||
|
|
||||||
|
MsgBox("Bitte Warenort angeben!")
|
||||||
|
isFilled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return isFilled
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub setEnviromentDataToObject(sicherheiten As cSicherheiten, Optional ByVal gessich As frmGesamtsicherheiten = Nothing)
|
||||||
|
|
||||||
|
sicherheiten.gs_filialenNr = gessich.FilialNummer
|
||||||
|
sicherheiten.gs_abfertigungsnr = gessich.Abfertigungsnummer
|
||||||
|
sicherheiten.gs_LKWID = gessich.LKWID
|
||||||
|
sicherheiten.gs_warenort = gessich.warenortID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ClosedErzeugenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClosedErzeugenToolStripMenuItem.Click
|
||||||
|
MsgBox("")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
|
'Public Class cSicherheit
|
||||||
|
' Property GesamtSichID As Object
|
||||||
|
' Property Kennnummer As String
|
||||||
|
' Property PosNr As Integer
|
||||||
|
' Property DateTime As DateTime
|
||||||
|
' Property MakeDate As DateTime
|
||||||
|
' Property Warenwert As Double
|
||||||
|
' Property Sicherheitsbetrag As Double
|
||||||
|
' Property saldo As Double
|
||||||
|
' Property standort As String
|
||||||
|
' Property Art As String
|
||||||
|
' Property GesamtsichNr As Integer
|
||||||
|
' Property Ust As Integer
|
||||||
|
' Property Freitext As String
|
||||||
|
' Property FilialNummer As Integer
|
||||||
|
' Property Abfertigungsnummer As String
|
||||||
|
' Property LKWID As String
|
||||||
|
' Property ATRJN As String = ""
|
||||||
|
' Property gs_warenort As String
|
||||||
|
|
||||||
|
' Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
|
' Public Sub New(Optional ByVal gessich As frmGesamtsicherheiten = Nothing)
|
||||||
|
' If gessich IsNot Nothing Then
|
||||||
|
' Me.FilialNummer = gessich.FilialNummer
|
||||||
|
' Me.Abfertigungsnummer = gessich.Abfertigungsnummer
|
||||||
|
' Me.LKWID = gessich.LKWID
|
||||||
|
' Me.gs_warenort = gessich.warenortID
|
||||||
|
' Me.GesamtSichID = GenerateID()
|
||||||
|
' End If
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' Public Function Load(GsID As String)
|
||||||
|
' Me.GesamtSichID = GsID
|
||||||
|
' Load()
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Public Function Load()
|
||||||
|
' Dim dt As New DataTable
|
||||||
|
' Dim sqlstring As String = "SELECT * FROM [AVISO].[dbo].[tblGesamtsicherheit] where GesamtsichID = '" & Me.GesamtSichID & "'"
|
||||||
|
' dt = SQL.loadDgvBySql(sqlstring, "AVISO", 100, True)
|
||||||
|
' Dim test As cSicherheit = SQLEintraege.LoadEntities(Me, dt)
|
||||||
|
' ' MsgBox("")
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Public Function GenerateID() As String
|
||||||
|
' Return Date.Now.ToString.Replace(".", "").Replace("-", "").Replace(",", "").Replace(" ", "").Replace(":", "")
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Public Function Save()
|
||||||
|
' 'MakeDate = frmGesSich.MakeDate
|
||||||
|
' Dim entities As New List(Of SQLEintraege)
|
||||||
|
' For Each prop As PropertyInfo In Me.GetType().GetProperties()
|
||||||
|
' If prop.GetValue(Me, Nothing).GetType = GetType(Double) Then
|
||||||
|
' ' MsgBox(prop.Name)
|
||||||
|
' entities.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing).ToString.Replace(",", ".")))
|
||||||
|
' Else
|
||||||
|
' entities.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing)))
|
||||||
|
' End If
|
||||||
|
' ' entities.Add(New SQLEintraege(prop.Name, prop.GetValue(Me, Nothing)))
|
||||||
|
' Next
|
||||||
|
|
||||||
|
' '''
|
||||||
|
' Dim dt As DataTable = SQL.loadDgvBySql("Select * from [tblGesamtsicherheit] where GesamtSichID = '" & Me.GesamtSichID & "'", "AVISO")
|
||||||
|
' If dt.Rows.Count > 0 Then
|
||||||
|
' Dim UpdateString As String = ""
|
||||||
|
' For Each i In entities
|
||||||
|
' If Not i.Spalte = "GesamtSichID" Then
|
||||||
|
' UpdateString &= "[" & i.Spalte & "]='" & i.Wert & "',"
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' UpdateString = UpdateString.Substring(0, UpdateString.Length - 1)
|
||||||
|
|
||||||
|
' Dim sqlquery As String
|
||||||
|
' sqlquery = "update [tblGesamtsicherheit] set " & UpdateString & " where GesamtSichID = '" & Me.GesamtSichID & "'"
|
||||||
|
' SQL.doSQL(sqlquery, "AVISO")
|
||||||
|
' Else
|
||||||
|
|
||||||
|
' Dim text, value, insert As String
|
||||||
|
' For Each i In entities
|
||||||
|
' text &= i.Spalte & ", "
|
||||||
|
' value &= "'" & i.Wert & "', "
|
||||||
|
' Next
|
||||||
|
' text = text.Substring(0, text.Length - 2)
|
||||||
|
' value = value.Substring(0, value.Length - 2)
|
||||||
|
|
||||||
|
' insert = "(" & text & ") VALUES (" & value & ")"
|
||||||
|
|
||||||
|
' Dim sqlquery As String
|
||||||
|
' sqlquery = "insert into [tblGesamtsicherheit] (" & text & ") VALUES (" & value & ")"
|
||||||
|
' SQL.doSQL(sqlquery, "AVISO")
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
' Public Function Delete()
|
||||||
|
' SQL.doSQL("delete from [tblGesamtsicherheit] where GesamtSichID = '" & Me.GesamtSichID & "'", "AVISO")
|
||||||
|
' End Function
|
||||||
|
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
Public Class SQLEintraege
|
||||||
|
Property Spalte As String
|
||||||
|
Property Wert As String
|
||||||
|
Public Sub New(_Spalte As String, _Wert As String)
|
||||||
|
Spalte = _Spalte
|
||||||
|
Wert = _Wert
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function LoadEntities(Obj As Object, dt As DataTable) As Object
|
||||||
|
Try
|
||||||
|
For Each prop As PropertyInfo In Obj.GetType().GetProperties()
|
||||||
|
If dt.Rows(0).Item(prop.Name) IsNot Nothing And dt.Rows(0).Item(prop.Name) IsNot DBNull.Value Then
|
||||||
|
If dt.Rows(0).Item(prop.Name).GetType Is GetType(Decimal) Then
|
||||||
|
prop.SetValue(Obj, Double.Parse(dt.Rows(0).Item(prop.Name)))
|
||||||
|
Else
|
||||||
|
prop.SetValue(Obj, dt.Rows(0).Item(prop.Name))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Obj
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
Partial Class frmGesSichMenu
|
Partial Class frmGesamtsicherheitenMenu
|
||||||
Inherits System.Windows.Forms.Form
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
@@ -23,7 +23,7 @@ Partial Class frmGesSichMenu
|
|||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
Me.components = New System.ComponentModel.Container()
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmGesSichMenu))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmGesamtsicherheitenMenu))
|
||||||
Me.dgvListe = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.dgvListe = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
Me.FlatButton2 = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
Me.FlatButton2 = New VERAG_PROG_ALLGEMEIN.FlatButton()
|
||||||
@@ -42,6 +42,10 @@ Partial Class frmGesSichMenu
|
|||||||
Me.lblReferenzwert = New System.Windows.Forms.Label()
|
Me.lblReferenzwert = New System.Windows.Forms.Label()
|
||||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
Me.ExportCSVToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ExportCSVToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.lblFiliale = New System.Windows.Forms.Label()
|
||||||
|
Me.cbxStandort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
|
Me.cbxWarenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
CType(Me.dgvListe, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.dgvListe, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.Panel1.SuspendLayout()
|
Me.Panel1.SuspendLayout()
|
||||||
Me.ContextMenuStrip1.SuspendLayout()
|
Me.ContextMenuStrip1.SuspendLayout()
|
||||||
@@ -54,15 +58,19 @@ Partial Class frmGesSichMenu
|
|||||||
Me.dgvListe.AllowUserToDeleteRows = False
|
Me.dgvListe.AllowUserToDeleteRows = False
|
||||||
Me.dgvListe.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
Me.dgvListe.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||||
Me.dgvListe.Dock = System.Windows.Forms.DockStyle.Fill
|
Me.dgvListe.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
Me.dgvListe.Location = New System.Drawing.Point(0, 156)
|
Me.dgvListe.Location = New System.Drawing.Point(0, 196)
|
||||||
Me.dgvListe.Name = "dgvListe"
|
Me.dgvListe.Name = "dgvListe"
|
||||||
Me.dgvListe.ReadOnly = True
|
Me.dgvListe.ReadOnly = True
|
||||||
Me.dgvListe.Size = New System.Drawing.Size(502, 565)
|
Me.dgvListe.Size = New System.Drawing.Size(502, 525)
|
||||||
Me.dgvListe.TabIndex = 1
|
Me.dgvListe.TabIndex = 1
|
||||||
'
|
'
|
||||||
'Panel1
|
'Panel1
|
||||||
'
|
'
|
||||||
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
Me.Panel1.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||||
|
Me.Panel1.Controls.Add(Me.cbxWarenort)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label4)
|
||||||
|
Me.Panel1.Controls.Add(Me.cbxStandort)
|
||||||
|
Me.Panel1.Controls.Add(Me.lblFiliale)
|
||||||
Me.Panel1.Controls.Add(Me.FlatButton2)
|
Me.Panel1.Controls.Add(Me.FlatButton2)
|
||||||
Me.Panel1.Controls.Add(Me.btnSucheStarten)
|
Me.Panel1.Controls.Add(Me.btnSucheStarten)
|
||||||
Me.Panel1.Controls.Add(Me.txtbis)
|
Me.Panel1.Controls.Add(Me.txtbis)
|
||||||
@@ -80,17 +88,18 @@ Partial Class frmGesSichMenu
|
|||||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||||
Me.Panel1.Location = New System.Drawing.Point(0, 0)
|
Me.Panel1.Location = New System.Drawing.Point(0, 0)
|
||||||
Me.Panel1.Name = "Panel1"
|
Me.Panel1.Name = "Panel1"
|
||||||
Me.Panel1.Size = New System.Drawing.Size(502, 156)
|
Me.Panel1.Size = New System.Drawing.Size(502, 196)
|
||||||
Me.Panel1.TabIndex = 0
|
Me.Panel1.TabIndex = 0
|
||||||
'
|
'
|
||||||
'FlatButton2
|
'FlatButton2
|
||||||
'
|
'
|
||||||
Me.FlatButton2.allowBorder = False
|
Me.FlatButton2.allowBorder = False
|
||||||
|
Me.FlatButton2.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.FlatButton2.BackColor = System.Drawing.Color.White
|
Me.FlatButton2.BackColor = System.Drawing.Color.White
|
||||||
Me.FlatButton2.FlatAppearance.BorderSize = 0
|
Me.FlatButton2.FlatAppearance.BorderSize = 0
|
||||||
Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.FlatButton2.ForeColor = System.Drawing.Color.Black
|
Me.FlatButton2.ForeColor = System.Drawing.Color.Black
|
||||||
Me.FlatButton2.Location = New System.Drawing.Point(112, 101)
|
Me.FlatButton2.Location = New System.Drawing.Point(112, 133)
|
||||||
Me.FlatButton2.Name = "FlatButton2"
|
Me.FlatButton2.Name = "FlatButton2"
|
||||||
Me.FlatButton2.Size = New System.Drawing.Size(81, 20)
|
Me.FlatButton2.Size = New System.Drawing.Size(81, 20)
|
||||||
Me.FlatButton2.TabIndex = 10
|
Me.FlatButton2.TabIndex = 10
|
||||||
@@ -100,11 +109,12 @@ Partial Class frmGesSichMenu
|
|||||||
'btnSucheStarten
|
'btnSucheStarten
|
||||||
'
|
'
|
||||||
Me.btnSucheStarten.allowBorder = False
|
Me.btnSucheStarten.allowBorder = False
|
||||||
|
Me.btnSucheStarten.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.btnSucheStarten.BackColor = System.Drawing.Color.White
|
Me.btnSucheStarten.BackColor = System.Drawing.Color.White
|
||||||
Me.btnSucheStarten.FlatAppearance.BorderSize = 0
|
Me.btnSucheStarten.FlatAppearance.BorderSize = 0
|
||||||
Me.btnSucheStarten.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnSucheStarten.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.btnSucheStarten.ForeColor = System.Drawing.Color.Black
|
Me.btnSucheStarten.ForeColor = System.Drawing.Color.Black
|
||||||
Me.btnSucheStarten.Location = New System.Drawing.Point(201, 127)
|
Me.btnSucheStarten.Location = New System.Drawing.Point(201, 159)
|
||||||
Me.btnSucheStarten.Name = "btnSucheStarten"
|
Me.btnSucheStarten.Name = "btnSucheStarten"
|
||||||
Me.btnSucheStarten.Size = New System.Drawing.Size(81, 20)
|
Me.btnSucheStarten.Size = New System.Drawing.Size(81, 20)
|
||||||
Me.btnSucheStarten.TabIndex = 11
|
Me.btnSucheStarten.TabIndex = 11
|
||||||
@@ -116,15 +126,18 @@ Partial Class frmGesSichMenu
|
|||||||
Me.txtbis._DateTimeOnly = False
|
Me.txtbis._DateTimeOnly = False
|
||||||
Me.txtbis._numbersOnly = False
|
Me.txtbis._numbersOnly = False
|
||||||
Me.txtbis._numbersOnlyKommastellen = ""
|
Me.txtbis._numbersOnlyKommastellen = ""
|
||||||
|
Me.txtbis._numbersOnlyTrennzeichen = True
|
||||||
Me.txtbis._Prozent = False
|
Me.txtbis._Prozent = False
|
||||||
Me.txtbis._ShortDateNew = False
|
Me.txtbis._ShortDateNew = False
|
||||||
Me.txtbis._ShortDateOnly = False
|
Me.txtbis._ShortDateOnly = False
|
||||||
Me.txtbis._TimeOnly = False
|
Me.txtbis._TimeOnly = False
|
||||||
|
Me.txtbis._TimeOnly_Seconds = False
|
||||||
Me.txtbis._value = ""
|
Me.txtbis._value = ""
|
||||||
Me.txtbis._Waehrung = False
|
Me.txtbis._Waehrung = False
|
||||||
Me.txtbis._WaehrungZeichen = True
|
Me.txtbis._WaehrungZeichen = True
|
||||||
|
Me.txtbis.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.txtbis.ForeColor = System.Drawing.Color.Black
|
Me.txtbis.ForeColor = System.Drawing.Color.Black
|
||||||
Me.txtbis.Location = New System.Drawing.Point(112, 77)
|
Me.txtbis.Location = New System.Drawing.Point(112, 109)
|
||||||
Me.txtbis.MaxLineLength = -1
|
Me.txtbis.MaxLineLength = -1
|
||||||
Me.txtbis.MaxLines_Warning = ""
|
Me.txtbis.MaxLines_Warning = ""
|
||||||
Me.txtbis.MaxLines_Warning_Label = Nothing
|
Me.txtbis.MaxLines_Warning_Label = Nothing
|
||||||
@@ -137,15 +150,18 @@ Partial Class frmGesSichMenu
|
|||||||
Me.txtVon._DateTimeOnly = False
|
Me.txtVon._DateTimeOnly = False
|
||||||
Me.txtVon._numbersOnly = False
|
Me.txtVon._numbersOnly = False
|
||||||
Me.txtVon._numbersOnlyKommastellen = ""
|
Me.txtVon._numbersOnlyKommastellen = ""
|
||||||
|
Me.txtVon._numbersOnlyTrennzeichen = True
|
||||||
Me.txtVon._Prozent = False
|
Me.txtVon._Prozent = False
|
||||||
Me.txtVon._ShortDateNew = False
|
Me.txtVon._ShortDateNew = False
|
||||||
Me.txtVon._ShortDateOnly = False
|
Me.txtVon._ShortDateOnly = False
|
||||||
Me.txtVon._TimeOnly = False
|
Me.txtVon._TimeOnly = False
|
||||||
|
Me.txtVon._TimeOnly_Seconds = False
|
||||||
Me.txtVon._value = ""
|
Me.txtVon._value = ""
|
||||||
Me.txtVon._Waehrung = False
|
Me.txtVon._Waehrung = False
|
||||||
Me.txtVon._WaehrungZeichen = True
|
Me.txtVon._WaehrungZeichen = True
|
||||||
|
Me.txtVon.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.txtVon.ForeColor = System.Drawing.Color.Black
|
Me.txtVon.ForeColor = System.Drawing.Color.Black
|
||||||
Me.txtVon.Location = New System.Drawing.Point(12, 77)
|
Me.txtVon.Location = New System.Drawing.Point(12, 109)
|
||||||
Me.txtVon.MaxLineLength = -1
|
Me.txtVon.MaxLineLength = -1
|
||||||
Me.txtVon.MaxLines_Warning = ""
|
Me.txtVon.MaxLines_Warning = ""
|
||||||
Me.txtVon.MaxLines_Warning_Label = Nothing
|
Me.txtVon.MaxLines_Warning_Label = Nothing
|
||||||
@@ -159,7 +175,7 @@ Partial Class frmGesSichMenu
|
|||||||
Me.Label3.AutoSize = True
|
Me.Label3.AutoSize = True
|
||||||
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||||
Me.Label3.ForeColor = System.Drawing.Color.Honeydew
|
Me.Label3.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.Label3.Location = New System.Drawing.Point(109, 59)
|
Me.Label3.Location = New System.Drawing.Point(109, 90)
|
||||||
Me.Label3.Name = "Label3"
|
Me.Label3.Name = "Label3"
|
||||||
Me.Label3.Size = New System.Drawing.Size(24, 15)
|
Me.Label3.Size = New System.Drawing.Size(24, 15)
|
||||||
Me.Label3.TabIndex = 5
|
Me.Label3.TabIndex = 5
|
||||||
@@ -171,7 +187,7 @@ Partial Class frmGesSichMenu
|
|||||||
Me.Label2.AutoSize = True
|
Me.Label2.AutoSize = True
|
||||||
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||||
Me.Label2.ForeColor = System.Drawing.Color.Honeydew
|
Me.Label2.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.Label2.Location = New System.Drawing.Point(12, 59)
|
Me.Label2.Location = New System.Drawing.Point(12, 90)
|
||||||
Me.Label2.Name = "Label2"
|
Me.Label2.Name = "Label2"
|
||||||
Me.Label2.Size = New System.Drawing.Size(28, 15)
|
Me.Label2.Size = New System.Drawing.Size(28, 15)
|
||||||
Me.Label2.TabIndex = 4
|
Me.Label2.TabIndex = 4
|
||||||
@@ -183,7 +199,7 @@ Partial Class frmGesSichMenu
|
|||||||
Me.Label1.AutoSize = True
|
Me.Label1.AutoSize = True
|
||||||
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||||
Me.Label1.ForeColor = System.Drawing.Color.Honeydew
|
Me.Label1.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.Label1.Location = New System.Drawing.Point(12, 11)
|
Me.Label1.Location = New System.Drawing.Point(12, 4)
|
||||||
Me.Label1.Name = "Label1"
|
Me.Label1.Name = "Label1"
|
||||||
Me.Label1.Size = New System.Drawing.Size(45, 15)
|
Me.Label1.Size = New System.Drawing.Size(45, 15)
|
||||||
Me.Label1.TabIndex = 0
|
Me.Label1.TabIndex = 0
|
||||||
@@ -192,12 +208,13 @@ Partial Class frmGesSichMenu
|
|||||||
'FlatButton1
|
'FlatButton1
|
||||||
'
|
'
|
||||||
Me.FlatButton1.allowBorder = False
|
Me.FlatButton1.allowBorder = False
|
||||||
|
Me.FlatButton1.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.FlatButton1.BackColor = System.Drawing.Color.White
|
Me.FlatButton1.BackColor = System.Drawing.Color.White
|
||||||
Me.FlatButton1.FlatAppearance.BorderSize = 0
|
Me.FlatButton1.FlatAppearance.BorderSize = 0
|
||||||
Me.FlatButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.FlatButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.FlatButton1.ForeColor = System.Drawing.Color.Black
|
Me.FlatButton1.ForeColor = System.Drawing.Color.Black
|
||||||
Me.FlatButton1.Image = Global.AVISO.My.Resources.Resources.refresh
|
Me.FlatButton1.Image = Global.AVISO.My.Resources.Resources.refresh
|
||||||
Me.FlatButton1.Location = New System.Drawing.Point(233, 22)
|
Me.FlatButton1.Location = New System.Drawing.Point(233, 18)
|
||||||
Me.FlatButton1.Name = "FlatButton1"
|
Me.FlatButton1.Name = "FlatButton1"
|
||||||
Me.FlatButton1.Size = New System.Drawing.Size(32, 33)
|
Me.FlatButton1.Size = New System.Drawing.Size(32, 33)
|
||||||
Me.FlatButton1.TabIndex = 2
|
Me.FlatButton1.TabIndex = 2
|
||||||
@@ -205,18 +222,20 @@ Partial Class frmGesSichMenu
|
|||||||
'
|
'
|
||||||
'txtSuchbegriff
|
'txtSuchbegriff
|
||||||
'
|
'
|
||||||
Me.txtSuchbegriff.Location = New System.Drawing.Point(12, 29)
|
Me.txtSuchbegriff.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
|
Me.txtSuchbegriff.Location = New System.Drawing.Point(12, 22)
|
||||||
Me.txtSuchbegriff.Name = "txtSuchbegriff"
|
Me.txtSuchbegriff.Name = "txtSuchbegriff"
|
||||||
Me.txtSuchbegriff.Size = New System.Drawing.Size(181, 20)
|
Me.txtSuchbegriff.Size = New System.Drawing.Size(181, 20)
|
||||||
Me.txtSuchbegriff.TabIndex = 1
|
Me.txtSuchbegriff.TabIndex = 1
|
||||||
'
|
'
|
||||||
'chkOffen
|
'chkOffen
|
||||||
'
|
'
|
||||||
|
Me.chkOffen.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.chkOffen.AutoSize = True
|
Me.chkOffen.AutoSize = True
|
||||||
Me.chkOffen.Checked = True
|
Me.chkOffen.Checked = True
|
||||||
Me.chkOffen.CheckState = System.Windows.Forms.CheckState.Checked
|
Me.chkOffen.CheckState = System.Windows.Forms.CheckState.Checked
|
||||||
Me.chkOffen.ForeColor = System.Drawing.SystemColors.ButtonHighlight
|
Me.chkOffen.ForeColor = System.Drawing.SystemColors.ButtonHighlight
|
||||||
Me.chkOffen.Location = New System.Drawing.Point(28, 131)
|
Me.chkOffen.Location = New System.Drawing.Point(28, 163)
|
||||||
Me.chkOffen.Name = "chkOffen"
|
Me.chkOffen.Name = "chkOffen"
|
||||||
Me.chkOffen.Size = New System.Drawing.Size(120, 17)
|
Me.chkOffen.Size = New System.Drawing.Size(120, 17)
|
||||||
Me.chkOffen.TabIndex = 12
|
Me.chkOffen.TabIndex = 12
|
||||||
@@ -226,11 +245,12 @@ Partial Class frmGesSichMenu
|
|||||||
'btnNeu
|
'btnNeu
|
||||||
'
|
'
|
||||||
Me.btnNeu.allowBorder = False
|
Me.btnNeu.allowBorder = False
|
||||||
|
Me.btnNeu.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
Me.btnNeu.BackColor = System.Drawing.Color.White
|
Me.btnNeu.BackColor = System.Drawing.Color.White
|
||||||
Me.btnNeu.FlatAppearance.BorderSize = 0
|
Me.btnNeu.FlatAppearance.BorderSize = 0
|
||||||
Me.btnNeu.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.btnNeu.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.btnNeu.ForeColor = System.Drawing.Color.Black
|
Me.btnNeu.ForeColor = System.Drawing.Color.Black
|
||||||
Me.btnNeu.Location = New System.Drawing.Point(415, 127)
|
Me.btnNeu.Location = New System.Drawing.Point(415, 159)
|
||||||
Me.btnNeu.Name = "btnNeu"
|
Me.btnNeu.Name = "btnNeu"
|
||||||
Me.btnNeu.Size = New System.Drawing.Size(75, 23)
|
Me.btnNeu.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnNeu.TabIndex = 13
|
Me.btnNeu.TabIndex = 13
|
||||||
@@ -243,7 +263,7 @@ Partial Class frmGesSichMenu
|
|||||||
Me.lblSaldo.AutoSize = True
|
Me.lblSaldo.AutoSize = True
|
||||||
Me.lblSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblSaldo.ForeColor = System.Drawing.Color.Honeydew
|
Me.lblSaldo.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.lblSaldo.Location = New System.Drawing.Point(294, 24)
|
Me.lblSaldo.Location = New System.Drawing.Point(294, 17)
|
||||||
Me.lblSaldo.Name = "lblSaldo"
|
Me.lblSaldo.Name = "lblSaldo"
|
||||||
Me.lblSaldo.Size = New System.Drawing.Size(147, 24)
|
Me.lblSaldo.Size = New System.Drawing.Size(147, 24)
|
||||||
Me.lblSaldo.TabIndex = 3
|
Me.lblSaldo.TabIndex = 3
|
||||||
@@ -255,9 +275,9 @@ Partial Class frmGesSichMenu
|
|||||||
Me.lblZollsatz.AutoSize = True
|
Me.lblZollsatz.AutoSize = True
|
||||||
Me.lblZollsatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblZollsatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew
|
Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.lblZollsatz.Location = New System.Drawing.Point(295, 86)
|
Me.lblZollsatz.Location = New System.Drawing.Point(295, 79)
|
||||||
Me.lblZollsatz.Name = "lblZollsatz"
|
Me.lblZollsatz.Name = "lblZollsatz"
|
||||||
Me.lblZollsatz.Size = New System.Drawing.Size(86, 16)
|
Me.lblZollsatz.Size = New System.Drawing.Size(85, 16)
|
||||||
Me.lblZollsatz.TabIndex = 9
|
Me.lblZollsatz.TabIndex = 9
|
||||||
Me.lblZollsatz.Text = "Zollsatz: 12%"
|
Me.lblZollsatz.Text = "Zollsatz: 12%"
|
||||||
'
|
'
|
||||||
@@ -267,9 +287,9 @@ Partial Class frmGesSichMenu
|
|||||||
Me.lblReferenzwert.AutoSize = True
|
Me.lblReferenzwert.AutoSize = True
|
||||||
Me.lblReferenzwert.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblReferenzwert.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew
|
Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew
|
||||||
Me.lblReferenzwert.Location = New System.Drawing.Point(295, 59)
|
Me.lblReferenzwert.Location = New System.Drawing.Point(295, 52)
|
||||||
Me.lblReferenzwert.Name = "lblReferenzwert"
|
Me.lblReferenzwert.Name = "lblReferenzwert"
|
||||||
Me.lblReferenzwert.Size = New System.Drawing.Size(137, 16)
|
Me.lblReferenzwert.Size = New System.Drawing.Size(136, 16)
|
||||||
Me.lblReferenzwert.TabIndex = 6
|
Me.lblReferenzwert.TabIndex = 6
|
||||||
Me.lblReferenzwert.Text = "Referenzwert: €80.000"
|
Me.lblReferenzwert.Text = "Referenzwert: €80.000"
|
||||||
'
|
'
|
||||||
@@ -277,15 +297,63 @@ Partial Class frmGesSichMenu
|
|||||||
'
|
'
|
||||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ExportCSVToolStripMenuItem})
|
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ExportCSVToolStripMenuItem})
|
||||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(132, 26)
|
Me.ContextMenuStrip1.Size = New System.Drawing.Size(133, 26)
|
||||||
'
|
'
|
||||||
'ExportCSVToolStripMenuItem
|
'ExportCSVToolStripMenuItem
|
||||||
'
|
'
|
||||||
Me.ExportCSVToolStripMenuItem.Name = "ExportCSVToolStripMenuItem"
|
Me.ExportCSVToolStripMenuItem.Name = "ExportCSVToolStripMenuItem"
|
||||||
Me.ExportCSVToolStripMenuItem.Size = New System.Drawing.Size(131, 22)
|
Me.ExportCSVToolStripMenuItem.Size = New System.Drawing.Size(132, 22)
|
||||||
Me.ExportCSVToolStripMenuItem.Text = "Export CSV"
|
Me.ExportCSVToolStripMenuItem.Text = "Export CSV"
|
||||||
'
|
'
|
||||||
'frmGesSichMenu
|
'lblFiliale
|
||||||
|
'
|
||||||
|
Me.lblFiliale.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
|
Me.lblFiliale.AutoSize = True
|
||||||
|
Me.lblFiliale.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||||
|
Me.lblFiliale.ForeColor = System.Drawing.Color.Honeydew
|
||||||
|
Me.lblFiliale.Location = New System.Drawing.Point(12, 45)
|
||||||
|
Me.lblFiliale.Name = "lblFiliale"
|
||||||
|
Me.lblFiliale.Size = New System.Drawing.Size(43, 15)
|
||||||
|
Me.lblFiliale.TabIndex = 14
|
||||||
|
Me.lblFiliale.Text = "Filiale:"
|
||||||
|
'
|
||||||
|
'cbxStandort
|
||||||
|
'
|
||||||
|
Me.cbxStandort._allowedValuesFreiText = Nothing
|
||||||
|
Me.cbxStandort._allowFreiText = False
|
||||||
|
Me.cbxStandort._value = ""
|
||||||
|
Me.cbxStandort.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
|
Me.cbxStandort.FormattingEnabled = True
|
||||||
|
Me.cbxStandort.Location = New System.Drawing.Point(12, 63)
|
||||||
|
Me.cbxStandort.Name = "cbxStandort"
|
||||||
|
Me.cbxStandort.Size = New System.Drawing.Size(81, 21)
|
||||||
|
Me.cbxStandort.TabIndex = 15
|
||||||
|
'
|
||||||
|
'cbxWarenort
|
||||||
|
'
|
||||||
|
Me.cbxWarenort._allowedValuesFreiText = Nothing
|
||||||
|
Me.cbxWarenort._allowFreiText = False
|
||||||
|
Me.cbxWarenort._value = ""
|
||||||
|
Me.cbxWarenort.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
|
Me.cbxWarenort.FormattingEnabled = True
|
||||||
|
Me.cbxWarenort.Location = New System.Drawing.Point(112, 63)
|
||||||
|
Me.cbxWarenort.Name = "cbxWarenort"
|
||||||
|
Me.cbxWarenort.Size = New System.Drawing.Size(81, 21)
|
||||||
|
Me.cbxWarenort.TabIndex = 17
|
||||||
|
'
|
||||||
|
'Label4
|
||||||
|
'
|
||||||
|
Me.Label4.Anchor = System.Windows.Forms.AnchorStyles.Right
|
||||||
|
Me.Label4.AutoSize = True
|
||||||
|
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
|
||||||
|
Me.Label4.ForeColor = System.Drawing.Color.Honeydew
|
||||||
|
Me.Label4.Location = New System.Drawing.Point(112, 45)
|
||||||
|
Me.Label4.Name = "Label4"
|
||||||
|
Me.Label4.Size = New System.Drawing.Size(60, 15)
|
||||||
|
Me.Label4.TabIndex = 16
|
||||||
|
Me.Label4.Text = "Warenort:"
|
||||||
|
'
|
||||||
|
'frmGesamtsicherheitenMenu
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
@@ -295,7 +363,8 @@ Partial Class frmGesSichMenu
|
|||||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||||
Me.MaximumSize = New System.Drawing.Size(800, 760)
|
Me.MaximumSize = New System.Drawing.Size(800, 760)
|
||||||
Me.MinimumSize = New System.Drawing.Size(499, 760)
|
Me.MinimumSize = New System.Drawing.Size(499, 760)
|
||||||
Me.Name = "frmGesSichMenu"
|
Me.Name = "frmGesamtsicherheitenMenu"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
Me.Text = "frmGesSichMenu"
|
Me.Text = "frmGesSichMenu"
|
||||||
CType(Me.dgvListe, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.dgvListe, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.Panel1.ResumeLayout(False)
|
Me.Panel1.ResumeLayout(False)
|
||||||
@@ -323,4 +392,8 @@ Partial Class frmGesSichMenu
|
|||||||
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
|
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||||
Friend WithEvents ExportCSVToolStripMenuItem As ToolStripMenuItem
|
Friend WithEvents ExportCSVToolStripMenuItem As ToolStripMenuItem
|
||||||
|
Friend WithEvents lblFiliale As Label
|
||||||
|
Friend WithEvents cbxStandort As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||||
|
Friend WithEvents cbxWarenort As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||||
|
Friend WithEvents Label4 As Label
|
||||||
End Class
|
End Class
|
||||||
@@ -117,6 +117,9 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
|
|
||||||
Public Class frmGesSichMenu
|
Public Class frmGesamtsicherheitenMenu
|
||||||
' Public Zollsatz As Integer = 0
|
' Public Zollsatz As Integer = 0
|
||||||
' Public ZollsatzMulti As Double = 0
|
' Public ZollsatzMulti As Double = 0
|
||||||
' Public Referenzwert As Integer = 0
|
' Public Referenzwert As Integer = 0
|
||||||
@@ -8,13 +8,18 @@ Public Class frmGesSichMenu
|
|||||||
'Public Ust As Integer
|
'Public Ust As Integer
|
||||||
' Public Saldo As Integer = 0
|
' Public Saldo As Integer = 0
|
||||||
Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
Dim GesSichRef As New cGesamtSicherheitsReferenz
|
'Dim GesSichRef As New cGesamtSicherheitsReferenz
|
||||||
|
Dim GesSichRef As VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz
|
||||||
|
|
||||||
'Public ATR As Boolean = False
|
'Public ATR As Boolean = False
|
||||||
Public Property Standort As String = ""
|
Public Property Standort As String = ""
|
||||||
Private Sub frmGesamtsicherheiten_Menu_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmGesamtsicherheiten_Menu_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
cbxStandort.fillWithSQL("SELECT FilialenNr, cast(FilialenNr as varchar(4)) + ' ' + Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True)
|
||||||
|
cbxWarenort.fillWithSQL("SELECT [grz_Grenzstelle], [grz_Bezeichnung] FROM [tblGrenzstelle] WHERE [grz_Aktiv] ='1' AND [grz_Warenort] ='1' ORDER BY [grz_Reihenfolge] ", True, "AVISO", True)
|
||||||
Me.Text = "Gesamtsicherheiten " & Standort
|
Me.Text = "Gesamtsicherheiten " & Standort
|
||||||
frmHauptfenster.EnableDoubleBuffered(dgvListe)
|
frmHauptfenster.EnableDoubleBuffered(dgvListe)
|
||||||
GesSichRef.LoadStandort(Standort)
|
GesSichRef = New VERAG_PROG_ALLGEMEIN.cGesamtsicherheitsReferenz(Standort)
|
||||||
|
'GesSichRef.LOAD("standort", Standort)
|
||||||
lblSaldo.Text = "Saldo: €" & Decimal.Parse(GesSichRef.CalcSaldo()).ToString("N")
|
lblSaldo.Text = "Saldo: €" & Decimal.Parse(GesSichRef.CalcSaldo()).ToString("N")
|
||||||
|
|
||||||
txtVon._ShortDateOnly = True
|
txtVon._ShortDateOnly = True
|
||||||
@@ -28,7 +33,9 @@ Public Class frmGesSichMenu
|
|||||||
|
|
||||||
Public Function LoadDGV()
|
Public Function LoadDGV()
|
||||||
Dim sqladdon As String = ""
|
Dim sqladdon As String = ""
|
||||||
If chkOffen.Checked Then sqladdon &= " AND Sicherheitssaldo != '0,00 €'"
|
If chkOffen.Checked Then sqladdon &= " AND gs_Sicherheitssaldo != '0,00 €'"
|
||||||
|
If cbxStandort._value <> "" Then sqladdon &= " AND gs_filialenNr = '" & cbxStandort._value.ToString & "'"
|
||||||
|
If cbxWarenort._value <> "" Then sqladdon &= " AND gs_warenort = '" & cbxWarenort._value.ToString & "'"
|
||||||
|
|
||||||
' Dim sqlstring As String = "select * from (Select GesamtsichNr, MIN(Standort) as Standort, MIN(FilialNummer) as FilialNummer, min(Abfertigungsnummer) as Abfertigungsnummer,
|
' Dim sqlstring As String = "select * from (Select GesamtsichNr, MIN(Standort) as Standort, MIN(FilialNummer) as FilialNummer, min(Abfertigungsnummer) as Abfertigungsnummer,
|
||||||
'max(LKWID) as LKWID, min (MakeDate) as Datum, FORMAT(SUM(
|
'max(LKWID) as LKWID, min (MakeDate) as Datum, FORMAT(SUM(
|
||||||
@@ -42,21 +49,24 @@ Public Class frmGesSichMenu
|
|||||||
'" & sqladdon & "
|
'" & sqladdon & "
|
||||||
'order by GesamtsichNr"
|
'order by GesamtsichNr"
|
||||||
|
|
||||||
Dim sqlstring As String = " select * from (Select gesamtsichnr, MIN(Standort) as Standort, MIN(FilialNummer) as FilialNummer, min(Abfertigungsnummer) as Abfertigungsnummer,
|
Dim sqlstring As String =
|
||||||
max(LKWID) as LKWID, min (MakeDate) as Datum, FORMAT(SUM(
|
" select * from (Select gs_gsNr as gs_gsnr, MIN(gs_standort) as gs_standort, MIN(gs_warenort) as gs_warenort, MIN(gs_filialenNr) as gs_filialenNr, min(gs_abfertigungsNr) as gs_abfertigungsNr,
|
||||||
Case
|
max(gs_LKWID) as gs_LKWID, min (gs_datum) as gs_datum, FORMAT(SUM(
|
||||||
when Art = 'Open' then (Sicherheitsbetrag * -1)
|
Case
|
||||||
when Art = 'Close' then Sicherheitsbetrag
|
when gs_art = 'Open' then (gs_sicherheitsbetrag * -1)
|
||||||
End) , 'C', 'de-DE')As SicherheitsSaldo
|
when gs_art = 'Close' then gs_sicherheitsbetrag
|
||||||
From (select * from (select GesamtsichNr as ding from [tblGesamtsicherheit] where
|
End) , 'C', 'de-DE')As gs_SicherheitsSaldo
|
||||||
Freitext like '%" & txtSuchbegriff.Text & "%' OR
|
|
||||||
Abfertigungsnummer like '%" & txtSuchbegriff.Text & "%' OR
|
From (select * from (select gs_gsNr as ding from [tblGesamtsicherheit] where
|
||||||
Kennnummer like '%" & txtSuchbegriff.Text & "%' OR
|
gs_freitext like '%" & txtSuchbegriff.Text & "%' OR
|
||||||
LKWID like '%" & txtSuchbegriff.Text & "%'
|
gs_abfertigungsNr like '%" & txtSuchbegriff.Text & "%' OR
|
||||||
)as tb1 left join [tblGesamtsicherheit] as tb2 on tb1.ding = tb2.GesamtsichNr) as meh group by GesamtsichNr) as meh2
|
gs_ATBNr like '%" & txtSuchbegriff.Text & "%' OR
|
||||||
Where Standort = '" & Standort & "' " & sqladdon & "
|
gs_LKWID like '%" & txtSuchbegriff.Text & "%' OR
|
||||||
AND Datum > '" & Date.Parse(txtVon.Text) & "'
|
gs_warenort like '%" & txtSuchbegriff.Text & "%'
|
||||||
AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
) as tb1 left join [tblGesamtsicherheit] as tb2 on tb1.ding = tb2.gs_gsNr) as meh group by gs_gsNr) as meh2
|
||||||
|
Where gs_standort = '" & Standort & "' " & sqladdon & "
|
||||||
|
AND gs_datum > '" & Date.Parse(txtVon.Text) & "'
|
||||||
|
AND gs_datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
||||||
|
|
||||||
dgvListe.SET_SQL(sqlstring, "AVISO")
|
dgvListe.SET_SQL(sqlstring, "AVISO")
|
||||||
dgvListe.LOAD()
|
dgvListe.LOAD()
|
||||||
@@ -64,19 +74,22 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
With dgvListe
|
With dgvListe
|
||||||
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
|
||||||
.RowHeadersWidth = 6
|
.RowHeadersWidth = 6
|
||||||
.Columns("Standort").Visible = False
|
.Columns("gs_standort").Visible = False
|
||||||
.Columns("GesamtsichNr").HeaderText = "#"
|
.Columns("gs_gsnr").HeaderText = "#"
|
||||||
.Columns("GesamtsichNr").Width = 36
|
.Columns("gs_gsnr").Width = 36
|
||||||
.Columns("Filialnummer").HeaderText = "Filiale"
|
.Columns("gs_filialenNr").HeaderText = "Filiale"
|
||||||
.Columns("Filialnummer").Width = 43
|
.Columns("gs_filialenNr").Width = 43
|
||||||
.Columns("Abfertigungsnummer").HeaderText = "Abfert.Nr."
|
.Columns("gs_abfertigungsNr").HeaderText = "Abfert.Nr."
|
||||||
.Columns("Abfertigungsnummer").Width = 107
|
.Columns("gs_abfertigungsNr").Width = 107
|
||||||
.Columns("Datum").Width = 112
|
.Columns("gs_datum").Width = 112
|
||||||
.Columns("SicherheitsSaldo").Width = 96
|
.Columns("gs_SicherheitsSaldo").Width = 106
|
||||||
|
.Columns("gs_Warenort").Width = 96
|
||||||
|
.Columns("gs_Warenort").HeaderText = "Warenort"
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
For Each row As DataGridViewRow In dgvListe.Rows
|
For Each row As DataGridViewRow In dgvListe.Rows
|
||||||
If row.Cells("SicherheitsSaldo").Value <> 0 Then
|
If row.Cells("gs_SicherheitsSaldo").Value <> 0 Then
|
||||||
row.DefaultCellStyle.BackColor = Color.Red
|
row.DefaultCellStyle.BackColor = Color.Red
|
||||||
Else
|
Else
|
||||||
row.DefaultCellStyle.BackColor = Color.Green
|
row.DefaultCellStyle.BackColor = Color.Green
|
||||||
@@ -86,8 +99,9 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Sub ShowStandort()
|
Public Sub ShowStandort()
|
||||||
lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.Referenzwert.ToString("N")
|
'lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString("N")
|
||||||
lblZollsatz.Text = "Zollsatz: " & GesSichRef.Zollsatz & "%"
|
lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString()
|
||||||
|
lblZollsatz.Text = "Zollsatz: " & GesSichRef.gsr_zollsatz & "%"
|
||||||
lblSaldo.Text = "Saldo: €" & Decimal.Parse(GesSichRef.CalcSaldo()).ToString("N")
|
lblSaldo.Text = "Saldo: €" & Decimal.Parse(GesSichRef.CalcSaldo()).ToString("N")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -95,15 +109,16 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
|
|
||||||
|
|
||||||
Private Sub OpenFRM(sender As Object, e As DataGridViewCellEventArgs) Handles dgvListe.CellDoubleClick
|
Private Sub OpenFRM(sender As Object, e As DataGridViewCellEventArgs) Handles dgvListe.CellDoubleClick
|
||||||
Dim frm As New frmGesSich
|
Dim frm As New frmGesamtsicherheiten
|
||||||
With frm
|
With frm
|
||||||
.GesSichRef = GesSichRef
|
.GesSichRef = GesSichRef
|
||||||
.GesamtsichNr = dgvListe.CurrentRow.Cells("GesamtsichNr").Value
|
.gessicherheitID = dgvListe.CurrentRow.Cells("gs_gsnr").Value
|
||||||
.Standort = Me.Standort
|
.Standort = Me.Standort
|
||||||
.MakeDate = dgvListe.CurrentRow.Cells("Datum").Value
|
.datum = dgvListe.CurrentRow.Cells("gs_datum").Value
|
||||||
.LKWID = dgvListe.CurrentRow.Cells("LKWID").Value
|
.LKWID = dgvListe.CurrentRow.Cells("gs_LKWID").Value
|
||||||
.FilialNummer = dgvListe.CurrentRow.Cells("FilialNummer").Value
|
.FilialNummer = dgvListe.CurrentRow.Cells("gs_filialenNr").Value
|
||||||
.Abfertigungsnummer = dgvListe.CurrentRow.Cells("Abfertigungsnummer").Value
|
.Abfertigungsnummer = dgvListe.CurrentRow.Cells("gs_abfertigungsNr").Value
|
||||||
|
.warenortID = dgvListe.CurrentRow.Cells("gs_warenort").Value
|
||||||
End With
|
End With
|
||||||
|
|
||||||
AddHandler frm.FormClosing, Function()
|
AddHandler frm.FormClosing, Function()
|
||||||
@@ -116,11 +131,11 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnNeu_Click(sender As Object, e As EventArgs) Handles btnNeu.Click
|
Private Sub btnNeu_Click(sender As Object, e As EventArgs) Handles btnNeu.Click
|
||||||
Dim frm As New frmGesSich
|
Dim frm As New frmGesamtsicherheiten
|
||||||
With frm
|
With frm
|
||||||
.GesSichRef = GesSichRef
|
.GesSichRef = GesSichRef
|
||||||
.Standort = Me.Standort
|
.Standort = Me.Standort
|
||||||
.MakeDate = Date.Now
|
.datum = Date.Now
|
||||||
'.ATR = GesSichRef.ATR
|
'.ATR = GesSichRef.ATR
|
||||||
'.Ust = GesSichRef.Ust
|
'.Ust = GesSichRef.Ust
|
||||||
'.UstEnabled = GesSichRef.UstEnabled
|
'.UstEnabled = GesSichRef.UstEnabled
|
||||||
@@ -158,6 +173,9 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
txtSuchbegriff.Text = "" : chkOffen.Checked = True
|
txtSuchbegriff.Text = "" : chkOffen.Checked = True
|
||||||
txtVon.Text = Date.Today.AddDays(-30).ToString("dd.MM.yyyy")
|
txtVon.Text = Date.Today.AddDays(-30).ToString("dd.MM.yyyy")
|
||||||
txtbis.Text = Date.Today.ToString("dd.MM.yyyy")
|
txtbis.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
|
cbxStandort._value = ""
|
||||||
|
cbxWarenort._value = ""
|
||||||
|
btnSucheStarten_Click(sender, e)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MyTextBox1_TextChanged(sender As Object, e As EventArgs)
|
Private Sub MyTextBox1_TextChanged(sender As Object, e As EventArgs)
|
||||||
@@ -228,55 +246,63 @@ AND Datum < '" & Date.Parse(txtbis.Text).AddDays(1).AddSeconds(-1) & "'"
|
|||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class cGesamtSicherheitsReferenz
|
'Public Class cGesamtSicherheitsReferenz
|
||||||
Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
' Public SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
Property Zollsatz As Integer = 0
|
' Property Zollsatz As Integer = 0
|
||||||
Property ZollsatzMulti As Double = 0
|
' Property ZollsatzMulti As Double = 0
|
||||||
Property Referenzwert As Double = 0
|
' Property Referenzwert As Double = 0
|
||||||
Property UstEnabled As Boolean = False
|
' Property UstEnabled As Boolean = False
|
||||||
Property Ust As Integer
|
' Property Ust As Integer
|
||||||
Property Saldo As Double = 0
|
' Property Saldo As Double = 0
|
||||||
Property ATR As Boolean = False
|
' Property ATR As Boolean = False
|
||||||
Property Standort As String = ""
|
' Property Standort As String = ""
|
||||||
|
|
||||||
Public Sub LoadStandort(_Standort As String)
|
' Public Sub LoadStandort(_Standort As String)
|
||||||
Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where Standort = " & "'" & _Standort & "'"
|
' 'Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where Standort = " & "'" & _Standort & "'"
|
||||||
Dim dt As New DataTable
|
' Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where gsr_standort = " & "'" & _Standort & "'"
|
||||||
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
' Dim dt As New DataTable
|
||||||
Zollsatz = dt.Rows(0).Item("Zollsatz")
|
' dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
Referenzwert = dt.Rows(0).Item("Referenzwert")
|
' 'Zollsatz = dt.Rows(0).Item("Zollsatz")
|
||||||
UstEnabled = dt.Rows(0).Item("UstEnabled")
|
' Zollsatz = dt.Rows(0).Item("gsr_zollsatz")
|
||||||
Ust = dt.Rows(0).Item("Ust")
|
' 'Referenzwert = dt.Rows(0).Item("Referenzwert")
|
||||||
ATR = dt.Rows(0).Item("ATR")
|
' Referenzwert = dt.Rows(0).Item("gsr_referenzwert")
|
||||||
ZollsatzMulti = Zollsatz / 100
|
' UstEnabled = dt.Rows(0).Item("gsr_ustEnabled")
|
||||||
Saldo = dt.Rows(0).Item("aktSaldo")
|
' 'UstEnabled = dt.Rows(0).Item("UstEnabled")
|
||||||
Standort = _Standort
|
' Ust = dt.Rows(0).Item("gsr_ust")
|
||||||
End Sub
|
' 'Ust = dt.Rows(0).Item("Ust")
|
||||||
|
' ATR = dt.Rows(0).Item("gsr_ATR")
|
||||||
|
' 'ATR = dt.Rows(0).Item("ATR")
|
||||||
|
' ZollsatzMulti = Zollsatz / 100
|
||||||
|
' Saldo = dt.Rows(0).Item("gsr_aktSaldo")
|
||||||
|
' 'Saldo = dt.Rows(0).Item("aktSaldo")
|
||||||
|
' Standort = _Standort
|
||||||
|
' End Sub
|
||||||
|
|
||||||
Public Function CalcSaldo() As String
|
' Public Function CalcSaldo() As String
|
||||||
Dim SaldoString As String = "select SUM(
|
' Dim SaldoString As String =
|
||||||
case
|
' "select SUM(
|
||||||
when Art = 'Open' then (Sicherheitsbetrag * -1)
|
' case
|
||||||
when Art = 'Close' then Sicherheitsbetrag
|
' when gs_art = 'Open' then (gs_sicherheitsbetrag * -1)
|
||||||
end) as SicherheitsSaldo
|
' when gs_art = 'Close' then gs_sicherheitsbetrag
|
||||||
from [tblGesamtsicherheit] Where Standort = '" & Standort & "'"
|
' end) as SicherheitsSaldo
|
||||||
|
' from [tblGesamtsicherheit] Where gs_standort = '" & Standort & "'"
|
||||||
|
|
||||||
Dim dt As New DataTable
|
' Dim dt As New DataTable
|
||||||
Dim mrn As Double = 0
|
' Dim mrn As Double = 0
|
||||||
dt = SQL.loadDgvBySql(SaldoString, "AVISO", 100, True)
|
' dt = SQL.loadDgvBySql(SaldoString, "AVISO", 100, True)
|
||||||
If dt.Rows(0).Item(0).ToString.Length > 0 Then
|
' If dt.Rows(0).Item(0).ToString.Length > 0 Then
|
||||||
mrn = dt.Rows(0).Item(0)
|
' mrn = dt.Rows(0).Item(0)
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Saldo = Referenzwert + mrn
|
' Saldo = Referenzwert + mrn
|
||||||
|
|
||||||
UpdateSaldo()
|
' updateSaldo()
|
||||||
Return Saldo
|
' Return Saldo
|
||||||
End Function
|
' End Functio
|
||||||
|
|
||||||
Public Function UpdateSaldo()
|
' Public Function updateSaldo()
|
||||||
SQL.doSQL("Update [tblGesamtsicherheitReferenz] Set aktSaldo = '" & Saldo & "' WHERE Standort = '" & Standort & "'", "AVISO")
|
' SQL.doSQL("Update [tblGesamtsicherheitReferenz] Set gsr_aktSaldo = '" & Saldo & "' WHERE gsr_Standort = '" & Standort & "'", "AVISO")
|
||||||
End Function
|
' End Function
|
||||||
|
|
||||||
End Class
|
'End Class
|
||||||
1397
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
Normal file
1397
Aviso/frmGesamtsicherheitenNEU.Designer.vb
generated
Normal file
File diff suppressed because it is too large
Load Diff
200
Aviso/frmGesamtsicherheitenNEU.resx
Normal file
200
Aviso/frmGesamtsicherheitenNEU.resx
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAABILAAASCwAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAACAAAAAgAAAAMAAAAEAAAAChEAEQ8NAA0TAAAAFgAA
|
||||||
|
ABkAAAAbAAAAGgAAABgAAAAUAAAADgAAAAwAAAAIAAAABAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAUgICAIEhISDg0NDRQAAAAbAAAAJAAA
|
||||||
|
ACsAAAAvAAAAMgAAADQAAAAzAAAAMAAAACsAAAAmAAAAHgAAABYAAAAQAAAACwAAAAYAAAAEAAAAAQAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAFAAAACg8PDxEJCQkbBwcHJQUF
|
||||||
|
BTEEBAQ9AAAARwAAAE0AAABSAAAAUwAAAFIAAABOAAAESAAABD8AAAAzAAAAKAAAAB0AAAAUAAAADQAA
|
||||||
|
AAcAAAADAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAgAAAAQCgAKGg0G
|
||||||
|
DSgJDgk4BwcHSAYGBlsCAgVqAAAAcgAAAHUAAAB0AAAAcwAAAnAAAAVoAwMGWwMDA0wEAAA8AAAALQAA
|
||||||
|
AB4AAAAUAAAADAAAAAUAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAEAAAACgwM
|
||||||
|
DBUICAgiCgoKMwMHB0oFBQViCggCfmhWALWZfwDXpIYA37mXAOyxkQDmqIcA25d8AMlbSgCYAAMAZAMD
|
||||||
|
AE0ABAA6AAAAKAAAABoAAAAQAAAABwAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAA
|
||||||
|
AAYAAAAMFhYWFw0NDScFBQU3RjgAX7SUAM/XsQD/37YA/9+0AP/ftQD/37UA/9+1AP/etgD/3rUA/9+2
|
||||||
|
AP/UrQD5qosArSMjAEEABgYqAAAAHAAAABEAAAAJAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAACAAAABgAAAAsMDAwWGhoJHcCdAJ7ctwD/3rYA/9+2AP/htgD/4rcA/+K3AP/itwD/4rcA/+K3
|
||||||
|
AP/itwD/4bYA/9+2AP/etgD/2bMA9LKTAG0NDQ0UAAAAEAAAAAgAAAADAAAAAQAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAEAAAADAAAAB3ZiAA3YtADF3rYA/+C2AP/iuAD/5LgA/+W5AP/mugD/57oA/+e6
|
||||||
|
AP/nugD/57oA/+a5AP/luQD/47gA/+K3AP/ftgD/3bYA/9eyAJEAAAAAAAAABAAAAAIAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA3bcA1963AP/iuAD/5LoA/+e7AP/nvAD/6LwA/+m8
|
||||||
|
AP/rvQD/7L4A/+2+AP/svwD/7L4A/+q8AP/ovAD/5rsA/+O6AP/huAD/3bYA/+C6AJsAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOC6ALXfuAD/4roA/+a8AP/nvAD/6b0A/+u+
|
||||||
|
AP/svwD/7MAA/76cAP+NdwD/e2sb/3JkIv+HcwD/p4kA/+K5AP/qvQD/57wA/+W8AP/hugD/3rgA/965
|
||||||
|
AG0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfugBn3rkA/+K7AP/mvgD/6b4A/+u/
|
||||||
|
AP/rwAD/78QA/8CeAP9WTzL/QEBB/0JERf9ERUX/QUFB/zs8PP81NTX/Qzwn//DDAP/rvwD/6L4A/+a9
|
||||||
|
AP/huwD/3bgA/9WxACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAd25AO/hvAD/5r4A/+nA
|
||||||
|
AP/rwQD/7MIA//DEAP+ykwD/Ozw+/0VGRv9JSUn/SEtK/0dHSP9BQkT/Ozs8/zQ0NP9vYBP/8MUA/+zC
|
||||||
|
AP/rwQD/6L8A/+W+AP/huwD/27gAugAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADduQB44bwA/+a+
|
||||||
|
AP/pwQD/7MMA/+7EAP/wxQD/1a8A/zw+Pv9HR0f/TU5O/05PUP+QgC7/uJsA/9WwAP/DowD/m4MA/6yQ
|
||||||
|
AP/xxQD/78QA/+7EAP/rwgD/6MAA/+W9AP/guwD/3LkALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN26
|
||||||
|
ANrkvgD/6MEA/+vEAP/uxAD/8MUA//TJAP9wYiv/Q0ZG/05PT/9RVFX/up0Q//TJAP/xxwD/8ccA//HH
|
||||||
|
AP/yxwD/8scA//DGAP/wxgD/8MUA/+3FAP/rwwD/58AA/+K+AP/euwCZAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AADcuQAW4L4A/+XBAP/qxQD/7cYA/+/IAP/1ywD/7cQA/z9BQP9MTU3/VVZW/351TP/4zwD/9MsA//XL
|
||||||
|
AP/1ywD/9csA//TLAP/xyQD/8ckA//HJAP/wyQD/78cA/+3GAP/pxAD/5cAA/969AOoAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAN27AEvjwAD/6MQA/+zGAP/vyAD/9swA/0xEHv8yMjT/QkRE/09QUP9XWFj/Wltb/1dZ
|
||||||
|
XP9SVFb/Sk1P/0JERv86Ojv/ZFgr//bNAP/zygD/88oA//PKAP/xygD/78gA/+vFAP/nwwD/4b8A/8aq
|
||||||
|
AAkAAAAAAAAAAAAAAAAAAAAA378Jb+TCAP/qxgD/7skA//DMAP/1zwD/dmUf/0xHNP9CRET/T1BQ/1dY
|
||||||
|
WP9zblX/e3NR/3dvTP9yaUb/bGI+/2NcNf+Ccyf/9tAA//PNAP/zzQD/880A//LMAP/wywD/7cgA/+jG
|
||||||
|
AP/jwQD/274GKwAAAAAAAAAAAAAAAAAAAADfvx545MQT/+rHAv/uywD/8s0A//TPAP/evAD/kn4q/0BB
|
||||||
|
Qf9OTk7/VVZX/7ykOv/fwBH/3b4V/9y9Ev/buxb/2roK/9++AP/10AD/9M8A//TPAP/0zwD/884A//HM
|
||||||
|
AP/uygD/6cYF/+TDFf/fvxs4AAAAAAAAAAAAAAAAAAAAAODCJXXlxiL/68oX//DND//zzwH/+NMA/0pD
|
||||||
|
If8tLi7/PDw8/0hKSf9SUlL/VVdY/1VXWf9RVFb/S05R/0VGSf87PD//Zlwz//nUAP/20QD/9tEA//bR
|
||||||
|
AP/10QD/888B/+7MEv/qyRn/5MQk/968IS4AAAAAAAAAAAAAAAAAAAAA4cMwVeXGLv/ryyn/8M4l//PR
|
||||||
|
Iv/31CH/lIEg/31tLf80NTX/QUFB/0pMTP9lYVD/m41J/5mISf+XiEb/lINB/5B/Of+ljzD/+NUf//fT
|
||||||
|
Hv/30x7/9tMe//XRIf/y0CP/7s0m/+rKKv/kxTD/2b8mFAAAAAAAAAAAAAAAAAAAAADixTMj5cY4/+vM
|
||||||
|
M//w0DL/9NIw//bUMf/51zD//9sw/0pELf83Nzf/QUJC/05OSv/y0TH/+9ct//rXLf/61y3/+tcw//rX
|
||||||
|
MP/41i//+NYv//jWL//31TD/9tQx//PRMf/vzzP/6ss0/+LFNvcAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AADkxj/06sw//+/QPv/z0z7/9tY8//jXPf/62D//tJw1/ywtLf83Nzf/QEBA/2pjSP/lyEL//No9//rZ
|
||||||
|
Pv/72T7//Ns8//TTPv/51z3/+Nc9//jXPf/21Tz/8tI+/+7PPf/oyj7/4sU+qAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAOHFRJLoy0T/7s9F//LTRv/21kf/+NdF//nYR//+3Ej/a2Aw/ywsLP81NTX/Ozs7/0VG
|
||||||
|
QP9vZ0X/k4VH/3dtQf9DQDT/s50+//vbR//52Ef/+NdF//bWR//x0kX/7c5G/+fJRf/hw0JNAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA379AEObKSv/sz0v/8dNM//XXTv/32U7/+dtN//rcTv/52k3/cGQy/ygo
|
||||||
|
KP8uLi7/MjQ0/zU2Nv81NTX/MTIy/ywsLP97bjf//NxQ//naTf/32E//9NZM//DSTf/rzkv/5MhI2AAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5clNiOnNUf/v0VP/89ZV//fZVf/521j/+txX//vc
|
||||||
|
Wf//4Vr/wqpJ/1xTL/8lJSX/KCkp/ygpKf8mJib/Ly0n/4Z3Of/93Vj/+dpX//bYVv/y1VT/7dFT/+fM
|
||||||
|
Uf/hyE5FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC/v0AE5spS3ezQVf/w1Fj/9dda//fa
|
||||||
|
XP/53Fz/+t1d//veXf/932D//+Fg/+zQWP/ZwFP/2cFU/93DVf/+4l7//d9e//ncXP/22Vz/89da/+/S
|
||||||
|
V//qzlT/5MpTowAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADbwlUV5stY9+zR
|
||||||
|
W//w1V7/9dhg//fbYv/53GL/+t1k//veY//73mX//OBk//zgZf/832b//N9k//ndY//53GP/9tpg//PX
|
||||||
|
Xv/w1F3/69Ba/+XKV9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AADizFcj5stb7ezRXv/w1GL/89dj//XZZf/322b/+Nxn//ncZ//53Gf/+dxn//ncZ//43Gf/99tm//XZ
|
||||||
|
ZP/y12P/79Ng/+vQXf/my1rJ1apVBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAADVv1UM5stcxevQYP/u02L/8NZk//PXZv/02Wf/9dpo//XaaP/12mj/9dpo//TZ
|
||||||
|
Z//y12X/8NVk/+3SYv/pz1//5stdjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5ctfWebNYOLq0WP/7NJk/+7UZv/w1Wf/8NZn//DW
|
||||||
|
Z//v1Wb/7tRl/+vSZP/q0GL/58xfvuLMXyMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOLLYyzlzGOB5s1izefP
|
||||||
|
ZNTp0GP/6dBj/ejOY9HmzWLA5sthcefCYRUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
AAAAAAAAAAAAAAAAAAAAAAAA+AAAf/AAAB/wAAAP4AAAD+AAAA/gAAAP4AAAB+AAAE/0AAA/+AAAH/AA
|
||||||
|
AA/gAAAP4AAAB+AAAAfAAAAHwAAAA8AAAAPAAAADwAAAA8AAAAPAAAAH4AAAB+AAAAfgAAAP8AAAD/AA
|
||||||
|
AB/4AAA//AAAP/4AAP//gAH//+AH//////8=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
704
Aviso/frmGesamtsicherheitenNEU.vb
Normal file
704
Aviso/frmGesamtsicherheitenNEU.vb
Normal file
@@ -0,0 +1,704 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
Imports DocumentFormat.OpenXml.Bibliography
|
||||||
|
Imports DocumentFormat.OpenXml.Presentation
|
||||||
|
Imports DocumentFormat.OpenXml.Spreadsheet
|
||||||
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
|
Public Class frmGesamtsicherheitenNEU
|
||||||
|
|
||||||
|
Public Property gessicherheitID As Integer
|
||||||
|
Public Property datum As DateTime = Nothing
|
||||||
|
Property GesSichRef As cGesamtsicherheitsReferenz
|
||||||
|
Property GesSichPos As cGesamtssicherheitsPositionen
|
||||||
|
Property Standort As String = ""
|
||||||
|
|
||||||
|
Public ZollsatzMulti As Double = 0
|
||||||
|
|
||||||
|
Public Saldo As Integer = 0
|
||||||
|
|
||||||
|
Public Neu As Boolean = False
|
||||||
|
|
||||||
|
Public FilialNummer As Integer
|
||||||
|
|
||||||
|
Public Abfertigungsnummer As String
|
||||||
|
|
||||||
|
Public LKWID As String
|
||||||
|
|
||||||
|
Public warenortID As String
|
||||||
|
|
||||||
|
Dim openopened As cSicherheiten
|
||||||
|
|
||||||
|
Dim closedopened As cSicherheiten
|
||||||
|
|
||||||
|
Dim sicherheiten As cSicherheiten
|
||||||
|
|
||||||
|
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||||
|
|
||||||
|
Dim MONAT As Date = CDate("01." & Now.Month & "." & Now.Year) '.AddMonths(-1)
|
||||||
|
Dim srcTAG As Date = CDate(Now.ToShortDateString)
|
||||||
|
|
||||||
|
Dim JAHR As Date = CDate("01.01." & Now.Year)
|
||||||
|
|
||||||
|
Private Sub FlatButton1_Click(sender As Object, e As EventArgs) Handles FlatButton1.Click
|
||||||
|
|
||||||
|
Dim dgv As String = ""
|
||||||
|
For Each c As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
||||||
|
dgv &= c.Width & c.HeaderText & vbCrLf
|
||||||
|
Next
|
||||||
|
' MsgBox(dgv)
|
||||||
|
LoadDGV()
|
||||||
|
GesSichRef.LOAD()
|
||||||
|
LoadStandort()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmGesamtsicherheit_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
|
||||||
|
btnMonat.Text = MONAT.ToString("MMMM")
|
||||||
|
btnJahr.Text = JAHR.Year
|
||||||
|
|
||||||
|
If setNullToZero(gessicherheitID) = "" Or Neu = True Then
|
||||||
|
panOben.Enabled = False : panOben.Enabled = False
|
||||||
|
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)
|
||||||
|
If datum = Nothing Then datum = Date.Now
|
||||||
|
Else
|
||||||
|
LoadDGV()
|
||||||
|
End If
|
||||||
|
LoadStandort()
|
||||||
|
cboATR.Enabled = GesSichRef.gsr_ATR
|
||||||
|
|
||||||
|
Me.Text = "Gesamtsicherheit " & Standort
|
||||||
|
frmHauptfenster.EnableDoubleBuffered(dgvGesamtsicherheitCRN)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub LoadDGV()
|
||||||
|
'lblSaldo.Text = "Saldo: € " & GesSichRef.gsr_Saldo.ToString("N")
|
||||||
|
lblSaldo.Text = "Saldo: € " & GesSichRef.gsr_Saldo.ToString()
|
||||||
|
lblGestellungNr.Text = ""
|
||||||
|
Dim sqladd1 As String = ""
|
||||||
|
If GesSichRef.gsr_ustEnabled Then sqladd1 &= ", FORMAT((([gs_warenwert] + [gs_sicherheitsbetrag]) * " & GesSichRef.gsr_ust & "/100), 'C', 'de-DE') as gs_ust"
|
||||||
|
If GesSichRef.gsr_ATR Then sqladd1 &= ", [gs_atr]"
|
||||||
|
|
||||||
|
|
||||||
|
Dim addtosqlstring As String = ""
|
||||||
|
Dim SQLStringMRN As String = "select [gs_gsId], [gs_ATBNr], [gs_posNr], [gs_datum], [gs_warenwert], [gs_sicherheitsbetrag], [gs_saldo] " & sqladd1 & " , [gs_freitext] from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "' and [gs_art] = 'Open' order by [gs_datum]"
|
||||||
|
dgvGesamtsicherheitMRN.SET_SQL(SQLStringMRN, "AVISO", ,)
|
||||||
|
dgvGesamtsicherheitMRN.LOAD()
|
||||||
|
|
||||||
|
Dim SQLStringCRN As String = "select [gs_gsId], [gs_ATBNr], [gs_datum], [gs_warenwert], [gs_sicherheitsbetrag], [gs_saldo], [gs_freitext] from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "' and [gs_art] = 'Close' order by [gs_datum]"
|
||||||
|
dgvGesamtsicherheitCRN.SET_SQL(SQLStringCRN, "AVISO", ,)
|
||||||
|
dgvGesamtsicherheitCRN.LOAD()
|
||||||
|
|
||||||
|
Dim StandortSqlString As String = "select * from [tblGesamtsicherheit] where [gs_gsNr] = '" & gessicherheitID & "'"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
|
|
||||||
|
If dt.Rows.Count > 0 Then
|
||||||
|
'Me.GesamtsichNr = dt.Rows(0).Item("GesamtsichNr")
|
||||||
|
Me.FilialNummer = setNullToZero(dt.Rows(0).Item("gs_filialenNr"))
|
||||||
|
Me.Abfertigungsnummer = setNullToZero(dt.Rows(0).Item("gs_abfertigungsNr"))
|
||||||
|
Me.warenortID = setNullToZero(dt.Rows(0).Item("gs_warenort"))
|
||||||
|
|
||||||
|
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.warenortID.Length > 0 Then lblGestellungNr.Text &= "Warenort: " & Me.warenortID & " "
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If dgvGesamtsicherheitMRN.Columns.Count > 0 Then
|
||||||
|
With dgvGesamtsicherheitMRN
|
||||||
|
.RowHeadersWidth = 10
|
||||||
|
.Columns("gs_gsId").Visible = False
|
||||||
|
.Columns("gs_warenwert").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").Visible = False
|
||||||
|
Select Case GesSichRef.gsr_ATR
|
||||||
|
Case True
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "ATB"
|
||||||
|
.Columns("gs_atr").HeaderText = "ATR"
|
||||||
|
.Columns("gs_atr").Width = 33
|
||||||
|
.Columns("gs_ust").Width = 69
|
||||||
|
Case Else
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "CRN"
|
||||||
|
End Select
|
||||||
|
.Columns("gs_ATBNr").Width = 146
|
||||||
|
|
||||||
|
.Columns("gs_posNr").Width = 20
|
||||||
|
.Columns("gs_datum").Width = 95
|
||||||
|
.Columns("gs_warenwert").Width = 100
|
||||||
|
.Columns("gs_saldo").Width = 100
|
||||||
|
|
||||||
|
.Columns("gs_sicherheitsbetrag").Width = 100
|
||||||
|
.Columns("gs_freitext").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
|
||||||
|
End With
|
||||||
|
' For Each col As DataGridViewColumn In dgvGesamtsicherheitMRN.Columns
|
||||||
|
'col.Width = 120
|
||||||
|
'Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dgvGesamtsicherheitCRN.Columns.Count > 0 Then
|
||||||
|
With dgvGesamtsicherheitCRN
|
||||||
|
.RowHeadersWidth = 10
|
||||||
|
.Columns("gs_gsId").Visible = False
|
||||||
|
.Columns("gs_warenwert").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_sicherheitsbetrag").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").DefaultCellStyle.Format = "c"
|
||||||
|
.Columns("gs_saldo").Visible = False
|
||||||
|
Select Case GesSichRef.gsr_ATR
|
||||||
|
Case True
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "ATC / MRN"
|
||||||
|
Case Else
|
||||||
|
.Columns("gs_ATBNr").HeaderText = "CRN"
|
||||||
|
End Select
|
||||||
|
.Columns("gs_ATBNr").Width = 120
|
||||||
|
.Columns("gs_datum").Width = 140
|
||||||
|
.Columns("gs_warenwert").Width = 100
|
||||||
|
.Columns("gs_sicherheitsbetrag").Width = 100
|
||||||
|
.Columns("gs_freitext").Width = 220
|
||||||
|
End With
|
||||||
|
'For Each col As DataGridViewColumn In dgvGesamtsicherheitCRN.Columns
|
||||||
|
' col.Width = 120
|
||||||
|
'Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub LoadStandort()
|
||||||
|
'Dim StandortSqlString As String = "select * from [tblGesamtsicherheitReferenz] where Standort = " & "'" & Standort & "'"
|
||||||
|
'Dim dt As New DataTable
|
||||||
|
'dt = SQL.loadDgvBySql(StandortSqlString, "AVISO", 100, True)
|
||||||
|
'Zollsatz = dt.Rows(0).Item("Zollsatz")
|
||||||
|
'Referenzwert = dt.Rows(0).Item("Referenzwert")
|
||||||
|
|
||||||
|
'lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString("N")
|
||||||
|
lblReferenzwert.Text = "Referenzwert: €" & GesSichRef.gsr_referenzwert.ToString()
|
||||||
|
lblZollsatz.Text = "Zollsatz: " & GesSichRef.gsr_zollsatz & "%"
|
||||||
|
ZollsatzMulti = GesSichRef.gsr_zollsatz / 100
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Private Sub CalcSaldo()
|
||||||
|
' Dim SaldoString As String = "select SUM([MRN_Sicherheitsbetrag]) as sumone, SUM([CRN_Sicherheitsbetrag]) As sumtwo from [tblGesamtsicherheit]"
|
||||||
|
' Dim dt As New DataTable
|
||||||
|
' dt = SQL.loadDgvBySql(SaldoString, "AVISO", 100, True)
|
||||||
|
' Dim mrn As Integer = dt.Rows(0).Item(0)
|
||||||
|
' Dim crn As Integer = dt.Rows(0).Item(1)
|
||||||
|
|
||||||
|
' Saldo = Referenzwert - mrn + crn
|
||||||
|
|
||||||
|
' lblSaldo.Text = "Saldo: €" & Saldo.ToString("N")
|
||||||
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Warenwert_TextChanged(sender As Object, e As EventArgs) Handles txtMRNWarenwert.TextChanged, txtCRNWarenwert.TextChanged
|
||||||
|
Try
|
||||||
|
Select Case sender.name
|
||||||
|
Case "txtMRNWarenwert"
|
||||||
|
txtMRNSicherheitsbetrag.Text = (txtMRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
||||||
|
If GesSichRef.gsr_ustEnabled Then txtEust.Text = (Double.Parse(txtMRNWarenwert.Text) + Double.Parse(txtMRNSicherheitsbetrag.Text)) * (GesSichRef.gsr_ust / 100)
|
||||||
|
Case "txtCRNWarenwert"
|
||||||
|
txtCRNSicherheitsbetrag.Text = (txtCRNWarenwert.Text * ZollsatzMulti).ToString("N")
|
||||||
|
End Select
|
||||||
|
Catch
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Warenwert_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtMRNWarenwert.KeyPress, txtCRNWarenwert.KeyPress, txtPos.KeyPress
|
||||||
|
Select Case Asc(e.KeyChar)
|
||||||
|
Case 48 To 57, 8, 44
|
||||||
|
' Zahlen, Backspace und , zulassen
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
' alle anderen Eingaben unterdrücken
|
||||||
|
e.Handled = True
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DateTime_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtCRNDate.KeyPress, txtCRNTime.KeyPress, txtMRNDate.KeyPress, txtMRNTime.KeyPress
|
||||||
|
Select Case Asc(e.KeyChar)
|
||||||
|
Case 48 To 57, 8, 46, 58
|
||||||
|
' Zahlen, Backspace, . und : zulassen
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
' alle anderen Eingaben unterdrücken
|
||||||
|
e.Handled = True
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub btnSaveOben_Click(sender As Object, e As EventArgs) Handles btnSaveOben.Click
|
||||||
|
Try
|
||||||
|
Dim a As Date = Date.ParseExact(txtMRNDate.Text, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
Dim b As Date = Date.ParseExact(txtMRNTime.Text, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
|
||||||
|
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
||||||
|
MsgBox(ab.ToString)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtMRNDate.GotFocus, txtCRNDate.GotFocus, txtMRNTime.GotFocus, txtCRNTime.GotFocus
|
||||||
|
Select Case sender.name
|
||||||
|
Case "txtMRNDate"
|
||||||
|
If txtMRNDate.Text.Length < 1 Then txtMRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
|
Case "txtCRNDate"
|
||||||
|
If txtCRNDate.Text.Length < 1 Then txtCRNDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||||
|
Case "txtMRNTime"
|
||||||
|
If txtMRNTime.Text.Length < 1 Then txtMRNTime.Text = Date.Now.ToString("HH:mm")
|
||||||
|
Case "txtCRNTime"
|
||||||
|
If txtCRNTime.Text.Length < 1 Then txtCRNTime.Text = Date.Now.ToString("HH:mm")
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAddMRN_Click(sender As Object, e As EventArgs) Handles btnAddOpen.Click
|
||||||
|
Try
|
||||||
|
|
||||||
|
If Integer.Parse(setNullToZero(txtPos.Text)) > 1 Then
|
||||||
|
|
||||||
|
Dim limit As Integer = Integer.Parse(setNullToZero(txtPos.Text))
|
||||||
|
|
||||||
|
For count As Integer = 1 To limit
|
||||||
|
If (count > 1) Then txtMRNWarenwert.Text = 0
|
||||||
|
Dim OPENWithMultiplePosNr As New cSicherheiten()
|
||||||
|
|
||||||
|
With OPENWithMultiplePosNr
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = count
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
setEnviromentDataToObject(OPENWithMultiplePosNr, Me)
|
||||||
|
End With
|
||||||
|
|
||||||
|
If Neu = True AndAlso count <= 1 Then OPENWithMultiplePosNr.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(OPENWithMultiplePosNr.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
OPENWithMultiplePosNr.SAVE()
|
||||||
|
Case Else
|
||||||
|
If (count > 1) Then
|
||||||
|
OPENWithMultiplePosNr.SAVE()
|
||||||
|
Else
|
||||||
|
MsgBox("INFO: Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(OPENWithMultiplePosNr.gs_ATBNr, gessicherheitID) & "eingetragen") : OPENWithMultiplePosNr.SAVE()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
'Dim OPEN As New cSicherheiten(Me)
|
||||||
|
Dim OPEN As New cSicherheiten()
|
||||||
|
|
||||||
|
With OPEN
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = Integer.Parse(setNullToZero(txtPos.Text))
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
setEnviromentDataToObject(OPEN, Me)
|
||||||
|
End With
|
||||||
|
|
||||||
|
|
||||||
|
If Neu = True Then OPEN.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(OPEN.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
OPEN.SAVE()
|
||||||
|
Case Else
|
||||||
|
MsgBox("INFO: Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(OPEN.gs_ATBNr, gessicherheitID) & "eingetragen") : OPEN.SAVE()
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAddCRN_Click(sender As Object, e As EventArgs) Handles btnAddClose.Click
|
||||||
|
Try
|
||||||
|
'Dim Close As New cSicherheiten(Me)
|
||||||
|
Dim Close As New cSicherheiten()
|
||||||
|
With Close
|
||||||
|
.gs_ATBNr = txtCRN.Text
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
||||||
|
.gs_warenwert = Integer.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "CLOSE"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
.gs_erstellungsdatum = Me.datum
|
||||||
|
.gs_freitext = Me.txtFreitextClose.Text
|
||||||
|
.gs_saldo = GesSichRef.gsr_Saldo
|
||||||
|
End With
|
||||||
|
|
||||||
|
If Neu = True Then Close.gs_gsNr = AddNewGesamtSichNr()
|
||||||
|
|
||||||
|
Select Case checkIfExist(Close.gs_ATBNr, gessicherheitID)
|
||||||
|
Case "Neu"
|
||||||
|
Close.SAVE()
|
||||||
|
Case Else
|
||||||
|
MsgBox("Dieser Eintrag wurde bereits bei GesamtsichNr " & checkIfExist(Close.gs_ATBNr, gessicherheitID) & "eingetragen") : Exit Sub
|
||||||
|
End Select
|
||||||
|
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function setNullToZero(s As String, Optional type As String = "")
|
||||||
|
|
||||||
|
If s = "" Then
|
||||||
|
Dim zero As Double = 0
|
||||||
|
|
||||||
|
Return zero
|
||||||
|
Else
|
||||||
|
Return s
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Sub AfterButton()
|
||||||
|
GesSichRef.CalcSaldo()
|
||||||
|
LoadDGV()
|
||||||
|
EmptyTXT()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function AddNewGesamtSichNr() As Integer
|
||||||
|
Dim sqlq As String = "select MAX([gs_gsNr]) as MaxGesSich from tblGesamtsicherheit"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(sqlq, "AVISO", 100, True)
|
||||||
|
Dim LetzteGesSichNum As Integer = -1
|
||||||
|
If (dt.Rows(0).Item(0) IsNot DBNull.Value) Then
|
||||||
|
|
||||||
|
LetzteGesSichNum = dt.Rows(0).Item(0)
|
||||||
|
Me.gessicherheitID = LetzteGesSichNum + 1
|
||||||
|
Me.Neu = False
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Me.gessicherheitID
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub EmptyTXT()
|
||||||
|
Dim a As New List(Of Windows.Forms.Control)
|
||||||
|
For Each contr As Windows.Forms.Control In panOben.Controls
|
||||||
|
If contr.GetType.FullName = "System.Windows.Forms.TextBox" Then contr.Text = ""
|
||||||
|
Next
|
||||||
|
cboATR.SelectedItem = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function checkIfExist(KennnummerStr As String, Optional ByVal lkw As String = "") As String
|
||||||
|
If lkw = "" And Me.gessicherheitID > 0 Then lkw = gessicherheitID
|
||||||
|
|
||||||
|
Dim SQLString As String = "Select * from [tblGesamtsicherheit] where [gs_ATBNr] = '" & KennnummerStr & "'"
|
||||||
|
Dim dt As New DataTable
|
||||||
|
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
|
||||||
|
If dt.Rows.Count > 0 Then
|
||||||
|
Return dt.Rows(0).Item("gs_gsNr").ToString
|
||||||
|
Else
|
||||||
|
Return "Neu"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function DateTimeString2DateTimeKonvertinator(datum As String, uhrzeit As String) As DateTime
|
||||||
|
Try
|
||||||
|
Dim a As Date = Date.ParseExact(datum, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
Dim b As Date = Date.ParseExact(uhrzeit, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||||
|
|
||||||
|
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
||||||
|
Return ab
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
Return Date.Now
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click, btnSaveOben.Click
|
||||||
|
|
||||||
|
If checkMandatoryFieldsAreFilled() = False Then Exit Sub
|
||||||
|
|
||||||
|
Try
|
||||||
|
Me.FilialNummer = checkNothingValue(cboFiliale.SelectedItem, "Integer")
|
||||||
|
Catch
|
||||||
|
Me.FilialNummer = "0"
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
Me.warenortID = checkNothingValue(cboWarenort.SelectedItem, "String")
|
||||||
|
|
||||||
|
Catch
|
||||||
|
Me.warenortID = "-"
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Me.Abfertigungsnummer = txtAbfertNum.Text
|
||||||
|
Me.LKWID = txtLKWID.Text
|
||||||
|
|
||||||
|
If setNullToZero(Me.gessicherheitID) >= 0 Then
|
||||||
|
Dim sqlstring = "Update [tblGesamtsicherheit] set [gs_filialenNr] = '" & Me.FilialNummer & "', [gs_abfertigungsNr] = '" & Me.Abfertigungsnummer & "', [gs_LKWID] = '" & Me.LKWID & "', [gs_warenort] = '" & Me.warenortID & "' WHERE [gs_gsNr] = '" & Me.gessicherheitID & "' "
|
||||||
|
SQL.doSQL(sqlstring, "AVISO")
|
||||||
|
LoadDGV()
|
||||||
|
End If
|
||||||
|
|
||||||
|
panOben.Enabled = True : panOben.Enabled = True
|
||||||
|
panOverlay.Visible = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function checkNothingValue(obj As Object, Optional type As String = "String") As Object
|
||||||
|
Select Case type
|
||||||
|
Case "String"
|
||||||
|
If obj Is Nothing Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return obj.value.ToString
|
||||||
|
End If
|
||||||
|
Case "Integer"
|
||||||
|
If obj Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
Else
|
||||||
|
Return Integer.Parse(obj.value)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub dgvGesamtsicherheitMRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitMRN.CellDoubleClick
|
||||||
|
|
||||||
|
Dim Sicherh As New cSicherheiten(dgvGesamtsicherheitMRN.CurrentRow.Cells("gs_gsId").Value)
|
||||||
|
'Sicherh.Load(dgvGesamtsicherheitMRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
|
||||||
|
txtMRN.Text = Sicherh.gs_ATBNr
|
||||||
|
txtPos.Text = Sicherh.gs_posNr
|
||||||
|
txtMRNWarenwert.Text = Sicherh.gs_warenwert
|
||||||
|
txtFreitextOpen.Text = Sicherh.gs_freitext
|
||||||
|
cboATR.SelectedItem = Sicherh.gs_atr
|
||||||
|
txtMRNDate.Text = Sicherh.gs_erstellungsdatum.ToString("dd.MM.yyyy")
|
||||||
|
txtMRNTime.Text = Sicherh.gs_erstellungsdatum.ToString("HH:mm")
|
||||||
|
|
||||||
|
openopened = Sicherh
|
||||||
|
|
||||||
|
btnAddOpen.Visible = False
|
||||||
|
btnUpdateOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnUpdateOpen_Click(sender As Object, e As EventArgs) Handles btnUpdateOpen.Click
|
||||||
|
With openopened
|
||||||
|
.gs_ATBNr = txtMRN.Text
|
||||||
|
.gs_posNr = Double.Parse(setNullToZero(txtPos.Text))
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtMRNDate.Text, txtMRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtMRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtMRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "OPEN"
|
||||||
|
.gs_gsNr = Me.gessicherheitID
|
||||||
|
'.MakeDate = Me.MakeDate
|
||||||
|
.gs_freitext = Me.txtFreitextOpen.Text
|
||||||
|
'.saldo = GesSichRef.Saldo
|
||||||
|
.gs_atr = setNullToZero(cboATR.SelectedItem)
|
||||||
|
End With
|
||||||
|
openopened.SAVE()
|
||||||
|
btnUpdateOpen.Visible = False
|
||||||
|
btnAddOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteClose_Click(sender As Object, e As EventArgs) Handles btnUpdateClose.Click
|
||||||
|
With closedopened
|
||||||
|
.gs_ATBNr = txtCRN.Text
|
||||||
|
.gs_datum = DateTimeString2DateTimeKonvertinator(txtCRNDate.Text, txtCRNTime.Text)
|
||||||
|
.gs_warenwert = Double.Parse(txtCRNWarenwert.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_sicherheitsbetrag = Double.Parse(txtCRNSicherheitsbetrag.Text) '.Replace(".", "").Replace(",", ".")
|
||||||
|
.gs_standort = Me.Standort
|
||||||
|
.gs_art = "CLOSE"
|
||||||
|
.gs_freitext = Me.txtFreitextClose.Text
|
||||||
|
End With
|
||||||
|
closedopened.SAVE()
|
||||||
|
btnAddClose.Visible = True
|
||||||
|
btnUpdateClose.Visible = False
|
||||||
|
btnDeleteClose.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub dgvGesamtsicherheitCRN_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGesamtsicherheitCRN.CellDoubleClick
|
||||||
|
|
||||||
|
Dim Sicherh As New cSicherheiten(dgvGesamtsicherheitCRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
'Sicherh.Load(dgvGesamtsicherheitCRN.CurrentRow.Cells("GesamtSichID").Value)
|
||||||
|
|
||||||
|
txtCRN.Text = Sicherh.gs_ATBNr
|
||||||
|
txtCRNWarenwert.Text = Sicherh.gs_warenwert
|
||||||
|
txtFreitextClose.Text = Sicherh.gs_freitext
|
||||||
|
txtCRNDate.Text = Sicherh.gs_erstellungsdatum.ToString("dd.MM.yyyy")
|
||||||
|
txtCRNTime.Text = Sicherh.gs_erstellungsdatum.ToString("HH:mm")
|
||||||
|
|
||||||
|
closedopened = Sicherh
|
||||||
|
|
||||||
|
btnDeleteClose.Visible = True
|
||||||
|
btnAddClose.Visible = False
|
||||||
|
btnUpdateClose.Visible = True
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteOpen_Click(sender As Object, e As EventArgs) Handles btnDeleteOpen.Click
|
||||||
|
Try
|
||||||
|
openopened.Delete()
|
||||||
|
btnUpdateOpen.Visible = False
|
||||||
|
btnAddOpen.Visible = True
|
||||||
|
btnDeleteOpen.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDeleteClose_Click_1(sender As Object, e As EventArgs) Handles btnDeleteClose.Click
|
||||||
|
Try
|
||||||
|
closedopened.Delete()
|
||||||
|
btnUpdateClose.Visible = False
|
||||||
|
btnAddClose.Visible = True
|
||||||
|
btnDeleteClose.Visible = False
|
||||||
|
AfterButton()
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox(ex.Message)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lblGestellungNr_Click(sender As Object, e As EventArgs) Handles lblGestellungNr.DoubleClick
|
||||||
|
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)
|
||||||
|
cboFiliale.SelectedIndex = cboFiliale.FindString(Me.FilialNummer)
|
||||||
|
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.SelectedIndex = cboWarenort.FindString(Me.warenortID)
|
||||||
|
txtAbfertNum.Text = Me.Abfertigungsnummer
|
||||||
|
txtLKWID.Text = Me.LKWID
|
||||||
|
panOben.Enabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnClosePanOverlay_Click(sender As Object, e As EventArgs) Handles btnClosePanOverlay.Click
|
||||||
|
Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function checkMandatoryFieldsAreFilled() As Boolean
|
||||||
|
Dim isFilled = True
|
||||||
|
|
||||||
|
If cboWarenort._value = Nothing Or cboWarenort._value = "" Then
|
||||||
|
|
||||||
|
MsgBox("Bitte Warenort angeben!")
|
||||||
|
isFilled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return isFilled
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub setEnviromentDataToObject(sicherheiten As cSicherheiten, Optional ByVal gessich As frmGesamtsicherheitenNEU = Nothing)
|
||||||
|
|
||||||
|
sicherheiten.gs_filialenNr = gessich.FilialNummer
|
||||||
|
sicherheiten.gs_abfertigungsnr = gessich.Abfertigungsnummer
|
||||||
|
sicherheiten.gs_LKWID = gessich.LKWID
|
||||||
|
sicherheiten.gs_warenort = gessich.warenortID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ClosedErzeugenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClosedErzeugenToolStripMenuItem.Click
|
||||||
|
MsgBox("")
|
||||||
|
End Sub
|
||||||
|
Sub initBtns(MonatJahr)
|
||||||
|
btnMonat.Text = MONAT.ToString("MMMM")
|
||||||
|
btnJahr.Text = JAHR.Year
|
||||||
|
Select Case MonatJahr
|
||||||
|
Case "Monat"
|
||||||
|
DateTimePicker1.Value = MONAT
|
||||||
|
DateTimePicker2.Value = MONAT.AddMonths(1).AddDays(-1)
|
||||||
|
Case "Jahr"
|
||||||
|
' If cbxGeschaftsjahr.Checked Then
|
||||||
|
'DateTimePicker1.Value = JAHR.AddMonths(1)
|
||||||
|
' DateTimePicker2.Value = JAHR.AddYears(1).AddMonths(1).AddDays(-1)
|
||||||
|
' Else
|
||||||
|
DateTimePicker1.Value = JAHR
|
||||||
|
DateTimePicker2.Value = JAHR.AddYears(1).AddDays(-1)
|
||||||
|
'End If
|
||||||
|
Case "Tag"
|
||||||
|
' If cbxGeschaftsjahr.Checked Then
|
||||||
|
'DateTimePicker1.Value = JAHR.AddMonths(1)
|
||||||
|
' DateTimePicker2.Value = JAHR.AddYears(1).AddMonths(1).AddDays(-1)
|
||||||
|
' Else
|
||||||
|
DateTimePicker1.Value = srcTAG
|
||||||
|
DateTimePicker2.Value = srcTAG
|
||||||
|
If srcTAG = Now.ToShortDateString Then
|
||||||
|
Button5.Text = "Heute"
|
||||||
|
ElseIf srcTAG = Now.AddDays(-1).ToShortDateString Then
|
||||||
|
Button5.Text = "Gestern"
|
||||||
|
ElseIf srcTAG = Now.AddDays(-2).ToShortDateString Then
|
||||||
|
Button5.Text = "Vorgestern"
|
||||||
|
Else
|
||||||
|
Button5.Text = srcTAG.ToString("dd.MM")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'End If
|
||||||
|
Case ""
|
||||||
|
DateTimePicker1.Value = ("01." & Now.Month & "." & Now.Year)
|
||||||
|
DateTimePicker2.Value = Now
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub btnJahr_Click(sender As Object, e As EventArgs) Handles btnJahr.Click
|
||||||
|
initBtns("Jahr")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnBisMonat_Click(sender As Object, e As EventArgs) Handles btnBisMonat.Click
|
||||||
|
MONAT = MONAT.AddMonths(1)
|
||||||
|
initBtns("Monat")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnVonMonat_Click(sender As Object, e As EventArgs) Handles btnVonMonat.Click
|
||||||
|
MONAT = MONAT.AddMonths(-1)
|
||||||
|
initBtns("Monat")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnBisJahr_Click(sender As Object, e As EventArgs) Handles btnBisJahr.Click
|
||||||
|
JAHR = JAHR.AddYears(1)
|
||||||
|
initBtns("Jahr")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
|
||||||
|
txtDatVon._value = CDate(sender.value).ToShortDateString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker2.ValueChanged
|
||||||
|
txtDatBis._value = CDate(sender.value).ToShortDateString
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
@@ -3992,25 +3992,25 @@ Public Class frmHauptfenster
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ATGesamtsicherheitVeragAGToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitVeragAGToolStripMenuItem.Click
|
Private Sub ATGesamtsicherheitVeragAGToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitVeragAGToolStripMenuItem.Click
|
||||||
Dim frm As New frmGesSichMenu
|
Dim frm As New frmGesamtsicherheitenMenu
|
||||||
frm.Standort = "VERAG AG"
|
frm.Standort = "VERAG AG"
|
||||||
frm.Show()
|
frm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DEGesamtsicherheitVeragGmbHToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DEGesamtsicherheitVeragGmbHToolStripMenuItem.Click
|
Private Sub DEGesamtsicherheitVeragGmbHToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DEGesamtsicherheitVeragGmbHToolStripMenuItem.Click
|
||||||
Dim frm As New frmGesSichMenu
|
Dim frm As New frmGesamtsicherheitenMenu
|
||||||
frm.Standort = "Verag GmbH"
|
frm.Standort = "Verag GmbH"
|
||||||
frm.Show()
|
frm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ATGesamtsicherheitIMEXCSGmbHToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitIMEXCSGmbHToolStripMenuItem.Click
|
Private Sub ATGesamtsicherheitIMEXCSGmbHToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitIMEXCSGmbHToolStripMenuItem.Click
|
||||||
Dim frm As New frmGesSichMenu
|
Dim frm As New frmGesamtsicherheitenMenu
|
||||||
frm.Standort = "IMEX"
|
frm.Standort = "IMEX"
|
||||||
frm.Show()
|
frm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ATGesamtsicherheitVeragCSToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitVeragCSToolStripMenuItem.Click
|
Private Sub ATGesamtsicherheitVeragCSToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ATGesamtsicherheitVeragCSToolStripMenuItem.Click
|
||||||
Dim frm As New frmGesSichMenu
|
Dim frm As New frmGesamtsicherheitenMenu
|
||||||
frm.Standort = "Verag CS"
|
frm.Standort = "Verag CS"
|
||||||
frm.Show()
|
frm.Show()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
44
Aviso/frmSendungsdetailsNEU.Designer.vb
generated
44
Aviso/frmSendungsdetailsNEU.Designer.vb
generated
@@ -114,9 +114,9 @@ Partial Class frmSendungsdetailsNEU
|
|||||||
Me.pnlDetails = New System.Windows.Forms.Panel()
|
Me.pnlDetails = New System.Windows.Forms.Panel()
|
||||||
Me.tbcntr = New System.Windows.Forms.TabControl()
|
Me.tbcntr = New System.Windows.Forms.TabControl()
|
||||||
Me.TabPage4 = New System.Windows.Forms.TabPage()
|
Me.TabPage4 = New System.Windows.Forms.TabPage()
|
||||||
Me.Button18 = New System.Windows.Forms.Button()
|
|
||||||
Me.txtFrachtkostenGesamt = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
|
||||||
Me.Label10 = New System.Windows.Forms.Label()
|
Me.Label10 = New System.Windows.Forms.Label()
|
||||||
|
Me.btn_FrachtkostenBerechnen = New System.Windows.Forms.Button()
|
||||||
|
Me.txtFrachtkostenGesamt = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
Me.Label6 = New System.Windows.Forms.Label()
|
Me.Label6 = New System.Windows.Forms.Label()
|
||||||
Me.Label1 = New System.Windows.Forms.Label()
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
Me.txtFrachtkostenNichtEU = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
Me.txtFrachtkostenNichtEU = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
@@ -1503,7 +1503,7 @@ Partial Class frmSendungsdetailsNEU
|
|||||||
'TabPage4
|
'TabPage4
|
||||||
'
|
'
|
||||||
Me.TabPage4.Controls.Add(Me.Label10)
|
Me.TabPage4.Controls.Add(Me.Label10)
|
||||||
Me.TabPage4.Controls.Add(Me.Button18)
|
Me.TabPage4.Controls.Add(Me.btn_FrachtkostenBerechnen)
|
||||||
Me.TabPage4.Controls.Add(Me.txtFrachtkostenGesamt)
|
Me.TabPage4.Controls.Add(Me.txtFrachtkostenGesamt)
|
||||||
Me.TabPage4.Controls.Add(Me.Label6)
|
Me.TabPage4.Controls.Add(Me.Label6)
|
||||||
Me.TabPage4.Controls.Add(Me.Label1)
|
Me.TabPage4.Controls.Add(Me.Label1)
|
||||||
@@ -1543,15 +1543,25 @@ Partial Class frmSendungsdetailsNEU
|
|||||||
Me.TabPage4.Text = "Aktendeckel"
|
Me.TabPage4.Text = "Aktendeckel"
|
||||||
Me.TabPage4.UseVisualStyleBackColor = True
|
Me.TabPage4.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'Button18
|
'Label10
|
||||||
'
|
'
|
||||||
Me.Button18.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Label10.AutoSize = True
|
||||||
Me.Button18.Location = New System.Drawing.Point(269, 76)
|
Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!)
|
||||||
Me.Button18.Name = "Button18"
|
Me.Label10.Location = New System.Drawing.Point(383, 43)
|
||||||
Me.Button18.Size = New System.Drawing.Size(156, 21)
|
Me.Label10.Name = "Label10"
|
||||||
Me.Button18.TabIndex = 60
|
Me.Label10.Size = New System.Drawing.Size(43, 13)
|
||||||
Me.Button18.Text = "berechnen"
|
Me.Label10.TabIndex = 62
|
||||||
Me.Button18.UseVisualStyleBackColor = True
|
Me.Label10.Text = "Gesamt"
|
||||||
|
'
|
||||||
|
'btn_FrachtkostenBerechnen
|
||||||
|
'
|
||||||
|
Me.btn_FrachtkostenBerechnen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.btn_FrachtkostenBerechnen.Location = New System.Drawing.Point(269, 76)
|
||||||
|
Me.btn_FrachtkostenBerechnen.Name = "btn_FrachtkostenBerechnen"
|
||||||
|
Me.btn_FrachtkostenBerechnen.Size = New System.Drawing.Size(156, 21)
|
||||||
|
Me.btn_FrachtkostenBerechnen.TabIndex = 60
|
||||||
|
Me.btn_FrachtkostenBerechnen.Text = "berechnen"
|
||||||
|
Me.btn_FrachtkostenBerechnen.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'txtFrachtkostenGesamt
|
'txtFrachtkostenGesamt
|
||||||
'
|
'
|
||||||
@@ -1577,16 +1587,6 @@ Partial Class frmSendungsdetailsNEU
|
|||||||
Me.txtFrachtkostenGesamt.TabIndex = 61
|
Me.txtFrachtkostenGesamt.TabIndex = 61
|
||||||
Me.txtFrachtkostenGesamt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
Me.txtFrachtkostenGesamt.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||||
'
|
'
|
||||||
'Label10
|
|
||||||
'
|
|
||||||
Me.Label10.AutoSize = True
|
|
||||||
Me.Label10.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!)
|
|
||||||
Me.Label10.Location = New System.Drawing.Point(383, 43)
|
|
||||||
Me.Label10.Name = "Label10"
|
|
||||||
Me.Label10.Size = New System.Drawing.Size(43, 13)
|
|
||||||
Me.Label10.TabIndex = 62
|
|
||||||
Me.Label10.Text = "Gesamt"
|
|
||||||
'
|
|
||||||
'Label6
|
'Label6
|
||||||
'
|
'
|
||||||
Me.Label6.AutoSize = True
|
Me.Label6.AutoSize = True
|
||||||
@@ -5570,7 +5570,7 @@ Partial Class frmSendungsdetailsNEU
|
|||||||
Friend WithEvents txtFrachtkostenNichtEU As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtFrachtkostenNichtEU As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
Friend WithEvents Label6 As Label
|
Friend WithEvents Label6 As Label
|
||||||
Friend WithEvents Label7 As Label
|
Friend WithEvents Label7 As Label
|
||||||
Friend WithEvents Button18 As Button
|
Friend WithEvents btn_FrachtkostenBerechnen As Button
|
||||||
Friend WithEvents txtFrachtkostenGesamt As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtFrachtkostenGesamt As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
Friend WithEvents Label10 As Label
|
Friend WithEvents Label10 As Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -5377,11 +5377,12 @@ Public Class frmSendungsdetailsNEU
|
|||||||
If frachkosten.ShowDialog() = DialogResult.OK Then
|
If frachkosten.ShowDialog() = DialogResult.OK Then
|
||||||
txtFrachtkostenEU._value = frachkosten.EUAnteil
|
txtFrachtkostenEU._value = frachkosten.EUAnteil
|
||||||
txtFrachtkostenNichtEU._value = frachkosten.nichtEUAnteil
|
txtFrachtkostenNichtEU._value = frachkosten.nichtEUAnteil
|
||||||
|
txtFrachtkostenGesamt._value = frachkosten.tbxGesamtfrachtkosten._value
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button18_Click_1(sender As Object, e As EventArgs) Handles Button18.Click
|
Private Sub btn_FrachtkostenBerechnen_Click(sender As Object, e As EventArgs) Handles btn_FrachtkostenBerechnen.Click
|
||||||
|
|
||||||
If txtFrachtkostenGesamt.Text = "" AndAlso txtGewicht.Text = "" Then
|
If txtFrachtkostenGesamt.Text = "" AndAlso txtGewicht.Text = "" Then
|
||||||
MsgBox("Bitte Gewicht oder Gesamtfrachtkosten angeben!")
|
MsgBox("Bitte Gewicht oder Gesamtfrachtkosten angeben!")
|
||||||
|
|||||||
Reference in New Issue
Block a user