ATEZ status
This commit is contained in:
30
UID/usrctlProcedures.Designer.vb
generated
30
UID/usrctlProcedures.Designer.vb
generated
@@ -24,6 +24,7 @@ Partial Class usrctlProcedures
|
||||
Private Sub InitializeComponent()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.CheckBox6 = New System.Windows.Forms.CheckBox()
|
||||
Me.TextBox15 = New System.Windows.Forms.TextBox()
|
||||
Me.Button37 = New System.Windows.Forms.Button()
|
||||
Me.Button41 = New System.Windows.Forms.Button()
|
||||
@@ -126,7 +127,7 @@ Partial Class usrctlProcedures
|
||||
Me.Button33 = New System.Windows.Forms.Button()
|
||||
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.CheckBox6 = New System.Windows.Forms.CheckBox()
|
||||
Me.Button43 = New System.Windows.Forms.Button()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
@@ -170,6 +171,16 @@ Partial Class usrctlProcedures
|
||||
Me.TabPage3.Text = "TabPage3"
|
||||
Me.TabPage3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CheckBox6
|
||||
'
|
||||
Me.CheckBox6.AutoSize = True
|
||||
Me.CheckBox6.Location = New System.Drawing.Point(18, 55)
|
||||
Me.CheckBox6.Name = "CheckBox6"
|
||||
Me.CheckBox6.Size = New System.Drawing.Size(90, 17)
|
||||
Me.CheckBox6.TabIndex = 65
|
||||
Me.CheckBox6.Text = "ForceRefresh"
|
||||
Me.CheckBox6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox15
|
||||
'
|
||||
Me.TextBox15.Location = New System.Drawing.Point(185, 55)
|
||||
@@ -1106,20 +1117,20 @@ Partial Class usrctlProcedures
|
||||
Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
|
||||
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
|
||||
'
|
||||
'CheckBox6
|
||||
'Button43
|
||||
'
|
||||
Me.CheckBox6.AutoSize = True
|
||||
Me.CheckBox6.Location = New System.Drawing.Point(18, 55)
|
||||
Me.CheckBox6.Name = "CheckBox6"
|
||||
Me.CheckBox6.Size = New System.Drawing.Size(90, 17)
|
||||
Me.CheckBox6.TabIndex = 65
|
||||
Me.CheckBox6.Text = "ForceRefresh"
|
||||
Me.CheckBox6.UseVisualStyleBackColor = True
|
||||
Me.Button43.Location = New System.Drawing.Point(694, 29)
|
||||
Me.Button43.Name = "Button43"
|
||||
Me.Button43.Size = New System.Drawing.Size(145, 49)
|
||||
Me.Button43.TabIndex = 65
|
||||
Me.Button43.Text = "TELOTEC NCTS"
|
||||
Me.Button43.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrctlProcedures
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.Button43)
|
||||
Me.Controls.Add(Me.Button33)
|
||||
Me.Controls.Add(Me.lblStatus)
|
||||
Me.Controls.Add(Me.Button32)
|
||||
@@ -1293,4 +1304,5 @@ Partial Class usrctlProcedures
|
||||
Friend WithEvents TextBox15 As TextBox
|
||||
Friend WithEvents Button37 As Button
|
||||
Friend WithEvents CheckBox6 As CheckBox
|
||||
Friend WithEvents Button43 As Button
|
||||
End Class
|
||||
|
||||
@@ -16,6 +16,8 @@ Imports System.Xml.Serialization
|
||||
Imports System.Xml
|
||||
Imports System.Data.OleDb
|
||||
Imports Chilkat
|
||||
Imports TELOTEC_Worker
|
||||
Imports GrapeCity
|
||||
'Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class usrctlProcedures
|
||||
@@ -3759,6 +3761,136 @@ Public Class usrctlProcedures
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button43_Click(sender As Object, e As EventArgs) Handles Button43.Click
|
||||
|
||||
|
||||
' Pfad zur Excel-Datei anpassen
|
||||
Dim filePath As String = "D:\Andreas\TMP\TELENM\Garantiebeträge 122024-012025-IMEX.xlsx"
|
||||
|
||||
' Excel Anwendung starten
|
||||
Dim excelApp As New Excel.Application
|
||||
Dim excelWorkbook As Excel.Workbook = excelApp.Workbooks.Open(filePath)
|
||||
Dim excelSheet As Excel.Worksheet = CType(excelWorkbook.Sheets(1), Excel.Worksheet)
|
||||
Dim excelRange As Excel.Range = excelSheet.UsedRange
|
||||
|
||||
' Zeilenanzahl ermitteln
|
||||
Dim rowCount As Integer = excelRange.Rows.Count
|
||||
Dim colCount As Integer = excelRange.Columns.Count
|
||||
|
||||
' Zeile für Zeile durchlaufen
|
||||
For i As Integer = 2 To rowCount
|
||||
Dim rowData As String = ""
|
||||
|
||||
|
||||
Dim TELANM = cTelotec_Anmeldung.LOAD_ByBezugsNr(excelRange.Cells(i, 4).Value)
|
||||
If TELANM Is Nothing Then
|
||||
TELANM = New cTelotec_Anmeldung
|
||||
End If
|
||||
|
||||
TELANM.telanm_ART = "T1" '"T2"
|
||||
TELANM.Hea_DecTy = "T1" '"T2"
|
||||
TELANM.telanm_BezugsNr = excelRange.Cells(i, 4).Value
|
||||
TELANM.Refs_LRN = excelRange.Cells(i, 4).Value
|
||||
TELANM.telanm_Status = 50
|
||||
TELANM.telanm_Status_KEWILL_Equivalent = 50
|
||||
TELANM.telanm_CRN = excelRange.Cells(i, 5).Value
|
||||
TELANM.Refs_CRN = excelRange.Cells(i, 5).Value
|
||||
TELANM.telanm_Erstellung = CDate(excelRange.Cells(i, 6).Value)
|
||||
TELANM.telanm_LetzteBearbeitung = TELANM.telanm_Erstellung
|
||||
TELANM.dec_CreateDate = TELANM.telanm_Erstellung
|
||||
TELANM.Hea_AccDT = TELANM.telanm_Erstellung
|
||||
|
||||
TELANM.Mandant_ID = excelRange.Cells(i, 2).Value
|
||||
TELANM.telanm_firma = excelRange.Cells(i, 2).Value
|
||||
TELANM.dec_ProzessArt = "TA"
|
||||
TELANM.Hea_Simp = 0
|
||||
|
||||
TELANM.Hea_DecDT = "TA"
|
||||
TELANM.Hea_DecDT = TELANM.telanm_Erstellung
|
||||
TELANM.Hea_DecPlc = ""
|
||||
|
||||
|
||||
TELANM.Transp_DepIdnt = excelRange.Cells(i, 3).Value
|
||||
TELANM.Transp_CrossIdnt = excelRange.Cells(i, 3).Value
|
||||
|
||||
TELANM.Represent_Na = excelRange.Cells(i, 8).Value
|
||||
|
||||
TELANM.DepCO_Ref = excelRange.Cells(i, 12).Value
|
||||
TELANM.DestCO_Ref = excelRange.Cells(i, 13).Value
|
||||
TELANM.telnam_aktuellsteNachricht = 1
|
||||
TELANM.Bereich_ID = 0
|
||||
TELANM.Hea_TotItem = 1
|
||||
TELANM.ComIndicator = 1
|
||||
TELANM.Referenz_ID = TELANM.Refs_LRN '& TELANM.telanm_Erstellung.ToString("ddMMyyHHmm")
|
||||
|
||||
Dim GRT As New cTelotec_Sicherheit
|
||||
|
||||
GRT.Mandant_ID = TELANM.Mandant_ID
|
||||
GRT.Bereich_ID = TELANM.Bereich_ID
|
||||
GRT.Referenz_ID = TELANM.Referenz_ID
|
||||
GRT.ComIndicator = TELANM.ComIndicator
|
||||
GRT.GrteeRef_ID = 1
|
||||
|
||||
GRT.GRN = excelRange.Cells(i, 9).Value
|
||||
GRT.GVal = excelRange.Cells(i, 10).Value
|
||||
GRT.Curr = excelRange.Cells(i, 11).Value
|
||||
GRT.GrteeRef_GTy = 0
|
||||
|
||||
TELANM.SICHERHEIT.Clear()
|
||||
|
||||
TELANM.SICHERHEIT.Add(GRT)
|
||||
|
||||
TELANM.SAVE()
|
||||
|
||||
' MsgBox(TELANM.telanm_id)
|
||||
|
||||
''Stat 60Hizufüg
|
||||
'TELANM.telanm_id = Nothing
|
||||
'TELANM.telanm_Status = 60
|
||||
'TELANM.telanm_Status_KEWILL_Equivalent = 60
|
||||
|
||||
'TELANM.SAVE()
|
||||
|
||||
|
||||
Next
|
||||
|
||||
'For j As Integer = 1 To colCount
|
||||
' Dim cellValue As Object = excelRange.Cells(i, j).Value
|
||||
' If cellValue IsNot Nothing Then
|
||||
' rowData &= cellValue.ToString() & vbTab ' Werte mit Tabulator trennen
|
||||
' End If
|
||||
' Next
|
||||
' Console.WriteLine(rowData) ' Zeile ausgeben
|
||||
'Next
|
||||
|
||||
' Cleanup
|
||||
excelWorkbook.Close(False)
|
||||
excelApp.Quit()
|
||||
|
||||
' Excel-Objekte korrekt freigeben
|
||||
ReleaseObject(excelRange)
|
||||
ReleaseObject(excelSheet)
|
||||
ReleaseObject(excelWorkbook)
|
||||
ReleaseObject(excelApp)
|
||||
|
||||
Console.WriteLine("Excel-Daten wurden erfolgreich ausgelesen.")
|
||||
Console.ReadKey()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
' Methode zum Freigeben der COM-Objekte
|
||||
Private Sub ReleaseObject(ByVal obj As Object)
|
||||
Try
|
||||
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
|
||||
obj = Nothing
|
||||
Catch ex As Exception
|
||||
obj = Nothing
|
||||
Finally
|
||||
GC.Collect()
|
||||
End Try
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user