Gesamtsicherheiten, NewButton, GUI-Änderungen
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Linq.Expressions
|
||||
Imports Chilkat
|
||||
Imports DocumentFormat.OpenXml.Presentation
|
||||
Imports GrapeCity.Viewer.Common.Model
|
||||
Imports Org.BouncyCastle.Cms
|
||||
Imports Spire.PdfViewer.Forms
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmGesamtsicherheitenNEU
|
||||
@@ -90,6 +83,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Me.Text = "Gesamtsicherheit " & Standort
|
||||
frmHauptfenster.EnableDoubleBuffered(dgvSicherheitsPos)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -398,10 +392,9 @@ Public Class frmGesamtsicherheitenNEU
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub Date_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtPosDate.KeyPress, txtSicherheitDate.KeyPress, txtDatumaendern.KeyPress
|
||||
Private Sub Date_Keypresses(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles txtPosDat.KeyPress, txtSicherheitDat.KeyPress, txtDatumaendern.KeyPress
|
||||
Select Case Asc(e.KeyChar)
|
||||
Case 48 To 57, 8, 46, 58
|
||||
|
||||
' Zahlen, Backspace, . und : zulassen
|
||||
|
||||
Case Else
|
||||
@@ -419,23 +412,17 @@ Public Class frmGesamtsicherheitenNEU
|
||||
' alle anderen Eingaben unterdrücken
|
||||
e.Handled = True
|
||||
End Select
|
||||
|
||||
txtPosTime.Text = Replace(txtPosTime.Text, ".", ":")
|
||||
txtPosTime.Select(txtPosTime.Text.Length + 1, 1)
|
||||
txtSicherheitTime.Text = Replace(txtSicherheitTime.Text, ".", ":")
|
||||
txtSicherheitTime.Select(txtPosTime.Text.Length + 1, 1)
|
||||
txtUhrzeitaendern.Text = Replace(txtUhrzeitaendern.Text, ".", ":")
|
||||
txtUhrzeitaendern.Select(txtPosTime.Text.Length + 1, 1)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtSicherheitDate.GotFocus, txtPosDate.GotFocus, txtSicherheitTime.GotFocus, txtPosTime.GotFocus, txtUhrzeitaendern.GotFocus, txtDatumaendern.GotFocus
|
||||
Private Sub txtMRNDate_GotFocus(sender As Object, e As EventArgs) Handles txtSicherheitDat.GotFocus, txtSicherheitTime.GotFocus, txtPosTime.GotFocus, txtUhrzeitaendern.GotFocus, txtDatumaendern.GotFocus
|
||||
Select Case sender.name
|
||||
Case "txtSicherheitDate"
|
||||
If txtSicherheitDate.Text.Length < 1 Then txtSicherheitDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
Case "txtPosDate"
|
||||
If txtPosDate.Text.Length < 1 Then txtPosDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
Case "txtSicherheitDat"
|
||||
If txtSicherheitDat.Text.Length < 1 Then txtSicherheitDat.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
'Case "txtPosDate"
|
||||
' If txtPosDate.Text.Length < 1 Then txtPosDate.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
Case "txtPosDat"
|
||||
If txtPosDat.Text.Length < 1 Then txtPosDat.Text = Date.Today.ToString("dd.MM.yyyy")
|
||||
Case "txtSicherheitTime"
|
||||
If txtSicherheitTime.Text.Length < 1 Then txtSicherheitTime.Text = Date.Now.ToString("HH:mm")
|
||||
Case "txtPosTime"
|
||||
@@ -484,7 +471,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
.gs_gsNr = gessicherheitID
|
||||
.gs_ATBNr = txtSicherheitATBNr.Text
|
||||
.gs_posNr = count
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtSicherheitDate.Text, txtSicherheitTime.Text)
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtSicherheitDat.Text, txtSicherheitTime.Text)
|
||||
.gs_warenwert = warenwert
|
||||
.gs_sicherheitsbetrag = sicherheitsbetrag
|
||||
.gs_standort = Me.Standort
|
||||
@@ -570,7 +557,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
.gs_gsNr = gessicherheitID
|
||||
.gs_ATBNr = ""
|
||||
.gs_posNr = Me.getLatestPosNr(currentSicherheit.gs_gsNr, currentSicherheit.gs_ATBNr) + 1
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtPosDate.Text, txtPosTime.Text)
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtPosDat.Text, txtPosTime.Text)
|
||||
.gs_warenwert = 0
|
||||
.gs_sicherheitsbetrag = 0
|
||||
.gs_standort = Me.Standort
|
||||
@@ -598,7 +585,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
.gsp_art = "CLOSE"
|
||||
.gsp_gsNr = gessicherheitID
|
||||
.gsp_abfertigungsNr = currentSicherheit.gs_abfertigungsnr
|
||||
.gsp_datum = DateTimeString2DateTimeKonvertinator(txtPosDate.Text, txtPosTime.Text)
|
||||
.gsp_datum = DateTimeString2DateTimeKonvertinator(txtPosDat.Text, txtPosTime.Text)
|
||||
.gsp_erstellungsdatum = DateTime.Now
|
||||
.gsp_ust = currentSicherheit.gs_ust
|
||||
.gsp_ATCNr = txtPositionenCRN.Text
|
||||
@@ -648,7 +635,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
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 = ""
|
||||
If contr.GetType.FullName = "System.Windows.Forms.TextBox" Or contr.GetType.FullName = "VERAG_PROG_ALLGEMEIN.MyTextBox" Then contr.Text = ""
|
||||
Next
|
||||
cboSicherheitATR.SelectedItem = Nothing
|
||||
End Sub
|
||||
@@ -760,7 +747,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
txtSicherheitWarenwert.Text = Sicherh.gs_warenwert
|
||||
txtSicherheitFreitext.Text = Sicherh.gs_freitext
|
||||
cboSicherheitATR.SelectedItem = Sicherh.gs_atr
|
||||
txtSicherheitDate.Text = Sicherh.gs_datum.ToString("dd.MM.yyyy")
|
||||
txtSicherheitDat.Text = Sicherh.gs_datum.ToString("dd.MM.yyyy")
|
||||
txtSicherheitTime.Text = Sicherh.gs_datum.ToString("HH:mm")
|
||||
|
||||
currentSicherheit = Sicherh
|
||||
@@ -782,7 +769,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
With currentSicherheit
|
||||
.gs_ATBNr = txtSicherheitATBNr.Text
|
||||
.gs_posNr = Integer.Parse(setNullToZero(txtAnzahlPos.Text))
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtSicherheitDate.Text, txtSicherheitTime.Text)
|
||||
.gs_datum = DateTimeString2DateTimeKonvertinator(txtSicherheitDat.Text, txtSicherheitTime.Text)
|
||||
.gs_warenwert = Double.Parse(txtSicherheitWarenwert.Text)
|
||||
.gs_sicherheitsbetrag = Double.Parse(txtSicherheitSicherheitsbetrag.Text)
|
||||
.gs_standort = Me.Standort
|
||||
@@ -812,8 +799,8 @@ Public Class frmGesamtsicherheitenNEU
|
||||
.gsp_warenwert = Double.Parse(txtPosWarenwert.Text)
|
||||
.gsp_ATCNr = If(txtPositionenCRN.Text <> "", txtPositionenCRN.Text, Nothing)
|
||||
|
||||
If txtPosDate.Text <> "" AndAlso txtPosTime.Text <> "" Then
|
||||
.gsp_datum = DateTimeString2DateTimeKonvertinator(txtPosDate.Text, txtPosTime.Text)
|
||||
If txtPosDat.Text <> "" AndAlso txtPosTime.Text <> "" Then
|
||||
.gsp_datum = DateTimeString2DateTimeKonvertinator(txtPosDat.Text, txtPosTime.Text)
|
||||
Else
|
||||
.gsp_datum = Nothing
|
||||
End If
|
||||
@@ -841,7 +828,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Try
|
||||
If sPos.gsp_datum IsNot Nothing Then
|
||||
txtPosDate.Text = CDate(sPos.gsp_datum).ToString("dd.MM.yyyy")
|
||||
txtPosDat.Text = CDate(sPos.gsp_datum).ToString("dd.MM.yyyy")
|
||||
txtPosTime.Text = CDate(sPos.gsp_datum).ToString("HH:mm")
|
||||
End If
|
||||
|
||||
@@ -1278,7 +1265,7 @@ Public Class frmGesamtsicherheitenNEU
|
||||
|
||||
Private Sub btnSaveDatetime_Click(sender As Object, e As EventArgs) Handles btnSaveDatetime.Click
|
||||
Try
|
||||
Dim a As Date = Date.ParseExact(txtSicherheitDate.Text, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
Dim a As Date = Date.ParseExact(txtSicherheitDat.Text, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
Dim b As Date = Date.ParseExact(txtSicherheitTime.Text, "HH:mm", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
|
||||
Dim ab As Date = a.AddHours(b.Hour).AddMinutes(b.Minute)
|
||||
@@ -1516,12 +1503,48 @@ Public Class frmGesamtsicherheitenNEU
|
||||
End Sub
|
||||
|
||||
Private Sub btnNew_Click(sender As Object, e As EventArgs) Handles btnNew.Click
|
||||
Me.Close()
|
||||
|
||||
'Dim frm As New frmGesamtsicherheitenMenuNEU
|
||||
'frm.Standort = Me.Standort
|
||||
'frm.btnNeu.PerformClick()
|
||||
|
||||
If Not System.Windows.Forms.Application.OpenForms.Item("frmGesamtsicherheitenMenuNEU") Is Nothing Then
|
||||
Dim p = System.Windows.Forms.Application.OpenForms.Item("frmGesamtsicherheitenMenuNEU")
|
||||
DirectCast(p, frmGesamtsicherheitenMenuNEU).btnNeu.PerformClick()
|
||||
Me.Close()
|
||||
Me.Cursor = Cursors.Default : Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dtpSicherheitDat_ValueChanged(sender As Object, e As EventArgs) Handles dtpSicherheitDat.ValueChanged
|
||||
txtSicherheitDat._value = CDate(sender.value).ToShortDateString
|
||||
End Sub
|
||||
|
||||
Private Sub dtpPosDat_ValueChanged(sender As Object, e As EventArgs) Handles dtpPosDat.ValueChanged
|
||||
txtPosDat._value = CDate(sender.value).ToShortDateString
|
||||
End Sub
|
||||
|
||||
Private Sub txtPosTime_Leave(sender As Object, e As EventArgs) Handles txtPosTime.Leave, txtSicherheitTime.Leave, txtUhrzeitaendern.Leave
|
||||
|
||||
If txtPosTime.Text <> "" Then
|
||||
txtPosTime.Text = Replace(txtPosTime.Text, ".", ":")
|
||||
End If
|
||||
|
||||
If txtSicherheitTime.Text <> "" Then
|
||||
txtSicherheitTime.Text = Replace(txtSicherheitTime.Text, ".", ":")
|
||||
End If
|
||||
|
||||
If txtUhrzeitaendern.Text <> "" Then
|
||||
txtUhrzeitaendern.Text = Replace(txtUhrzeitaendern.Text, ".", ":")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txtSicherheitFreitext_TextChanged(sender As Object, e As EventArgs) Handles txtSicherheitFreitext.TextChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Label6_Click(sender As Object, e As EventArgs) Handles Label6.Click
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user