MS Änderungen 11.06
This commit is contained in:
@@ -31,8 +31,16 @@ Public Class frmMain
|
||||
Application.Exit()
|
||||
End If
|
||||
Try
|
||||
'If (System.Diagnostics.Debugger.IsAttached) = False Then
|
||||
My.Settings.ConfigConnectionString = "Data Source=192.168.13.101;Initial Catalog=SCHAUM_IID;Persist Security Info=True;User ID=sa;Password=dd"
|
||||
My.Settings.ConfigConnStringMercator = "Data Source=192.168.13.101;Initial Catalog=CP2DD;Persist Security Info=True;User ID=sa;Password=dd"
|
||||
My.Settings.Save()
|
||||
' End If
|
||||
tslblConString.Text = "Constrings: " & My.Settings.ConfigConnectionString.Replace("=sa;Password=dd", "XXX") & " # " & My.Settings.ConfigConnStringMercator.Replace("=sa;Password=dd", "XXX")
|
||||
Me.TBWH_MANDANTTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
Me.TBKOMMCOLLI_PAKET_KOPFTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
Me.TBKOMMCOLLI_PAKET_POSTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
|
||||
Me.TBKOMMCOLLI_TERMINARTTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
Me.TBKOMMCOLLI_SDGPOSITIONENTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
TBKOMMCOLLI_TEXTSCHLUESSELTableAdapter.Connection.ConnectionString = My.Settings.ConfigConnectionString
|
||||
@@ -91,6 +99,7 @@ Public Class frmMain
|
||||
If cmbAuswMandant.SelectedValue = 0 Then
|
||||
|
||||
Else
|
||||
|
||||
TBKOMMCOLLI_PAKET_POSTableAdapter.Insert(CURRENT_SENDUNG, BC)
|
||||
TBKOMMCOLLI_PAKET_KOPFTableAdapter.Fill(MyDataset.TBKOMMCOLLI_PAKET_KOPF, CURRENT_SENDUNG)
|
||||
Refresh_Barcodes()
|
||||
@@ -101,7 +110,7 @@ Public Class frmMain
|
||||
If ex.Message.Contains("UNIQ_BARCODE_PER_POS") Then
|
||||
ShowError("ACHTUNG der Barcode wurde bereits einmal eingescannt!")
|
||||
Else
|
||||
ShowError("Fehler in AddBarcode: " & vbNewLine & ex.Message)
|
||||
ShowError("Fehler in AddBarcode: " & vbNewLine & ex.Message & vbNewLine & My.Settings.ConfigConnectionString)
|
||||
End If
|
||||
|
||||
End Try
|
||||
@@ -173,48 +182,52 @@ Public Class frmMain
|
||||
CURR_Str = MERC_LIEFSTR
|
||||
End If
|
||||
If CURR_LIEFADR <> MERC_LIEFADR1 Or CURR_PLZ <> MERC_LIEFPLZ Or CURR_Str <> MERC_LIEFSTR Or CURR_Ort <> MERC_LIEFORT Then
|
||||
MsgBox("ACHTUNG: " & vbNewLine & "Die Adressdaten sind unterschiedlich!", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
' Fragen ob das Profil wirklich gelöscht werden soll
|
||||
Dim result As MsgBoxResult = MsgBox("Die Adressen sind unterschiedlich!" & vbNewLine & "Wollen Sie den Lieferschein dennoch hinzufügen?" & vbNewLine & "Wenn ja, dann kontrollieren Sie bitte die Adresse!", MsgBoxStyle.YesNo, "Bitte bestätigen:")
|
||||
' wenn das Profil gelöscht werden soll
|
||||
If result = MsgBoxResult.No Then
|
||||
' MsgBox("ACHTUNG: " & vbNewLine & "Die Adressdaten sind unterschiedlich!", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim Upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET KUNDEN_ID = '{0}',NAME1 = '{1}',NAME2 = '{2}',STRASSE = '{3}',LKZ = '{4}',PLZ = '{5}',ORT = '{6}' WHERE GUID = {7}", MERC_KDNR, MERC_LIEFADR1, MERC_LIEFADR2, MERC_LIEFSTR, MERC_LIEFLAND, MERC_LIEFPLZ, MERC_LIEFORT, CURRENT_SENDUNG)
|
||||
If ClassDatabase.Execute_non_Query(Upd, True) = True Then
|
||||
Dim exists = String.Format("SELECT COUNT(*) FROM TBKOMMCOLLI_SDG_LHM WHERE SENDUNGNR = {0} AND FERTIG = 0", CURRENT_SENDUNG)
|
||||
Dim LHM_exists As Boolean = False
|
||||
If ClassDatabase.Execute_Scalar(exists, True) >= 1 Then
|
||||
LHM_exists = True
|
||||
End If
|
||||
If LHM_exists = False Then
|
||||
Dim ins = String.Format("INSERT INTO TBKOMMCOLLI_SDG_LHM (SENDUNGNR,LHM_ID,ERSTELLTWER) VALUES ({0},{1},'{2}')", CURRENT_SENDUNG, aktLHM_ID, Environment.UserName)
|
||||
If ClassDatabase.Execute_non_Query(ins, True) = True Then
|
||||
|
||||
End If
|
||||
End If
|
||||
aktLHM_SDG_ID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBKOMMCOLLI_SDG_LHM WHERE FERTIG = 0", True)
|
||||
If aktLHM_SDG_ID > 0 Then
|
||||
btnPalfertig.Text = "Palette (" & aktLHM_SDG_ID.ToString & ", " & cmbLHM.Text & ") fertig"
|
||||
MERC_GEWICHT = MERC_GEWICHT.ToString.Replace(",", ".")
|
||||
Dim ins = String.Format("INSERT INTO TBKOMMCOLLI_SDGPOSITIONEN (SENDUNGNR,SDG_LHM_ID,GEWICHT,ERSTELLTWER) VALUES ({0},{1},{2},'{3}')", CURRENT_SENDUNG, aktLHM_SDG_ID, MERC_GEWICHT, Environment.UserName)
|
||||
If ClassDatabase.Execute_non_Query(ins, True) = True Then
|
||||
'cmbLHM.Enabled = False
|
||||
Refresh_POS(CURRENT_SENDUNG)
|
||||
End If
|
||||
End If
|
||||
|
||||
If txtFreitext.Text <> "" Then
|
||||
Upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET BEMERKUNG = '{0}' WHERE GUID = {1}", txtFreitext.Text & ", " & _LS_no, CURRENT_SENDUNG)
|
||||
|
||||
Else
|
||||
Upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET BEMERKUNG = '{0}' WHERE GUID = {1}", _LS_no, CURRENT_SENDUNG)
|
||||
End If
|
||||
If ClassDatabase.Execute_non_Query(Upd, True) = True Then
|
||||
txtFreitext.Text = ClassDatabase.Execute_Scalar("SELECT BEMERKUNG FROM TBKOMMCOLLI_SENDUNGEN WHERE GUID = " & CURRENT_SENDUNG, True)
|
||||
Dim exists = String.Format("SELECT COUNT(*) FROM TBKOMMCOLLI_SDG_LHM WHERE SENDUNGNR = {0} AND FERTIG = 0", CURRENT_SENDUNG)
|
||||
Dim LHM_exists As Boolean = False
|
||||
If ClassDatabase.Execute_Scalar(exists, True) >= 1 Then
|
||||
LHM_exists = True
|
||||
End If
|
||||
If LHM_exists = False Then
|
||||
Dim ins = String.Format("INSERT INTO TBKOMMCOLLI_SDG_LHM (SENDUNGNR,LHM_ID,ERSTELLTWER) VALUES ({0},{1},'{2}')", CURRENT_SENDUNG, aktLHM_ID, Environment.UserName)
|
||||
If ClassDatabase.Execute_non_Query(ins, True) = True Then
|
||||
|
||||
End If
|
||||
End If
|
||||
aktLHM_SDG_ID = ClassDatabase.Execute_Scalar("SELECT MAX(GUID) FROM TBKOMMCOLLI_SDG_LHM WHERE FERTIG = 0", True)
|
||||
If aktLHM_SDG_ID > 0 Then
|
||||
btnPalfertig.Text = "Palette (" & aktLHM_SDG_ID.ToString & ", " & cmbLHM.Text & ") fertig"
|
||||
MERC_GEWICHT = MERC_GEWICHT.ToString.Replace(",", ".")
|
||||
Dim ins = String.Format("INSERT INTO TBKOMMCOLLI_SDGPOSITIONEN (SENDUNGNR,SDG_LHM_ID,GEWICHT,ERSTELLTWER) VALUES ({0},{1},{2},'{3}')", CURRENT_SENDUNG, aktLHM_SDG_ID, MERC_GEWICHT, Environment.UserName)
|
||||
If ClassDatabase.Execute_non_Query(ins, True) = True Then
|
||||
'cmbLHM.Enabled = False
|
||||
Refresh_POS(CURRENT_SENDUNG)
|
||||
End If
|
||||
End If
|
||||
|
||||
If txtFreitext.Text <> "" Then
|
||||
Upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET BEMERKUNG = '{0}' WHERE GUID = {1}", txtFreitext.Text & ", " & _LS_no, CURRENT_SENDUNG)
|
||||
|
||||
Else
|
||||
Upd = String.Format("UPDATE TBKOMMCOLLI_SENDUNGEN SET BEMERKUNG = '{0}' WHERE GUID = {1}", _LS_no, CURRENT_SENDUNG)
|
||||
End If
|
||||
If ClassDatabase.Execute_non_Query(Upd, True) = True Then
|
||||
txtFreitext.Text = ClassDatabase.Execute_Scalar("SELECT BEMERKUNG FROM TBKOMMCOLLI_SENDUNGEN WHERE GUID = " & CURRENT_SENDUNG, True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
deactivate_Error()
|
||||
deactivate_Error()
|
||||
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("UNIQ_BARCODE_PER_POS") Then
|
||||
@@ -339,7 +352,7 @@ Public Class frmMain
|
||||
Dim I As Integer
|
||||
For I = 0 To ListViewBarcodes.SelectedItems.Count - 1
|
||||
TBKOMMCOLLI_PAKET_POSTableAdapter.Delete(ListViewBarcodes.SelectedItems(I).Text)
|
||||
tsinfolabel.Text = "Barcode erfogreich gelöscht"
|
||||
tsinfolabel.Text = "Barcode erfolgreich gelöscht"
|
||||
Next
|
||||
TBKOMMCOLLI_PAKET_KOPFTableAdapter.Fill(MyDataset.TBKOMMCOLLI_PAKET_KOPF, CURRENT_SENDUNG)
|
||||
Refresh_Barcodes()
|
||||
@@ -401,8 +414,9 @@ Public Class frmMain
|
||||
btnAddPaket.Enabled = True
|
||||
tsinfolabel.Text = "Vorgang abgebrochen"
|
||||
tsinfolabel.Visible = True
|
||||
ListBox1.ResetText()
|
||||
ListBoxFortras.ResetText()
|
||||
txtFreitext.Text = ""
|
||||
txtHinweistext.Text = ""
|
||||
Catch ex As Exception
|
||||
ShowError("Fehler in Abbruch Paket: " & vbNewLine & ex.Message)
|
||||
End Try
|
||||
@@ -619,7 +633,16 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
SDG_READY = True
|
||||
Refresh_POS(CURRENT_SENDUNG)
|
||||
If TabControl2.SelectedIndex = 0 Then
|
||||
Refresh_POS(CURRENT_SENDUNG)
|
||||
btndeletePosLHM.Text = "Lösche Position/Lieferschein"
|
||||
btndeletePosLHM.Enabled = True
|
||||
ElseIf TabControl2.SelectedIndex = 1 Then
|
||||
Refresh_LHM(CURRENT_SENDUNG)
|
||||
btndeletePosLHM.Text = "Lösche LHM"
|
||||
btndeletePosLHM.Enabled = False
|
||||
End If
|
||||
|
||||
' cmbLHM.Enabled = True
|
||||
' cmbLHM.DroppedDown = True
|
||||
tsinfolabel.Visible = True
|
||||
@@ -645,7 +668,7 @@ Public Class frmMain
|
||||
btnAddPaket.Enabled = True
|
||||
tsinfolabel.Text = "Vorgang abgebrochen"
|
||||
tsinfolabel.Visible = True
|
||||
ListBox1.ResetText()
|
||||
ListBoxFortras.ResetText()
|
||||
|
||||
frmPrintOptions.ShowDialog()
|
||||
GridControlLHM.DataSource = Nothing
|
||||
@@ -805,6 +828,8 @@ Public Class frmMain
|
||||
Private Sub pnlHuP_VisibleChanged(sender As Object, e As EventArgs) Handles pnlHuP.VisibleChanged
|
||||
If pnlHuP.Visible = True Then
|
||||
txtFreitext.Text = ""
|
||||
txtHinweistext.Text = ""
|
||||
ListBoxFortras.ResetText()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user