TIMAS API, API, etc

This commit is contained in:
2023-10-31 17:08:04 +01:00
parent 0e6f88e932
commit 7b5c593bd8
13 changed files with 1766 additions and 96 deletions

View File

@@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel
Imports GrapeCity
Imports VERAG_PROG_ALLGEMEIN
@@ -27,24 +28,13 @@ Public Class usrCntlAPI
cboDatum.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("API-Datum", "ADat"))
cboDatum.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Durchführungsdatum", "DDat"))
cboDatum.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Error-Datum", "EDat"))
cboDatum.changeItem("EDat")
cboDatum.changeItem("ADat")
cboInOut.Items.Clear()
cboInOut.fillWithSQL("SELECT distinct([api_InOut]) FROM [tblAPI] ", False, "ADMIN", True)
'cboInOut.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
'cboInOut.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("IN", VERAG_PROG_ALLGEMEIN.cAPI_INOUT.IN))
'cboInOut.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("OUT", VERAG_PROG_ALLGEMEIN.cAPI_INOUT.OUT))
'cboInOut.changeItem("")
cboType.Items.Clear()
cboType.fillWithSQL("SELECT distinct(api_Type) FROM [tblAPI] ", False, "ADMIN", True)
'cboType.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
'cboType.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("FTP", VERAG_PROG_ALLGEMEIN.cAPI_Type.FTP))
'cboType.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("MAIL", VERAG_PROG_ALLGEMEIN.cAPI_Type.MAIL))
'cboType.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("REST", VERAG_PROG_ALLGEMEIN.cAPI_Type.REST))
'cboType.changeItem("")
cboAPIArt.Items.Clear()
cboAPIArt.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
@@ -55,6 +45,16 @@ Public Class usrCntlAPI
cboAPIArt.changeItem("")
cboPartnersystem.Items.Clear()
cboPartnersystem.fillWithSQL("SELECT distinct(api_Partnersystem) from [tblAPI] where api_Partnersystem is not null ", False, "ADMIN", True)
cboFirma.Items.Clear()
cboFirma.fillWithSQL("SELECT distinct([api_Firma]) FROM [tblAPI] where api_Firma is not null ", False, "ADMIN", True)
cboProgram.Items.Clear()
cboProgram.fillWithSQL("SELECT distinct([api_progName]) FROM [tblAPI] where api_progName is not null ", False, "ADMIN", True)
End Sub
@@ -132,8 +132,8 @@ Public Class usrCntlAPI
Dim sqlstr As String = ""
Dim TopMax = If(IsNumeric(txtMaxSrch.Text), " TOP " & txtMaxSrch.Text, "")
sqlstr &= "SELECT " & TopMax & " api_id,[api_datetime],[api_progName],[api_Type],[api_Partnersystem], api_apiArt,api_apiUArt,[api_apiZollStatus],[api_InOut],[api_status],[api_fehlversuch],[api_progVersion],[api_EMail],[api_filepathSource],[api_filepathDestination],[api_Firma],[api_Username],[api_Vorsystem],[api_KundenNr],[api_AvisoId],[api_SendungsId],[api_FilialenNr],[api_AbfertigungsNr],[api_BezugsNr],[api_Zollbelegnummer],[api_finTstmp]
FROM [tblAPI] WHERE 1=1 "
sqlstr &= "SELECT " & TopMax & "* FROM [tblAPI] WHERE 1=1 "
'" api_id,[api_datetime],[api_progName],[api_Type],[api_Partnersystem],[api_Testsystem], api_apiArt,api_apiUArt,[api_apiZollStatus],[api_InOut],[api_status],[api_fehlversuch],[api_progVersion],[api_EMail],[api_filepathSource],[api_filepathDestination],[api_Firma],[api_Username],[api_Vorsystem],[api_KundenNr],[api_AvisoId],[api_SendungsId],[api_FilialenNr],[api_AbfertigungsNr],[api_BezugsNr],[api_Zollbelegnummer],[api_finTstmp]
With DataGridView
' .DataSource = myTable
@@ -216,11 +216,14 @@ Public Class usrCntlAPI
If cboFiliale._value <> "" Then sqlstr &= " AND [api_FilialenNr] LIKE @FilialenNr "
If txtAPIUArt.Text <> "" Then sqlstr &= " AND [api_apiUArt] LIKE @UArt "
If cboPartnersystem._value <> "" Then sqlstr &= " AND [api_Partnersystem] = @Partnersystem "
If cboAPIArt._value <> "" Then sqlstr &= " AND [api_apiArt] LIKE @APIArt "
If cboType._value <> "" Then sqlstr &= " AND [api_Type] LIKE @APIType "
If cboInOut._value <> "" Then sqlstr &= " AND [api_InOut] LIKE @APIInOut "
If cboFirma._value <> "" Then sqlstr &= " AND [api_Firma] = @Firma "
If cboAPIArt._value <> "" Then sqlstr &= " AND [api_apiArt] = @APIArt "
If cboType._value <> "" Then sqlstr &= " AND [api_Type] = @APIType "
If cboProgram._value <> "" Then sqlstr &= " AND [api_progName] = @Program "
If cboInOut._value <> "" Then sqlstr &= " AND [api_InOut] = @APIInOut "
If txtAvisoId.Text <> "" Then sqlstr &= " AND [api_AvisoId] LIKE @AvisoId "
If txtSendungsId.Text <> "" Then sqlstr &= " AND [api_SendungsId] LIKE @SendungsId "
@@ -247,7 +250,9 @@ Public Class usrCntlAPI
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("FilialenNr", cboFiliale._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UArt", txtAPIUArt.Text.Replace("*", "%").ToUpper))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Partnersystem", cboFiliale._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Program", cboProgram._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma", cboFirma._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("APIArt", cboAPIArt._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("APIType", cboType._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("APIInOut", cboInOut._value))
@@ -281,4 +286,28 @@ Public Class usrCntlAPI
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
initBtns("Tag")
End Sub
Private Sub DataGridView_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView.CellDoubleClick
Me.Cursor = Cursors.WaitCursor
Dim err As New frmAPI With {
.id = sender.CurrentRow.Cells("api_id").Value,
.progName = sender.CurrentRow.Cells("api_progName").Value,
.progVersion = sender.CurrentRow.Cells("api_progVersion").Value,
.datetime = sender.CurrentRow.Cells("api_datetime").Value,
.testsystem = sender.CurrentRow.Cells("api_Testsystem").Value,
.type = sender.CurrentRow.Cells("api_Type").Value,
.mail = sender.CurrentRow.Cells("api_EMail").Value,
.maid = sender.CurrentRow.Cells("api_MaId").Value,
.userName = sender.CurrentRow.Cells("api_Username").Value,
.firma = sender.CurrentRow.Cells("api_Firma").Value,
.errorCode = sender.CurrentRow.Cells("api_status").Value,
.errStack = IIf(sender.CurrentRow.Cells("api_errTstmp").Value IsNot DBNull.Value, "Datum: " & sender.CurrentRow.Cells("api_errTstmp").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_errMethodName").Value IsNot DBNull.Value, "Methode: " & sender.CurrentRow.Cells("api_errMethodName").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_errMessage").Value IsNot DBNull.Value, "Message: " & sender.CurrentRow.Cells("api_errMessage").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_errStack").Value IsNot DBNull.Value, "Stack: " & sender.CurrentRow.Cells("api_errStack").Value & vbNewLine, ""),
.errMessage = IIf(sender.CurrentRow.Cells("api_EMailFrom").Value IsNot DBNull.Value, "Mail von : " & sender.CurrentRow.Cells("api_EMailFrom").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_EMail").Value IsNot DBNull.Value, "E-Mail: " & sender.CurrentRow.Cells("api_EMail").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_KundenNr").Value IsNot DBNull.Value, "Kunde: " & sender.CurrentRow.Cells("api_KundenNr").Value & vbNewLine, ""),
.errMethodName = IIf(sender.CurrentRow.Cells("api_BezugsNr").Value IsNot DBNull.Value, "BezugsNr: " & sender.CurrentRow.Cells("api_BezugsNr").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_BezugsNr").Value IsNot DBNull.Value, "AVISO-ID: " & sender.CurrentRow.Cells("api_AvisoId").Value & vbNewLine, "") & IIf(sender.CurrentRow.Cells("api_KundenNr").Value IsNot DBNull.Value, "Kunde: " & sender.CurrentRow.Cells("api_KundenNr").Value & vbNewLine, "")
}
err.Show(Me)
sender.RELOAD()
Me.Cursor = Cursors.Default
End Sub
End Class