Stammref, etc.
This commit is contained in:
@@ -22,20 +22,23 @@ Partial Class usrCntlATLAS_AnkunftsAnzeige
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
|
||||
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel()
|
||||
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
|
||||
Me.btnAllgemein = New System.Windows.Forms.Button()
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.cboDakosyAction = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.txtWarenort = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.txtMRN = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.MyCheckbox1 = New VERAG_PROG_ALLGEMEIN.MyCheckbox()
|
||||
Me.MyCheckbox1 = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components)
|
||||
Me.cboStammreferenz = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.lblBezugsnummer = New System.Windows.Forms.Label()
|
||||
Me.cntxtBezugsnr = New System.Windows.Forms.ContextMenuStrip()
|
||||
Me.cntxtBezugsnr = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.NeueBezugsnummerVergebenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.txtDyMandant = New System.Windows.Forms.Label()
|
||||
@@ -71,6 +74,8 @@ Partial Class usrCntlATLAS_AnkunftsAnzeige
|
||||
'SplitContainer.Panel2
|
||||
'
|
||||
Me.SplitContainer.Panel2.BackColor = System.Drawing.Color.White
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.txtWarenort)
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.Label3)
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.txtMRN)
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.Label2)
|
||||
Me.SplitContainer.Panel2.Controls.Add(Me.MyCheckbox1)
|
||||
@@ -151,6 +156,39 @@ Partial Class usrCntlATLAS_AnkunftsAnzeige
|
||||
Me.Button1.Text = "An DAKOSY senden -->"
|
||||
Me.Button1.UseVisualStyleBackColor = False
|
||||
'
|
||||
'txtWarenort
|
||||
'
|
||||
Me.txtWarenort._DateTimeOnly = False
|
||||
Me.txtWarenort._numbersOnly = False
|
||||
Me.txtWarenort._numbersOnlyKommastellen = ""
|
||||
Me.txtWarenort._numbersOnlyTrennzeichen = True
|
||||
Me.txtWarenort._Prozent = False
|
||||
Me.txtWarenort._ShortDateNew = False
|
||||
Me.txtWarenort._ShortDateOnly = False
|
||||
Me.txtWarenort._TimeOnly = False
|
||||
Me.txtWarenort._TimeOnly_Seconds = False
|
||||
Me.txtWarenort._value = ""
|
||||
Me.txtWarenort._Waehrung = False
|
||||
Me.txtWarenort._WaehrungZeichen = True
|
||||
Me.txtWarenort.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtWarenort.Location = New System.Drawing.Point(144, 94)
|
||||
Me.txtWarenort.MaxLineLength = -1
|
||||
Me.txtWarenort.MaxLines_Warning = ""
|
||||
Me.txtWarenort.MaxLines_Warning_Label = Nothing
|
||||
Me.txtWarenort.Name = "txtWarenort"
|
||||
Me.txtWarenort.Size = New System.Drawing.Size(280, 20)
|
||||
Me.txtWarenort.TabIndex = 17
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(17, 97)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(54, 13)
|
||||
Me.Label3.TabIndex = 16
|
||||
Me.Label3.Text = "Warenort:"
|
||||
Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtMRN
|
||||
'
|
||||
Me.txtMRN._DateTimeOnly = False
|
||||
@@ -349,4 +387,6 @@ Partial Class usrCntlATLAS_AnkunftsAnzeige
|
||||
Friend WithEvents MyCheckbox1 As VERAG_PROG_ALLGEMEIN.MyCheckbox
|
||||
Friend WithEvents txtMRN As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents txtWarenort As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents Label3 As Label
|
||||
End Class
|
||||
|
||||
@@ -61,31 +61,21 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
'End Select
|
||||
Case "ATILLA" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "SUW"
|
||||
Case "UNISPED" : txtDyMandant.Text = "UNAT" : txtDyNiederlassung.Text = "ATSPED"
|
||||
Case "IMEX" : txtDyMandant.Text = "IMEX" : txtDyNiederlassung.Text = "IME"
|
||||
Case "IMEX" : txtDyMandant.Text = "VERG" : txtDyNiederlassung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.NIEDERLASSUNG 'txtDyMandant.Text = "IMEX" : txtDyNiederlassung.Text = "IME"
|
||||
Case "AMBAR" : txtDyMandant.Text = "ATIL" : txtDyNiederlassung.Text = "AMBWO"
|
||||
End Select
|
||||
|
||||
Dim BezugsNr = (SENDUNG.FilialenNr & "/" & SENDUNG.AbfertigungsNr & "_" & "ID" & AVISO.AvisoID & "_" & If(AVISO.Auftraggeber.Length > 8, AVISO.Auftraggeber.ToString.Substring(0, 5), AVISO.Auftraggeber)).Trim
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
txtMRN.Text = If(SENDUNG.tblSnd_ATB_T1, "")
|
||||
Dim BezugsNr As String = ""
|
||||
|
||||
If SENDUNG IsNot Nothing Then
|
||||
BezugsNr = (SENDUNG.FilialenNr & "/" & SENDUNG.AbfertigungsNr & "_" & "ID" & AVISO.AvisoID & "_" & If(AVISO.Auftraggeber.Length > 8, AVISO.Auftraggeber.ToString.Substring(0, 5), AVISO.Auftraggeber)).Trim
|
||||
lblBezugsnummer.Text = BezugsNr
|
||||
txtMRN.Text = If(SENDUNG.tblSnd_ATB_T1, "")
|
||||
End If
|
||||
|
||||
cboStammreferenz.fillWithSQL("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] FROM [tblDakosy_Stammreferenzen] WHERE dySr_Land='DE' AND dySr_Verfahren='AA' and dySr_dy_Mandant='" & txtDyMandant.Text & "' and dySr_dy_Niederlassung IN ('','" & txtDyNiederlassung.Text & "') and dySr_visible=1", False, "FMZOLL", True)
|
||||
' MsgBox("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] FROM [tblDakosy_Stammreferenzen] WHERE dySr_Land='DE' AND dySr_Verfahren='AA' and dySr_dy_Mandant='" & txtDyMandant.Text & "' and dySr_dy_Niederlassung IN ('','" & txtDyNiederlassung.Text & "') and dySr_visible=1")
|
||||
cboStammreferenz.changeItem("")
|
||||
|
||||
Select Case Standort
|
||||
Case "VERAG GmbH"
|
||||
For i As Integer = 0 To cboStammreferenz.Items.Count - 1
|
||||
If cboStammreferenz.Items(i).ToString().Contains("MITTICH") Then
|
||||
cboStammreferenz.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
Case Else
|
||||
|
||||
cboStammreferenz.changeItem("")
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
@@ -133,7 +123,7 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
'DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_ANM, DAKOSY_Worker.cDY_Statusliste.S_03)
|
||||
If SENDUNG IsNot Nothing Then SENDUNG.SET_VGMA() ' MA Vorgeschrieben in Sendung setzen.
|
||||
MsgBox("Gesendet!")
|
||||
createGesamtsicherheitDummy(GesamtsicherheitREF, Standort)
|
||||
createGesamtsicherheitDummy(GesamtsicherheitREF, Standort, txtWarenort.Text)
|
||||
Else
|
||||
'DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_ANM, DAKOSY_Worker.cDY_Statusliste.S_09)
|
||||
MsgBox("Sendefehler!")
|
||||
@@ -209,12 +199,11 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function createGesamtsicherheitDummy(GesSichRef, Standort)
|
||||
Private Function createGesamtsicherheitDummy(GesSichRef, Standort, Warenort)
|
||||
|
||||
Try
|
||||
|
||||
Dim SQL As New SQL
|
||||
|
||||
Dim OPEN_DUMMY As New cSicherheiten()
|
||||
|
||||
Dim firmaId As Integer = -1
|
||||
@@ -256,7 +245,7 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
.gs_filialenNr = SENDUNG.FilialenNr
|
||||
.gs_abfertigungsnr = SENDUNG.AbfertigungsNr
|
||||
.gs_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
.gs_warenort = "" 'mappe Warenort von DAKOSY Stammreferenz -> cboStammreferenz
|
||||
.gs_warenort = Warenort
|
||||
.gs_LKWKZ = AVISO.LKW_Nr
|
||||
|
||||
End With
|
||||
@@ -299,6 +288,27 @@ Public Class usrCntlATLAS_AnkunftsAnzeige
|
||||
|
||||
Private Sub MyCheckbox1_CheckedChanged(sender As Object, e As EventArgs) Handles MyCheckbox1.CheckedChanged
|
||||
Button1.Enabled = Not MyCheckbox1.Checked
|
||||
End Sub
|
||||
|
||||
Private Sub cboStammreferenz_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboStammreferenz.SelectedIndexChanged
|
||||
|
||||
Dim valueREF As String = cboStammreferenz._value
|
||||
|
||||
If valueREF <> "" Then
|
||||
Dim DAKOSY_REF As New cDakosy_Stammreferenzen(valueREF)
|
||||
If DAKOSY_REF IsNot Nothing Then
|
||||
If DAKOSY_REF.dySr_WarenortID > 0 Then
|
||||
txtWarenort.Text = (New SQL).getValueTxtBySql("SELECT [wo_warenort] from [tblWarenorte] where [wo_id] = " & DAKOSY_REF.dySr_WarenortID, "AVISO")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
txtWarenort.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -174,10 +174,12 @@ Partial Class frmDakosyStammreferenzVerwalten
|
||||
Me.txtSearch._DateTimeOnly = False
|
||||
Me.txtSearch._numbersOnly = False
|
||||
Me.txtSearch._numbersOnlyKommastellen = ""
|
||||
Me.txtSearch._numbersOnlyTrennzeichen = True
|
||||
Me.txtSearch._Prozent = False
|
||||
Me.txtSearch._ShortDateNew = False
|
||||
Me.txtSearch._ShortDateOnly = False
|
||||
Me.txtSearch._TimeOnly = False
|
||||
Me.txtSearch._TimeOnly_Seconds = False
|
||||
Me.txtSearch._value = ""
|
||||
Me.txtSearch._Waehrung = False
|
||||
Me.txtSearch._WaehrungZeichen = True
|
||||
@@ -233,6 +235,7 @@ Partial Class frmDakosyStammreferenzVerwalten
|
||||
Me.dgvStammref.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvStammref.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvStammref.Location = New System.Drawing.Point(12, 95)
|
||||
Me.dgvStammref.MultiSelect = False
|
||||
Me.dgvStammref.Name = "dgvStammref"
|
||||
Me.dgvStammref.ReadOnly = True
|
||||
Me.dgvStammref.RowHeadersVisible = False
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class frmDakosyStammreferenzVerwalten
|
||||
Imports jdk.nashorn.internal.objects.annotations
|
||||
|
||||
Public Class frmDakosyStammreferenzVerwalten
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Private Sub frmDakosyStammreferenz_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -6,8 +8,8 @@
|
||||
cboVerfahren.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("NCTS - Versandverfahren", "NCTS"))
|
||||
cboVerfahren.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("ZA - Zollanmeldung", "EZA"))
|
||||
cboVerfahren.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AES - Ausfuhr", "AES"))
|
||||
cboVerfahren.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AA - Ausfuhr", "AA"))
|
||||
' cboVerfahren.changeItem(verfahren)
|
||||
cboVerfahren.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VB - Versandbeendigung", "AA"))
|
||||
'cboVerfahren.changeItem(verfahren)
|
||||
|
||||
cboLand.Items.Clear()
|
||||
cboLand.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("DE", "DE"))
|
||||
@@ -41,12 +43,20 @@
|
||||
.Columns.Clear()
|
||||
If cboLand._value <> "" And cboVerfahren._value <> "" Then
|
||||
Dim where = If(txtSearch.Text <> "", " AND (Ordnungsbegriff LIKE '" & txtSearch.Text & "%' OR dyStr_KdNr LIKE '" & txtSearch.Text & "%') ", "")
|
||||
.DataSource = SQL.loadDgvBySql("SELECT [dySr_Id], [dySr_Stammreferenz],[dySr_Bezeichnung],isnull(dySr_dyId,-1) as dySr_dyId,dySr_dy_Mandant,dySr_dy_Niederlassung,dyStr_KdNr,Ordnungsbegriff,CASE WHEN dySr_visible=1 THEN 'JA' ELSE 'NEIN' END as Sichtbar FROM [tblDakosy_Stammreferenzen] LEFT JOIN Adressen ON AdressenNr=dyStr_KdNr WHERE dySr_Land='" & cboLand._value & "' AND dySr_Verfahren='" & cboVerfahren._value & "' and dySr_dy_Mandant='" & cboMandant._value & "' " & If(cboNL._value = "", "", " AND dySr_dy_Niederlassung='" & cboNL._value & "'") & " " & where & " ORDER BY dyStr_KdNr, dySr_Bezeichnung ", "FMZOLL")
|
||||
.DataSource = SQL.loadDgvBySql("SELECT [dySr_Id], [dySr_Stammreferenz],[dySr_Bezeichnung],isnull(dySr_dyId,-1) as dySr_dyId,dySr_dy_Mandant,dySr_dy_Niederlassung,dyStr_KdNr,Ordnungsbegriff,CASE WHEN dySr_visible=1 THEN 'JA' ELSE 'NEIN' END as Sichtbar, dySr_WarenortID FROM [tblDakosy_Stammreferenzen] LEFT JOIN Adressen ON AdressenNr=dyStr_KdNr WHERE dySr_Land='" & cboLand._value & "' AND dySr_Verfahren='" & cboVerfahren._value & "' and dySr_dy_Mandant='" & cboMandant._value & "' " & If(cboNL._value = "", "", " AND dySr_dy_Niederlassung='" & cboNL._value & "'") & " " & where & " ORDER BY dyStr_KdNr, dySr_Bezeichnung ", "FMZOLL")
|
||||
'MsgBox("SELECT [dySr_Id], [dySr_Stammreferenz],[dySr_Bezeichnung],isnull(dySr_dyId,-1) as dySr_dyId,dySr_dy_Mandant,dySr_dy_Niederlassung,dyStr_KdNr,Ordnungsbegriff FROM [tblDakosy_Stammreferenzen] LEFT JOIN Adressen ON AdressenNr=dyStr_KdNr WHERE dySr_Land='" & cboLand._value & "' AND dySr_Verfahren='" & cboVerfahren._value & "' and dySr_dy_Mandant='" & cboMandant._value & "' " & If(cboNL._value = "", "", " AND dySr_dy_Niederlassung='" & cboNL._value & "'") & " " & where & " ORDER BY dyStr_KdNr, dySr_Bezeichnung ")
|
||||
.Columns("dySr_dyId").Visible = False
|
||||
.Columns("dySr_Id").Visible = False
|
||||
.Columns("dySr_dy_Mandant").Visible = False
|
||||
.Columns("dySr_dy_Niederlassung").Visible = False
|
||||
|
||||
If cboVerfahren._value = "AA" Then
|
||||
.Columns("dySr_WarenortID").HeaderText = "WarenortID"
|
||||
.Columns("dySr_WarenortID").Visible = True
|
||||
Else
|
||||
.Columns("dySr_WarenortID").Visible = False
|
||||
End If
|
||||
|
||||
.Columns("dySr_Stammreferenz").HeaderText = "Stammreferenz"
|
||||
.Columns("dySr_Stammreferenz").Width = 150
|
||||
.Columns("dySr_Bezeichnung").HeaderText = "Bezeichnung"
|
||||
@@ -62,9 +72,9 @@
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub MyDatagridview1_CellDoubleClick(sender As Object, e As Object) Handles dgvStammref.DoubleClick, dgvStammref.CellDoubleClick, dgvStammref.CellContentDoubleClick
|
||||
editSelected()
|
||||
End Sub
|
||||
'Private Sub MyDatagridview1_CellDoubleClick(sender As Object, e As Object) Handles dgvStammref.DoubleClick, dgvStammref.CellDoubleClick, dgvStammref.CellContentDoubleClick
|
||||
' editSelected()
|
||||
'End Sub
|
||||
|
||||
Sub editSelected()
|
||||
If dgvStammref.SelectedRows.Count > 0 Then
|
||||
@@ -142,6 +152,7 @@
|
||||
' f.CopyFromZA_Id = dgvStammref.SelectedRows(0).Cells("dySr_Id").Value
|
||||
|
||||
|
||||
|
||||
' SQL.doSQL("UPDATE [tblDakosy_Stammreferenzen] SET dySr_dyId='" & ZA.dy_Id & "' WHERE dySr_Id='" & dgvStammref.SelectedRows(0).Cells("dySr_Id").Value & "'", "FMZOLL")
|
||||
End If
|
||||
initDGV()
|
||||
@@ -193,47 +204,13 @@
|
||||
|
||||
End Sub
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||
If cboVerfahren._value = "" Then Exit Sub
|
||||
If cboLand._value = "" Then Exit Sub
|
||||
If cboMandant._value = "" Then Exit Sub
|
||||
' If cboNL._value = "" Then Exit Sub
|
||||
|
||||
Dim fd As New frmStammreferenzPopup(cboMandant._value, cboNL._value, cboVerfahren._value)
|
||||
If fd.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
|
||||
If cboVerfahren._value = "" Then cboVerfahren.Focus() : Exit Sub
|
||||
If cboLand._value = "" Then cboLand.Focus() : Exit Sub
|
||||
If cboMandant._value = "" Then cboMandant.Focus() : Exit Sub
|
||||
|
||||
Dim SR As New DAKOSY_Worker.cDakosy_Stammreferenzen
|
||||
SR.dySr_Bezeichnung = fd.txtBezeichnung.Text
|
||||
SR.dySr_Stammreferenz = fd.cboStammrefDakosy._value
|
||||
SR.dySr_Land = cboLand._value
|
||||
SR.dySr_Verfahren = cboVerfahren._value
|
||||
' SR. dySr_dyId As Object = Nothing
|
||||
SR.dySr_dy_Mandant = cboMandant._value
|
||||
SR.dySr_dy_Niederlassung = fd.cboNL._value
|
||||
SR.dySr_dy_Standard = fd.cbxStandard.Checked
|
||||
SR.dyStr_KdNr = fd.KdSearchBox1.KdNrNullInt
|
||||
changeEntry(cboMandant._value, cboLand._value, cboVerfahren._value)
|
||||
|
||||
If SR.SAVE Then
|
||||
Dim ZA As New DAKOSY_Worker.cDakosy_Zollanmeldungen()
|
||||
ZA.dy_ART = SR.dySr_Verfahren
|
||||
ZA.dy_Status = -1
|
||||
ZA.dy_Status_KEWILL_Equivalent = -1
|
||||
If ZA.SAVE() Then
|
||||
|
||||
SR.dySr_dyId = ZA.dy_Id
|
||||
SR.SAVE()
|
||||
|
||||
Dim f As New frmZollanmeldung(cboVerfahren._value, ZA)
|
||||
f.isSTAMMREF = True
|
||||
f.STAMMREF = SR.dySr_Stammreferenz
|
||||
f.ShowDialog(Me)
|
||||
|
||||
End If
|
||||
initDGV()
|
||||
End If
|
||||
|
||||
' Dim f As New frmZollanmeldung(cboVerfahren._value, New DAKOSY_Worker.cDakosy_Zollanmeldungen)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboMandant_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboMandant.SelectedIndexChanged
|
||||
@@ -269,13 +246,6 @@
|
||||
initDGV()
|
||||
End Sub
|
||||
|
||||
Private Sub MyDatagridview1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvStammref.CellContentClick
|
||||
'Button2.Enabled = False
|
||||
'If dgvStammref.SelectedRows.Count > 0 Then
|
||||
' Button2.Enabled = True
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboNL_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboNL.SelectedIndexChanged
|
||||
initDGV()
|
||||
End Sub
|
||||
@@ -291,7 +261,7 @@
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
If vbYes = MsgBox("Möchten Sie die Stammreferenz wirklich löschen?", vbYesNoCancel) Then
|
||||
Dim SR As New DAKOSY_Worker.cDakosy_Stammreferenzen(dgvStammref.SelectedRows(0).Cells("dySr_Id").Value)
|
||||
Dim SR As New DAKOSY_Worker.cDakosy_Stammreferenzen(CInt(dgvStammref.SelectedRows(0).Cells("dySr_Id").Value))
|
||||
SR.DELETE()
|
||||
initDGV()
|
||||
End If
|
||||
@@ -320,11 +290,79 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MyDatagridview1_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs)
|
||||
|
||||
Private Sub changeEntry(mandant As String, NL As String, verfahren As String, Optional id As Integer = -1)
|
||||
|
||||
Dim fd As frmStammreferenzPopup
|
||||
|
||||
If id > 0 Then
|
||||
fd = New frmStammreferenzPopup(id)
|
||||
Else
|
||||
fd = New frmStammreferenzPopup(mandant, NL, verfahren)
|
||||
End If
|
||||
|
||||
If fd.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
|
||||
|
||||
Dim SR As DAKOSY_Worker.cDakosy_Stammreferenzen
|
||||
|
||||
If fd.id > 0 Then
|
||||
SR = New DAKOSY_Worker.cDakosy_Stammreferenzen(id)
|
||||
Else
|
||||
SR = New DAKOSY_Worker.cDakosy_Stammreferenzen()
|
||||
End If
|
||||
|
||||
|
||||
SR.dySr_Bezeichnung = fd.txtBezeichnung.Text
|
||||
SR.dySr_Stammreferenz = fd.cboStammrefDakosy._value
|
||||
SR.dySr_Land = cboLand._value
|
||||
SR.dySr_Verfahren = fd.verfahren
|
||||
' SR. dySr_dyId As Object = Nothing
|
||||
SR.dySr_dy_Mandant = fd.mandant
|
||||
SR.dySr_dy_Niederlassung = fd.cboNL._value
|
||||
SR.dySr_dy_Standard = fd.cbxStandard.Checked
|
||||
SR.dyStr_KdNr = fd.KdSearchBox1.KdNrNullInt
|
||||
SR.dySr_WarenortID = fd.cbxWarenort._value
|
||||
|
||||
If SR.SAVE AndAlso SR.dySr_Verfahren <> "AA" Then
|
||||
Dim ZA As New DAKOSY_Worker.cDakosy_Zollanmeldungen()
|
||||
ZA.dy_ART = SR.dySr_Verfahren
|
||||
ZA.dy_Status = -1
|
||||
ZA.dy_Status_KEWILL_Equivalent = -1
|
||||
If ZA.SAVE() Then
|
||||
|
||||
SR.dySr_dyId = ZA.dy_Id
|
||||
SR.SAVE()
|
||||
|
||||
Dim f As New frmZollanmeldung(verfahren, ZA)
|
||||
f.isSTAMMREF = True
|
||||
f.STAMMREF = SR.dySr_Stammreferenz
|
||||
f.ShowDialog(Me)
|
||||
|
||||
End If
|
||||
initDGV()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MyDatagridview1_CellDoubleClick(sender As Object, e As EventArgs) Handles dgvStammref.DoubleClick, dgvStammref.CellDoubleClick, dgvStammref.CellContentDoubleClick
|
||||
|
||||
Private Sub dgvStammref_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvStammref.CellDoubleClick
|
||||
|
||||
Try
|
||||
If e.RowIndex >= 0 Then
|
||||
Dim ID = dgvStammref.Rows(e.RowIndex).Cells("dySr_Id").Value
|
||||
changeEntry("", "", "", ID)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -36,6 +36,8 @@ Partial Class frmStammreferenzPopup
|
||||
Me.lblMandant = New System.Windows.Forms.Label()
|
||||
Me.pic = New System.Windows.Forms.PictureBox()
|
||||
Me.cboStammrefDakosy = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
Me.lblWarenort = New System.Windows.Forms.Label()
|
||||
Me.cbxWarenort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -129,6 +131,7 @@ Partial Class frmStammreferenzPopup
|
||||
'
|
||||
'KdSearchBox1
|
||||
'
|
||||
Me.KdSearchBox1._AlleFirmenCLUSTER = False
|
||||
Me.KdSearchBox1._AllowSetValue = True
|
||||
Me.KdSearchBox1._autoSizeGross = False
|
||||
Me.KdSearchBox1._display_Name1 = False
|
||||
@@ -137,6 +140,8 @@ Partial Class frmStammreferenzPopup
|
||||
Me.KdSearchBox1._displayWoelflKd = False
|
||||
Me.KdSearchBox1._hideIfListEmpty = True
|
||||
Me.KdSearchBox1._loadKdData = False
|
||||
Me.KdSearchBox1._searchName1 = True
|
||||
Me.KdSearchBox1._UseFIRMA = ""
|
||||
Me.KdSearchBox1._ValueKdAndName = True
|
||||
Me.KdSearchBox1.dgvpos = "LEFT"
|
||||
Me.KdSearchBox1.KdName = ""
|
||||
@@ -149,6 +154,7 @@ Partial Class frmStammreferenzPopup
|
||||
Me.KdSearchBox1.searchActive = True
|
||||
Me.KdSearchBox1.Size = New System.Drawing.Size(310, 20)
|
||||
Me.KdSearchBox1.TabIndex = 8
|
||||
Me.KdSearchBox1.TIMER_SEARCH = True
|
||||
Me.KdSearchBox1.usrcntl = Nothing
|
||||
'
|
||||
'lblMandant
|
||||
@@ -162,7 +168,7 @@ Partial Class frmStammreferenzPopup
|
||||
'
|
||||
'pic
|
||||
'
|
||||
Me.pic.BackgroundImage = Global.SDL.My.Resources.entwurf
|
||||
Me.pic.BackgroundImage = Global.SDL.My.Resources.Resources.entwurf
|
||||
Me.pic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.pic.Location = New System.Drawing.Point(472, 40)
|
||||
Me.pic.Name = "pic"
|
||||
@@ -182,12 +188,36 @@ Partial Class frmStammreferenzPopup
|
||||
Me.cboStammrefDakosy.Size = New System.Drawing.Size(310, 21)
|
||||
Me.cboStammrefDakosy.TabIndex = 13
|
||||
'
|
||||
'lblWarenort
|
||||
'
|
||||
Me.lblWarenort.AutoSize = True
|
||||
Me.lblWarenort.Location = New System.Drawing.Point(9, 162)
|
||||
Me.lblWarenort.Name = "lblWarenort"
|
||||
Me.lblWarenort.Size = New System.Drawing.Size(54, 13)
|
||||
Me.lblWarenort.TabIndex = 14
|
||||
Me.lblWarenort.Text = "Warenort:"
|
||||
'
|
||||
'cbxWarenort
|
||||
'
|
||||
Me.cbxWarenort._allowedValuesFreiText = Nothing
|
||||
Me.cbxWarenort._allowFreiText = False
|
||||
Me.cbxWarenort._value = ""
|
||||
Me.cbxWarenort.Enabled = False
|
||||
Me.cbxWarenort.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.cbxWarenort.FormattingEnabled = True
|
||||
Me.cbxWarenort.Location = New System.Drawing.Point(140, 159)
|
||||
Me.cbxWarenort.Name = "cbxWarenort"
|
||||
Me.cbxWarenort.Size = New System.Drawing.Size(310, 21)
|
||||
Me.cbxWarenort.TabIndex = 15
|
||||
'
|
||||
'frmStammreferenzPopup
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.ClientSize = New System.Drawing.Size(588, 241)
|
||||
Me.Controls.Add(Me.cbxWarenort)
|
||||
Me.Controls.Add(Me.lblWarenort)
|
||||
Me.Controls.Add(Me.cboStammrefDakosy)
|
||||
Me.Controls.Add(Me.pic)
|
||||
Me.Controls.Add(Me.lblMandant)
|
||||
@@ -224,4 +254,6 @@ Partial Class frmStammreferenzPopup
|
||||
Friend WithEvents lblMandant As System.Windows.Forms.Label
|
||||
Friend WithEvents pic As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents cboStammrefDakosy As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
Friend WithEvents lblWarenort As Label
|
||||
Friend WithEvents cbxWarenort As VERAG_PROG_ALLGEMEIN.MyComboBox
|
||||
End Class
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
Public mandant = ""
|
||||
Public nl = ""
|
||||
Public verfahren = ""
|
||||
Public id As Integer = -1
|
||||
Public STAMMREF As DAKOSY_Worker.cDakosy_Stammreferenzen
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim FirmaID As String = ""
|
||||
Sub New(mandant, nl, verfahren)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
@@ -15,13 +18,25 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(id)
|
||||
|
||||
' Dieser Aufruf ist für den Designer erforderlich.
|
||||
InitializeComponent()
|
||||
Me.id = id
|
||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
|
||||
|
||||
If txtBezeichnung.Text = "" Then MsgBox("Bezeichnung angeben") : Me.DialogResult = Windows.Forms.DialogResult.None
|
||||
If cboStammrefDakosy._value = "" Then MsgBox("Stammreferenz angeben") : Me.DialogResult = Windows.Forms.DialogResult.None
|
||||
If KdSearchBox1.Text <> "" And KdSearchBox1.KdNrNullInt Is Nothing Then MsgBox("Empfänger: Eingabe nur mit Kundennummer!") : Me.DialogResult = Windows.Forms.DialogResult.None
|
||||
Dim where = ""
|
||||
If KdSearchBox1.KdNrNullInt IsNot Nothing Then where = " AND [dyStr_KdNr]='" & KdSearchBox1.KdNr_value & "' "
|
||||
If sql.getValueTxtBySql("SELECT count(*) FROM [tblDakosy_Stammreferenzen] where [dySr_Verfahren]='" & verfahren & "' AND [dySr_dy_Mandant]='" & mandant & "' AND [dySr_Bezeichnung]='" & txtBezeichnung.Text & "'" & where, "FMZOLL") > 0 Then
|
||||
|
||||
|
||||
If sql.getValueTxtBySql("SELECT count(*) FROM [tblDakosy_Stammreferenzen] where [dySr_Verfahren]='" & verfahren & "' AND [dySr_dy_Mandant]='" & mandant & "' AND [dySr_Bezeichnung]='" & txtBezeichnung.Text & "'" & where, "FMZOLL") > 0 AndAlso id < 1 Then
|
||||
MsgBox("Bezeichnung existiert bereits!") : Me.DialogResult = Windows.Forms.DialogResult.None
|
||||
End If
|
||||
End Sub
|
||||
@@ -29,14 +44,28 @@
|
||||
Private Sub frmStammreferenzPopup_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
KdSearchBox1.initKdBox(Me)
|
||||
|
||||
If id > 0 Then
|
||||
STAMMREF = New DAKOSY_Worker.cDakosy_Stammreferenzen(id)
|
||||
nl = STAMMREF.dySr_dy_Niederlassung
|
||||
mandant = STAMMREF.dySr_dy_Mandant
|
||||
verfahren = STAMMREF.dySr_Verfahren
|
||||
|
||||
If STAMMREF.dyStr_KdNr IsNot Nothing AndAlso STAMMREF.dyStr_KdNr > 0 Then
|
||||
KdSearchBox1.KdNr_value = STAMMREF.dyStr_KdNr
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
cboStammrefDakosy.Items.Clear()
|
||||
cboStammrefDakosy.fillWithSQL("SELECT [dySr_Stammreferenz],[dySr_Bezeichnung] + ' - ' + dySr_Stammreferenz FROM [tblDakosy_Stammreferenzen] where [dySr_Verfahren]='" & verfahren & "' AND [dySr_dy_Mandant]='" & mandant & "' AND dyStr_KdNr is null", False, "FMZOLL")
|
||||
cboStammrefDakosy.changeItem("*OWN")
|
||||
If cboStammrefDakosy.Items.Count = 0 Then
|
||||
cboStammrefDakosy.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
ElseIf STAMMREF IsNot Nothing AndAlso STAMMREF.dySr_Stammreferenz IsNot Nothing Then
|
||||
cboStammrefDakosy.changeItem(STAMMREF.dySr_Stammreferenz)
|
||||
txtBezeichnung.Text = STAMMREF.dySr_Bezeichnung
|
||||
End If
|
||||
If mandant <> "" Then lblMandant.Text = "(" & mandant & ")"
|
||||
|
||||
cboNL.Items.Clear()
|
||||
Select Case mandant
|
||||
Case "VERG"
|
||||
@@ -46,22 +75,39 @@
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("WAI", "WAI"))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("NEU", "NEU"))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("NKD", "NKD"))
|
||||
FirmaID = "1,2,11"
|
||||
Case "IMEX"
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("alle", ""))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IME", "IME"))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("GLO", "GLO"))
|
||||
|
||||
FirmaID = "20"
|
||||
Case "ATIL"
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("alle", ""))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("SUW", "SUW"))
|
||||
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("AMBWO", "AMBWO"))
|
||||
FirmaID = "7"
|
||||
End Select
|
||||
cboNL.changeItem(nl)
|
||||
|
||||
If mandant <> "" Then
|
||||
lblMandant.Text = "(" & mandant & ")"
|
||||
cbxWarenort.fillWithSQL("SELECT [wo_id],CONCAT([wo_bezeichnung],' - ' ,[wo_knnr]) FROM [tblWarenorte] WHERE [wo_aktiv] = 1 AND wo_ze = 1 AND [wo_firma] in (" & FirmaID & ") ORDER BY [wo_reihenfolge] ", True, "AVISO", True)
|
||||
|
||||
If STAMMREF IsNot Nothing AndAlso STAMMREF.dySr_WarenortID > 0 Then
|
||||
cbxWarenort.changeItem(STAMMREF.dySr_WarenortID)
|
||||
Else
|
||||
cbxWarenort.changeItem("")
|
||||
End If
|
||||
End If
|
||||
cboNL.changeItem(nl)
|
||||
|
||||
cbxWarenort.Enabled = If(verfahren = "AA", False)
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", Me) Then
|
||||
'txtStammrefDakosy.Enabled = True
|
||||
cbxStandard.Enabled = True
|
||||
|
||||
|
||||
|
||||
cboStammrefDakosy._allowFreiText = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user