This commit is contained in:
2020-11-27 22:57:00 +01:00
parent fa670231f7
commit 14a7113144
22 changed files with 872 additions and 58 deletions

View File

@@ -70,8 +70,8 @@
Exit For
End If
Next i
Dim ErsterAdvent As Date = DateAdd("d", -21, VierterAdvent)
Return DateAdd("d", -11, ErsterAdvent) 'BussUndBettag
Dim ErsterAdvent As Date = VierterAdvent.AddDays(-21) ' DateAdd("d", -21, VierterAdvent)
Return ErsterAdvent.AddDays(-11) ' DateAdd("d", -11, ErsterAdvent) 'BussUndBettag
End Get
End Property

View File

@@ -525,6 +525,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ähnelt.
'''</summary>
Friend ReadOnly Property sfsdf3sdfsdf3sdfsdfsdf() As String
Get
Return ResourceManager.GetString("sfsdf3sdfsdf3sdfsdfsdf", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
@@ -655,7 +664,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die 2.0.0 ähnelt.
''' Sucht eine lokalisierte Zeichenfolge, die 2.0.1 ähnelt.
'''</summary>
Friend ReadOnly Property Version() As String
Get

View File

@@ -188,7 +188,7 @@
<value>Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=sa;Password=BmWr501956;</value>
</data>
<data name="Version" xml:space="preserve">
<value>2.0.0</value>
<value>2.0.1</value>
</data>
<data name="del" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\del.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -304,4 +304,7 @@
<data name="personGray_w" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\personGray_w.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="sfsdf3sdfsdf3sdfsdfsdf" xml:space="preserve">
<value />
</data>
</root>

View File

@@ -100,10 +100,13 @@ Partial Class usrctlProcedures
Me.Label11 = New System.Windows.Forms.Label()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label()
Me.Label14 = New System.Windows.Forms.Label()
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
Me.Button27 = New System.Windows.Forms.Button()
Me.Button26 = New System.Windows.Forms.Button()
Me.Button27 = New System.Windows.Forms.Button()
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
Me.Label14 = New System.Windows.Forms.Label()
Me.Label15 = New System.Windows.Forms.Label()
Me.CheckBox5 = New System.Windows.Forms.CheckBox()
Me.Button29 = New System.Windows.Forms.Button()
Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -731,7 +734,7 @@ Partial Class usrctlProcedures
'
'Button23
'
Me.Button23.Location = New System.Drawing.Point(606, 161)
Me.Button23.Location = New System.Drawing.Point(618, 344)
Me.Button23.Name = "Button23"
Me.Button23.Size = New System.Drawing.Size(75, 23)
Me.Button23.TabIndex = 41
@@ -778,7 +781,7 @@ Partial Class usrctlProcedures
'
'TextBox10
'
Me.TextBox10.Location = New System.Drawing.Point(694, 241)
Me.TextBox10.Location = New System.Drawing.Point(690, 335)
Me.TextBox10.Multiline = True
Me.TextBox10.Name = "TextBox10"
Me.TextBox10.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
@@ -787,7 +790,7 @@ Partial Class usrctlProcedures
'
'TextBox11
'
Me.TextBox11.Location = New System.Drawing.Point(824, 241)
Me.TextBox11.Location = New System.Drawing.Point(820, 335)
Me.TextBox11.Multiline = True
Me.TextBox11.Name = "TextBox11"
Me.TextBox11.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
@@ -796,7 +799,7 @@ Partial Class usrctlProcedures
'
'TextBox12
'
Me.TextBox12.Location = New System.Drawing.Point(694, 356)
Me.TextBox12.Location = New System.Drawing.Point(690, 450)
Me.TextBox12.Multiline = True
Me.TextBox12.Name = "TextBox12"
Me.TextBox12.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
@@ -806,7 +809,7 @@ Partial Class usrctlProcedures
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Location = New System.Drawing.Point(691, 225)
Me.Label11.Location = New System.Drawing.Point(687, 319)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(94, 13)
Me.Label11.TabIndex = 28
@@ -815,7 +818,7 @@ Partial Class usrctlProcedures
'Label12
'
Me.Label12.AutoSize = True
Me.Label12.Location = New System.Drawing.Point(821, 225)
Me.Label12.Location = New System.Drawing.Point(817, 319)
Me.Label12.Name = "Label12"
Me.Label12.Size = New System.Drawing.Size(96, 13)
Me.Label12.TabIndex = 28
@@ -824,20 +827,29 @@ Partial Class usrctlProcedures
'Label13
'
Me.Label13.AutoSize = True
Me.Label13.Location = New System.Drawing.Point(691, 340)
Me.Label13.Location = New System.Drawing.Point(687, 434)
Me.Label13.Name = "Label13"
Me.Label13.Size = New System.Drawing.Size(119, 13)
Me.Label13.TabIndex = 28
Me.Label13.Text = "Änderung bei vorh. Kd.:"
'
'Label14
'Button26
'
Me.Label14.Location = New System.Drawing.Point(756, 156)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(145, 13)
Me.Label14.TabIndex = 53
Me.Label14.Text = "0/0"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.Button26.Location = New System.Drawing.Point(755, 104)
Me.Button26.Name = "Button26"
Me.Button26.Size = New System.Drawing.Size(145, 49)
Me.Button26.TabIndex = 54
Me.Button26.Text = "UNISPED EXCEL Importieren"
Me.Button26.UseVisualStyleBackColor = True
'
'Button27
'
Me.Button27.Location = New System.Drawing.Point(756, 50)
Me.Button27.Name = "Button27"
Me.Button27.Size = New System.Drawing.Size(145, 49)
Me.Button27.TabIndex = 50
Me.Button27.Text = "UNISPED MDB Importieren"
Me.Button27.UseVisualStyleBackColor = True
'
'CheckBox4
'
@@ -851,28 +863,52 @@ Partial Class usrctlProcedures
Me.CheckBox4.Text = "TESTSYSTEM"
Me.CheckBox4.UseVisualStyleBackColor = True
'
'Button27
'Label14
'
Me.Button27.Location = New System.Drawing.Point(756, 50)
Me.Button27.Name = "Button27"
Me.Button27.Size = New System.Drawing.Size(145, 49)
Me.Button27.TabIndex = 50
Me.Button27.Text = "UNISPED MDB Importieren"
Me.Button27.UseVisualStyleBackColor = True
Me.Label14.Location = New System.Drawing.Point(756, 156)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(145, 13)
Me.Label14.TabIndex = 53
Me.Label14.Text = "0/0"
Me.Label14.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'Button26
'Label15
'
Me.Button26.Location = New System.Drawing.Point(755, 104)
Me.Button26.Name = "Button26"
Me.Button26.Size = New System.Drawing.Size(145, 49)
Me.Button26.TabIndex = 54
Me.Button26.Text = "UNISPED EXCEL Importieren"
Me.Button26.UseVisualStyleBackColor = True
Me.Label15.Location = New System.Drawing.Point(756, 254)
Me.Label15.Name = "Label15"
Me.Label15.Size = New System.Drawing.Size(145, 13)
Me.Label15.TabIndex = 57
Me.Label15.Text = "0/0"
Me.Label15.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'CheckBox5
'
Me.CheckBox5.AutoSize = True
Me.CheckBox5.Checked = True
Me.CheckBox5.CheckState = System.Windows.Forms.CheckState.Checked
Me.CheckBox5.Location = New System.Drawing.Point(756, 179)
Me.CheckBox5.Name = "CheckBox5"
Me.CheckBox5.Size = New System.Drawing.Size(98, 17)
Me.CheckBox5.TabIndex = 56
Me.CheckBox5.Text = "TESTSYSTEM"
Me.CheckBox5.UseVisualStyleBackColor = True
'
'Button29
'
Me.Button29.Location = New System.Drawing.Point(755, 202)
Me.Button29.Name = "Button29"
Me.Button29.Size = New System.Drawing.Size(145, 49)
Me.Button29.TabIndex = 58
Me.Button29.Text = "AMBAR EXCEL Importieren"
Me.Button29.UseVisualStyleBackColor = True
'
'usrctlProcedures
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.Label15)
Me.Controls.Add(Me.CheckBox5)
Me.Controls.Add(Me.Button29)
Me.Controls.Add(Me.Label14)
Me.Controls.Add(Me.CheckBox4)
Me.Controls.Add(Me.Button27)
@@ -1008,8 +1044,11 @@ Partial Class usrctlProcedures
Friend WithEvents Label11 As Label
Friend WithEvents Label12 As Label
Friend WithEvents Label13 As Label
Friend WithEvents Label14 As Label
Friend WithEvents CheckBox4 As CheckBox
Friend WithEvents Button27 As Button
Friend WithEvents Button26 As Button
Friend WithEvents Button27 As Button
Friend WithEvents CheckBox4 As CheckBox
Friend WithEvents Label14 As Label
Friend WithEvents Label15 As Label
Friend WithEvents CheckBox5 As CheckBox
Friend WithEvents Button29 As Button
End Class

View File

@@ -2489,7 +2489,7 @@ Public Class usrctlProcedures
If s.ToString.Length > l Then
Return s.Substring(0, l)
End If
Return s
Return s.ToString
Catch ex As Exception
MsgBox("getTrimedString: " & ex.Message & ex.StackTrace)
@@ -2985,8 +2985,269 @@ Public Class usrctlProcedures
End Sub
Private Sub Button29_Click(sender As Object, e As EventArgs) Handles Button29.Click
Dim StartZeit As Date = DateTime.Now
Dim StopZeit As Date = DateTime.Now
Dim test = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = CheckBox5.Checked
Dim cnt = 1
'dim listAVISO = New List(Of cAviso)
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
Dim kdnr_tmp = ""
Try
Dim fd As New OpenFileDialog
fd.InitialDirectory = "C:\Users\DEVELOPER1\Desktop\"
If fd.ShowDialog = DialogResult.OK Then
If fd.FileName.ToUpper.EndsWith(".XLSX") Then
Dim exclApp As Object 'as Application
Dim Datei As Object 'as WorkBook
Dim Blatt As Object 'as WorkSheet
exclApp = CreateObject("Excel.Application")
' Dim nWeek As Integer
' nWeek = DatePart(DateInterval.WeekOfYear, New Date(2004, 3, 22), _
' FirstDayOfWeek.Monday, FirstWeekOfYear.FirstFourDays)
' exclApp.Caption = GuiId
exclApp.CutCopyMode = False
Datei = exclApp.Workbooks.Open(fd.FileName)
Blatt = Datei.Worksheets(1)
Datei.Activate()
For index = 2 To Blatt.UsedRange.Rows.Count '2
' MsgBox(Blatt.Range("C" & index).Value)
'Dim valueX As String = ""
Try
'valueX = Blatt.Range("C" & index).Value.ToString
'MsgBox(valueX)
If Blatt.Range("B" & index).Value IsNot Nothing AndAlso Blatt.Range("B" & index).Value.ToString <> "" Then
'MsgBox(Blatt.Range("A" & index).Value)
'MsgBox(Blatt.Range("A" & index).Value IsNot Nothing)
'MsgBox(Blatt.Range("A" & index).Value.ToString <> "")
'MsgBox(IsNumeric(Blatt.Range("A" & index).Value))
Dim kdnr As Integer = 3000001
If Blatt.Range("A" & index).Value IsNot Nothing AndAlso Blatt.Range("A" & index).Value.ToString <> "" AndAlso IsNumeric(Blatt.Range("A" & index).Value) Then
kdnr = CInt(Blatt.Range("A" & index).Value) + 3000000
Else
kdnr = VERAG_PROG_ALLGEMEIN.cAdressen.getHoechsteKdNr(3020000, 3499999) '+ 1
End If
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(kdnr)
'If True Then 'Not KD.hasEntry Then
' MsgBox((Blatt.Range("C" & index).Value.ToString))
Dim AD As New VERAG_PROG_ALLGEMEIN.cAdressen(kdnr)
Dim KDE As New VERAG_PROG_ALLGEMEIN.cKundenErweitert(kdnr)
AD.Auswahl = "A"
If Blatt.Range("H" & index).Value Is Nothing OrElse Blatt.Range("H" & index).Value.ToString = "" Then
AD.Ordnungsbegriff = getTrimedString(Blatt.Range("B" & index).Value, 40)
Else
AD.Ordnungsbegriff = getTrimedString((Blatt.Range("B" & index).Value) & "; " & (Blatt.Range("H" & index).Value), 40)
End If
AD.Name_1 = getTrimedString(Blatt.Range("B" & index).Value, 40)
AD.Name_2 = Nothing
AD.Straße = getTrimedString(Blatt.Range("C" & index).Value, 40)
If If(AD.Straße, "").trim = "" Then AD.Straße = Nothing
AD.Ort = getTrimedString(Blatt.Range("H" & index).Value, 40)
If If(AD.Ort, "").trim = "" Then AD.Ort = "-"
Dim LandKz = getTrimedString(Blatt.Range("F" & index).Value, 3)
Dim PLZ = getTrimedString(Blatt.Range("G" & index).Value, 7)
AD.PLZ = sql.isleernothing(getTrimedString(PLZ.Trim, 7))
AD.LandKz = sql.isleernothing(getTrimedString(LandKz.Trim, 3))
If Blatt.Range("K" & index).value IsNot Nothing Then
If Blatt.Range("K" & index).Value.ToString.Length > 20 Then
AD.Mobiltelefon = getTrimedString(Blatt.Range("K" & index).Value.ToString, 40)
Else
AD.Telefon = getTrimedString(Blatt.Range("K" & index).Value.ToString, 20)
End If
End If
If If(AD.Telefon, "").trim = "" Then AD.Telefon = Nothing
AD.Mobiltelefon = Nothing
AD.Telefax = Nothing
AD.E_Mail = getTrimedString(Blatt.Range("L" & index).Value, 40)
If If(AD.E_Mail, "").trim = "" Then AD.E_Mail = Nothing
AD.E_Mail2 = Nothing
' AD. = row("Internet1")
If Blatt.Range("J" & index).value IsNot Nothing Then AD.Ansprechpartner = getTrimedString(Blatt.Range("J" & index).Value.ToString, 40)
If If(AD.Ansprechpartner, "").trim = "" Then AD.Ansprechpartner = Nothing
KD.Währungscode = "EUR" 'getTrimedStringACCES(row("Standard FakturenWährung"), 3)
KD.Zahlungsziel = Nothing
' Offerte ??
KDE.kde_BesonderheitenNeu = True
Dim Allg = ""
VERAG_PROG_ALLGEMEIN.cKundenBesonderheiten.DELETE_ALL_KD(kdnr)
If Blatt.Range("M" & index).value IsNot Nothing AndAlso Blatt.Range("M" & index).value <> "" Then
addbesonderheit(kdnr, "ÖFFNUNGSZEITEN: " & Blatt.Range("M" & index).Value.ToString)
End If
If Blatt.Range("Q" & index).value IsNot Nothing AndAlso Blatt.Range("Q" & index).value <> "" Then
addbesonderheit(kdnr, "ZOLLAGENT: " & Blatt.Range("Q" & index).Value.ToString)
End If
If Blatt.Range("I" & index).value IsNot Nothing AndAlso Blatt.Range("I" & index).value <> "" Then
addbesonderheit(kdnr, Blatt.Range("I" & index).Value.ToString)
End If
KD.Besonderheiten = isleernothing(Allg.Trim)
Dim obtmp = getTrimedStringACCES(AD.Ordnungsbegriff, 31)
If AD.doesOrdnungsbegriffExist Then
AD.Ordnungsbegriff = obtmp & " (AMBAR)"
End If
If AD.doesOrdnungsbegriffExist Then
AD.Ordnungsbegriff = obtmp & " (AMBAR2)"
End If
If AD.doesOrdnungsbegriffExist Then
AD.Ordnungsbegriff = obtmp & " (AMBAR3)"
End If
If AD.doesOrdnungsbegriffExist Then
AD.Ordnungsbegriff = obtmp & " (AMBAR4)"
End If
AD.Ordnungsbegriff = getTrimedString(AD.Ordnungsbegriff, 40)
If Blatt.Range("N" & index).value IsNot Nothing AndAlso Blatt.Range("N" & index).value.ToString <> "" AndAlso Blatt.Range("N" & index).value.ToString.Length > 4 Then
Dim uidvalue = Blatt.Range("N" & index).value.trim.ToString.Replace(" ", "")
If IsNumeric(uidvalue.Trim.Substring(2)) Then 'DE
AD.UstIdKz = getTrimedString(uidvalue, 2)
AD.UstIdNr = getTrimedString(uidvalue.Trim.Substring(2), 12)
ElseIf IsNumeric(uidvalue.Trim.Substring(3)) Then 'ATU
AD.UstIdKz = getTrimedString(uidvalue, 2)
AD.UstIdNr = getTrimedString(uidvalue.Trim.Substring(2), 12)
End If
End If
If Blatt.Range("P" & index).value IsNot Nothing Then KD.EORITIN = getTrimedString(Blatt.Range("P" & index).Value.ToString, 17)
KD.KundenNrZentrale = KD.KundenNr
KD.FilialenNr = 5701
If If(KD.Sachbearbeiter, "").trim = "" Then KD.Sachbearbeiter = "AUTO"
KD.Währungscode = "EUR"
KD.Eingegeben_am = Now.ToShortDateString
' AD.Ordnungsbegriff = getTrimedString(AD.Name_1 & "; " & AD.Ort, 50)
AD.Eingegeben_am = Now.ToShortDateString
AD.LandKz = If(isleernothing(cProgramFunctions.getISO1Land(AD.LandKz)), AD.LandKz)
AD.Rechnungsdruck = True
If If(KD.EORITIN, "").trim = "" Then KD.EORITIN = Nothing
KD.Vorlageprovision = 0.01
KD.Kreditaufwendungen = 0.02
KD.Bankspesen = 0
KD.SVS = True
KD.Bankspesen_Mindestbetrag = 0
KD.Sammelrechnung = 0
KD.Steuerschlüssel = 10
KD.Kreditlimit = 2600
KD.Überwachungskunde = 0
KD.Abfertigungsverbot = 0
KD.Rechtsanwalt = 0
KD.Euroeinführung = CDate("01.01.2002")
KD.UStV_Summe3470BetragEUR = 0
KD.UStV_SummeErstattungsbetragEUR = 0
KD.UStV_SummeVorschaubetragEUR = 0
KD.UStV_SummeVorschaubetragEUR_IDS = 0
KD.UStV_SummeVorschaubetragEUR_VERAG = 0
KD.UStV_SummeUmsatzsteuerbetragEUR = 0
KD.UStV_SummeVZBetragEUR = 0
KD.Fiskal_Aktiv = 0
If AD.SAVE() AndAlso KD.SAVE() Then ' AndAlso KDE.SAVE() Then
TextBox10.Text &= AD.AdressenNr & " " & AD.Ordnungsbegriff & vbNewLine
Else
MsgBox("FEHLER: " & index)
End If
'Item(0) = row(0)
'Item(1) = row(1)
'Dim NextListItem As New ListViewItem(Item)
'ListView1.Items.Add(NextListItem)
Label15.Text = cnt & "/" & Blatt.UsedRange.Rows.Count
cnt += 1
Me.Refresh()
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
Next
End If
End If
Catch ex As Exception
MessageBox.Show(ex.Message & ex.StackTrace)
Finally
End Try
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = test
End Sub
Sub addbesonderheit(kdnr, text, Optional art = "ZOLL")
Dim KD_BESONSERHEITEN As New VERAG_PROG_ALLGEMEIN.cKundenBesonderheiten
KD_BESONSERHEITEN.kdb_EingetragenAm = Now
KD_BESONSERHEITEN.kdb_history = 0
KD_BESONSERHEITEN.kdb_mitName = "AUTO"
KD_BESONSERHEITEN.kdb_mitId = 4
KD_BESONSERHEITEN.kdb_KundenNr = kdnr
KD_BESONSERHEITEN.kdb_AenderungAm = Now
KD_BESONSERHEITEN.kdb_kategorie = art
KD_BESONSERHEITEN.kdb_text = text
KD_BESONSERHEITEN.kdb_hervorheben = False
'KD_BESONSERHEITEN.kdb_visible =
KD_BESONSERHEITEN.SAVE()
End Sub
'Private Sub Button26_Click(sender As Object, e As EventArgs)
' For Each d In System.IO.Directory.GetDirectories("\\192.168.0.91\Datenarchiv\DAKOSY\ECHTSYSTEM\Nachrichtendaten_Ablage\2019")
' Dim fi As New FileInfo(d)