Initial
This commit is contained in:
3
edkb08/log_report/Class1.vb
Normal file
3
edkb08/log_report/Class1.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class Class1
|
||||
|
||||
End Class
|
||||
15
edkb08/log_report/Dataset1.xsd.bak
Normal file
15
edkb08/log_report/Dataset1.xsd.bak
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<xs:schema id="Dataset1"
|
||||
targetNamespace="http://tempuri.org/Dataset1.xsd"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="qualified"
|
||||
xmlns="http://tempuri.org/Dataset1.xsd"
|
||||
xmlns:mstns="http://tempuri.org/Dataset1.xsd"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xs:element name="Dataset1" msdata:IsDataSet="true">
|
||||
<xs:complexType>
|
||||
<xs:choice maxOccurs="unbounded"></xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
164
edkb08/log_report/Export.vb
Normal file
164
edkb08/log_report/Export.vb
Normal file
@@ -0,0 +1,164 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Xsl
|
||||
Imports System.Threading
|
||||
'Imports CrystalDecisions.CrystalReports.Engine
|
||||
'Imports CrystalDecisions.Shared
|
||||
|
||||
'''<summary>Funktionen für den Export der Journaldaten</summary>
|
||||
Public Class Export
|
||||
|
||||
Dim filename As String
|
||||
'''<summary>Auswertung erstellen und ggf. mittels DTO versenden</summary>
|
||||
'''<param name="dt">Datentabelle mit den Auswertungsdaten der Applikation</param>
|
||||
'''<param name="format">Format der Auswertung (txt, csv, xls, doc, pdf,
|
||||
'''xml)</param>
|
||||
Public Function Create_Report(ByVal dt As DataTable, ByVal format As String, ByVal Applikation As String) As String
|
||||
Try
|
||||
filename = Params.TempPfad + Applikation + "_" + Microsoft.VisualBasic.Format(Now, "yyyyMMddHHmmss") + "_EDKB08_Log"
|
||||
Select Case UCase(format)
|
||||
Case "PDF"
|
||||
filename = filename + ".pdf"
|
||||
'CR_Report(dt, format) 20140204 MNK Ausbau CrystalReport Funktion
|
||||
Case "XLS"
|
||||
filename = filename + ".xls"
|
||||
'CR_Report(dt, format) 20140204 MNK Ausbau CrystalReport Funktion
|
||||
Case "DOC"
|
||||
filename = filename + ".doc"
|
||||
'CR_Report(dt, format) 20140204 MNK Ausbau CrystalReport Funktion
|
||||
Case "CSV"
|
||||
filename = filename + ".csv"
|
||||
Extract_CSV(dt)
|
||||
Case "TXT"
|
||||
filename = filename + ".txt"
|
||||
Extract_TXT(dt)
|
||||
Case "XML"
|
||||
filename = filename + ".xml"
|
||||
Dim ds As New DataSet()
|
||||
ds.Tables.Add(dt.Copy)
|
||||
ds.WriteXml(filename)
|
||||
ds.Dispose()
|
||||
End Select
|
||||
Return filename
|
||||
Catch ex As Exception
|
||||
PrintOut("Fehler Crystal:" + ex.Message, EventLogEntryType.Error)
|
||||
Return ""
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
'''<summary>Journaldatei als CSV-Datei erstellen</summary>
|
||||
'''<param name="dt">Journaldaten</param>
|
||||
Private Sub Extract_CSV(ByVal dt As DataTable)
|
||||
Dim s As String
|
||||
Dim i As Integer
|
||||
Dim c As Integer
|
||||
|
||||
Dim tw As TextWriter
|
||||
tw = New StreamWriter(New FileStream(filename, FileMode.Create))
|
||||
s = ""
|
||||
For i = 0 To dt.Columns.Count - 1
|
||||
s = s + dt.Columns(i).ColumnName + ";"
|
||||
Next
|
||||
tw.WriteLine(s)
|
||||
s = ""
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
For c = 0 To dt.Columns.Count - 1
|
||||
Try
|
||||
s = s + CType(dt.Rows(i).Item(c), String) + ";"
|
||||
Catch
|
||||
s = s + ""
|
||||
End Try
|
||||
Next
|
||||
tw.WriteLine(s)
|
||||
s = ""
|
||||
Next
|
||||
tw.Flush()
|
||||
tw.Close()
|
||||
End Sub
|
||||
|
||||
'''<summary>Journaldatei als TXT-Datei erstellen</summary>
|
||||
'''<param name="dt">Journaldaten</param>
|
||||
Private Sub Extract_TXT(ByVal dt As DataTable)
|
||||
Dim s As String
|
||||
Dim i As Integer
|
||||
Dim c As Integer
|
||||
|
||||
Dim tw As TextWriter
|
||||
tw = New StreamWriter(New FileStream(filename, FileMode.Create))
|
||||
s = ""
|
||||
For i = 0 To dt.Columns.Count - 1
|
||||
s = s + """" + dt.Columns(i).ColumnName + """" + ";"
|
||||
Next
|
||||
tw.WriteLine(s)
|
||||
s = ""
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
For c = 0 To dt.Columns.Count - 1
|
||||
Try
|
||||
s = s + """" + CType(dt.Rows(i).Item(c), String) + """" + ";"
|
||||
Catch
|
||||
s = s + ""
|
||||
End Try
|
||||
Next
|
||||
tw.WriteLine(s)
|
||||
s = ""
|
||||
Next
|
||||
tw.Flush()
|
||||
tw.Close()
|
||||
End Sub
|
||||
|
||||
'''<summary>Crystal-Report-Druck</summary>
|
||||
'''<param name="dt">Datentabelle, welche an Crystal zum Druck übergeben
|
||||
'''wird</param>
|
||||
'''<param name="format">Zu Exportierendes Format (XLS, DOC, PDF)</param>
|
||||
' Private Sub CR_Report(ByVal dt As DataTable, ByVal format As String)
|
||||
' Try
|
||||
' Dim CrystalReportDocument As ReportDocument
|
||||
' Dim CrystalExportOptions As ExportOptions
|
||||
' Dim CrystalDiskFileDestinationOptions As DiskFileDestinationOptions
|
||||
' Dim ds As New DataSet()
|
||||
' ds.Tables.Add(dt.Copy)
|
||||
|
||||
' CrystalReportDocument = New ReportDocument()
|
||||
' CrystalReportDocument.Load(DivFnkt.ApplicationPath + "Journal1.rpt")
|
||||
' CrystalReportDocument.SetDataSource(dt)
|
||||
|
||||
' CrystalReportDocument.SetDataSource(ds.Tables(0))
|
||||
|
||||
' CrystalDiskFileDestinationOptions = New DiskFileDestinationOptions()
|
||||
' CrystalDiskFileDestinationOptions.DiskFileName = filename
|
||||
' CrystalExportOptions = CrystalReportDocument.ExportOptions
|
||||
' With CrystalExportOptions
|
||||
' .DestinationOptions = CrystalDiskFileDestinationOptions
|
||||
' .ExportDestinationType = ExportDestinationType.DiskFile
|
||||
' Select Case UCase(format)
|
||||
' Case "PDF"
|
||||
' .ExportFormatType = ExportFormatType.PortableDocFormat
|
||||
' Case "XLS"
|
||||
' .ExportFormatType = ExportFormatType.Excel
|
||||
' Case "DOC"
|
||||
' .ExportFormatType = ExportFormatType.WordForWindows
|
||||
' End Select
|
||||
' End With
|
||||
' CrystalReportDocument.Export()
|
||||
' Try
|
||||
' 'sorry for this code (RS 2006-11-14)
|
||||
' CrystalReportDocument = Nothing
|
||||
' CrystalDiskFileDestinationOptions = Nothing
|
||||
' CrystalExportOptions = Nothing
|
||||
' Catch ex As Exception
|
||||
' PrintOut("Export.CR_Report()" + ex.Message, EventLogEntryType.Error)
|
||||
' End Try
|
||||
'Catch ex As Exception
|
||||
' PrintOut("Aufbereitung Crystal:" + ex.Message, EventLogEntryType.Error)
|
||||
' End Try
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
29
edkb08/log_report/Journal.xsd
Normal file
29
edkb08/log_report/Journal.xsd
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" standalone="yes" ?>
|
||||
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="de-CH">
|
||||
<xs:complexType>
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
<xs:element name="Table1">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Import_JobNr" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="Start_TS" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="Import_Eintragnr" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="TS" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="RecordNo" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Partnernr" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Dateityp" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Dateiname" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Status" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Statustext" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="EDOKA_Dokumentid" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Journal_Ausgeliefert" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="Appl" type="xs:string" minOccurs="0" />
|
||||
<xs:element name="Indexdaten" type="xs:string" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
5
edkb08/log_report/Journal.xsx
Normal file
5
edkb08/log_report/Journal.xsx
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Diese Datei wird automatisch vom XML-Schema-Designer generiert. Sie enthält Layoutinformationen für Komponenten auf der Designeroberfläche.-->
|
||||
<XSDDesignerLayout layoutVersion="1" viewPortLeft="0" viewPortTop="0">
|
||||
<Table1_XmlElement left="635" top="635" width="5292" height="2963" selected="0" zOrder="0" index="0" />
|
||||
</XSDDesignerLayout>
|
||||
266
edkb08/log_report/clsJournal.vb
Normal file
266
edkb08/log_report/clsJournal.vb
Normal file
@@ -0,0 +1,266 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.IO
|
||||
|
||||
|
||||
'''<summary>Funktionen für die Journalisierung der einzelnen
|
||||
'''Verarbeitungsschritte</summary>
|
||||
Public Class clsJournal
|
||||
|
||||
#Region "Deklarationen"
|
||||
'''<summary>Interne Variable für das Property JournalNr</summary>
|
||||
Dim m_Journalnr As Integer
|
||||
|
||||
'''<summary>Property für die JournalNr</summary>
|
||||
Property JournalNr() As Integer
|
||||
Get
|
||||
Return m_Journalnr
|
||||
End Get
|
||||
Set(ByVal Value As Integer)
|
||||
m_Journalnr = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
'''<summary>Variable für die Datenbankklasse clsImport_Job</summary>
|
||||
Dim Journal As New edokadb.clsImport_Job()
|
||||
'''<summary>Variable für die Datenbankklasse clsimport_eintrag</summary>
|
||||
Dim Journaleintrag As New edokadb.clsImport_Eintrag()
|
||||
|
||||
'''<summary>Interne Variable für das halten einer Datentabelle</summary>
|
||||
Dim tmptbl As New DataTable()
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "öffentliche Methoden"
|
||||
'''<summary>Öffnet ein neuer Journaleintrag in der Tabelle Import_Job</summary>
|
||||
'''<remarks>Für jede Indexdatei wird in der Verarbeitung ein neues Journal mit den
|
||||
'''entsprechenden Einträgen erstellt</remarks>
|
||||
'''<seealso cref="Main.Verarbeiten">Verarbeiten</seealso>
|
||||
Public Function Open_Journal() As Boolean
|
||||
Try
|
||||
Journal.cpMainConnectionProvider = Globals.conn_journale
|
||||
Journal.daStart_TS = New SqlDateTime(CType(Now, DateTime))
|
||||
Journal.iFeherhaft = New SqlInt32(CType(0, Int32))
|
||||
Journal.iJournal_Ausgeliefert = New SqlInt32(CType(0, Int32))
|
||||
Try
|
||||
Globals.conn_journale.OpenConnection()
|
||||
Catch
|
||||
End Try
|
||||
|
||||
Journal.Insert()
|
||||
Try
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
Catch
|
||||
End Try
|
||||
|
||||
Me.JournalNr = Journal.iImport_JobNr.Value
|
||||
Journal.Dispose()
|
||||
Catch
|
||||
Try
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
'''<summary>Schliessen des aktuell geöffneten Verarbeitungsjournales</summary>
|
||||
'''<remarks>Beim Abschluss eines Jobs wird der aktuelle Timestamp in der Tabelle
|
||||
'''Import_Job nachgeführt</remarks>
|
||||
'''<seealso cref="Main.Verarbeiten">Verarbeiten</seealso>
|
||||
Public Function Close_Journal() As Boolean
|
||||
Journal.cpMainConnectionProvider = Globals.conn_journale
|
||||
Journal.iImport_JobNr = New SqlInt32(CType(Me.JournalNr, Int32))
|
||||
Journal.SelectOne()
|
||||
If Fehler <> 0 Then
|
||||
Journal.iFeherhaft = New SqlInt32(CType(1, Integer))
|
||||
End If
|
||||
Journal.daEnde_TS = New SqlDateTime(CType(Now, DateTime))
|
||||
Globals.conn_journale.OpenConnection()
|
||||
Journal.Update()
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
End Function
|
||||
|
||||
'''<summary>Journaleintrag löschen</summary>
|
||||
'''<remarks>Löscht den Journaleintrag aus der Variabel JournalNr</remarks>
|
||||
Public Sub Delete_Entry()
|
||||
Journal.cpMainConnectionProvider = Globals.conn_journale
|
||||
Journal.iImport_JobNr = New SqlInt32(CType(Me.JournalNr, Int32))
|
||||
Journal.SelectOne()
|
||||
Journal.daEnde_TS = New SqlDateTime(CType(Now, DateTime))
|
||||
Globals.conn_journale.OpenConnection()
|
||||
Journal.Delete()
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
End Sub
|
||||
'''<summary>Einfügen eines neuen Journaldatensatzes</summary>
|
||||
'''<param name="RecNo">Recordnummer der Indexdaten bzw. "" für allgemeine
|
||||
'''Journaleinträte</param>
|
||||
'''<param name="Partnernr">Partnernr oder "" für allgemeine
|
||||
'''Einträge</param>
|
||||
'''<param name="dateityp">Dateityp der zu importierenden Datei bzw. ""
|
||||
'''für allgemeine Einträge</param>
|
||||
'''<param name="dateiname">Index-Dateiname oder Dateiname der zu importierenden
|
||||
'''Datei</param>
|
||||
'''<param name="Status">Status Nr</param>
|
||||
'''<param name="Statustext">Bezeichnung zur Statusnr</param>
|
||||
'''<param name="EDOKA_Dokumentid">Dokumentid des EDOKA-Dokumentes nach dem Import
|
||||
'''oder ""</param>
|
||||
'''<param name="Applikationnr">Fremdschlüssel zur Tabelle FA_APPL</param>
|
||||
'''<seealso cref="edokadb.clsFA_APPL">edkb08.edokadb.clsFA_APPL</seealso>
|
||||
Public Sub Insert_Journal(ByVal RecNo As String, ByVal Partnernr As String, ByVal dateityp As String, ByVal dateiname As String,
|
||||
ByVal Status As String, ByVal Statustext As String, ByVal EDOKA_Dokumentid As String,
|
||||
ByVal Applikationnr As String)
|
||||
If Status <> "" And Status <> "0" Then
|
||||
If Globals.Fehlermeldung <> "" Then Globals.Fehlermeldung = Globals.Fehlermeldung + vbCrLf
|
||||
Globals.Fehlermeldung = Globals.Fehlermeldung + Statustext
|
||||
End If
|
||||
Me.Journaleintrag.cpMainConnectionProvider = Globals.conn_journale
|
||||
Me.Journaleintrag.sRecordNo = New SqlString(CType(RecNo, String))
|
||||
Me.Journaleintrag.sPartnernr = New SqlString(CType(Partnernr, String))
|
||||
Me.Journaleintrag.sDateityp = New SqlString(CType(dateityp, String))
|
||||
Me.Journaleintrag.sDateiname = New SqlString(CType(dateiname, String))
|
||||
Me.Journaleintrag.sStatus = New SqlString(CType(Status, String))
|
||||
Me.Journaleintrag.sStatustext = New SqlString(CType(Statustext, String))
|
||||
Me.Journaleintrag.sEDOKA_Dokumentid = New SqlString(CType(EDOKA_Dokumentid, String))
|
||||
Try
|
||||
If Globals.Herkunftsapplikation.Rows.Count = 0 Then
|
||||
Me.Journaleintrag.sApplikationsnr = New SqlString(CType(0, String))
|
||||
Else
|
||||
Me.Journaleintrag.sApplikationsnr = New SqlString(CType(Globals.Herkunftsapplikation.Rows(0).Item(0), String))
|
||||
End If
|
||||
Catch
|
||||
Me.Journaleintrag.sApplikationsnr = New SqlString(CType(0, String))
|
||||
End Try
|
||||
Me.Journaleintrag.daTS = New SqlDateTime(CType(Now, DateTime))
|
||||
Me.Journaleintrag.iImport_JobNr = New SqlInt32(CType(JournalNr, Int32))
|
||||
Me.Journaleintrag.sEDOKA_Dokumenttyp = New SqlString(CType("", String))
|
||||
If RecNo <> "" Then
|
||||
Me.Journaleintrag.sIndexdaten = New SqlString(CType(get_indexdata(RecNo), String))
|
||||
Else
|
||||
Me.Journaleintrag.sIndexdaten = New SqlString(CType("", String))
|
||||
End If
|
||||
|
||||
Globals.conn_journale.OpenConnection()
|
||||
Me.Journaleintrag.Insert()
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
|
||||
If Status <> "0" And Status <> "" Then
|
||||
PrintLog(Str(Me.Journaleintrag.iImport_Eintragnr.Value) + " " + Status + " " + Statustext, EventLogEntryType.Error)
|
||||
Else
|
||||
PrintLog(Str(Me.Journaleintrag.iImport_Eintragnr.Value) + " " + Status + " " + Statustext, EventLogEntryType.Information)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function get_indexdata(ByVal Recno As Integer) As String
|
||||
Try
|
||||
Dim s As String = ""
|
||||
Dim i As Integer
|
||||
For i = 0 To Globals.temp_indexdaten.Columns.Count - 1
|
||||
s = s + LTrim(Str(i + 1)) + ": " + Trim(Globals.temp_indexdaten.Rows(Recno).Item(i)) + " "
|
||||
Next
|
||||
Return s
|
||||
Catch
|
||||
Return ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'''<summary>Ergänzt den Journaleintrag mit der zugehörenden
|
||||
'''Herkunftsapplikation</summary>
|
||||
'''<seealso cref="Globals.Herkunftsapplikation">edkb08.Globals</seealso>
|
||||
Public Sub Update_Journal()
|
||||
Try
|
||||
Dim j As New edokadb.clsImport_Job()
|
||||
j.iImport_JobNr = New SqlInt32(CType(Globals.Journal.JournalNr, Int32))
|
||||
j.cpMainConnectionProvider = Globals.conn_journale
|
||||
j.SelectOne()
|
||||
j.iApplikationNr = New SqlInt32(CType(Globals.Herkunftsapplikation.Rows(0).Item(0), Int32))
|
||||
Globals.conn_journale.OpenConnection()
|
||||
j.Update()
|
||||
Globals.conn_journale.CloseConnection(True)
|
||||
Catch ex As Exception
|
||||
PrintOut("clsJournal:Update_Journal:" + ex.Message + ex.StackTrace, EventLogEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#Region "Journal"
|
||||
|
||||
Public Function Print_Log(ByVal Applid As Integer, ByVal Applname As String, ByVal type As String) As String
|
||||
Dim dt As New DataTable()
|
||||
dt = Get_Journaldata(Applid)
|
||||
Dim ds As New DataSet()
|
||||
ds.Tables.Add(dt)
|
||||
|
||||
Dim x As New Export()
|
||||
Return x.Create_Report(dt, UCase(type), Globals.Herkunftsapplikation.Rows(0).Item(1))
|
||||
End Function
|
||||
|
||||
Public Function Print_Log_Batch(ByVal Applid As Integer, ByVal Applname As String, ByVal type As String) As String
|
||||
Dim dt As New DataTable()
|
||||
dt = Get_Journaldata(Applid)
|
||||
Dim ds As New DataSet()
|
||||
ds.Tables.Add(dt)
|
||||
|
||||
Dim x As New Export()
|
||||
Return x.Create_Report(dt, UCase(type), Applname)
|
||||
End Function
|
||||
|
||||
' Function table_to_csv(ByVal DT As DataTable) As String
|
||||
' Dim zeile As String = ""
|
||||
' Dim DR As DataRow
|
||||
' Dim DC As DataColumn
|
||||
|
||||
' ' Spaltenüberschriften
|
||||
' For Each DC In DT.Columns
|
||||
' zeile += IIf(zeile <> "", ";", "").ToString
|
||||
' zeile += DC.ColumnName
|
||||
' Next
|
||||
' table_to_csv += zeile & Chr(13)
|
||||
|
||||
' ' - Alle Zeillen ausgeben
|
||||
' For Each DR In DT.Rows
|
||||
' zeile = ""
|
||||
' ' Schleife über alle Spalten
|
||||
' For Each DC In DT.Columns
|
||||
' zeile += IIf(zeile <> "", ";", "").ToString
|
||||
' zeile += DR.Item(DC.ColumnName).ToString
|
||||
|
||||
' Next
|
||||
' table_to_csv += zeile & Chr(13)
|
||||
' Next
|
||||
'End Function
|
||||
|
||||
Private Function Get_Journaldata(ByVal applid As Integer) As DataTable
|
||||
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
||||
scmCmdToExecute.CommandText = "import_journal"
|
||||
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
||||
Dim dtToReturn As DataTable = New DataTable()
|
||||
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
||||
Try
|
||||
scmCmdToExecute.Connection = conn_journale.scoDBConnection
|
||||
scmCmdToExecute.Parameters.Add(New SqlParameter("@applid", SqlDbType.Int, 4, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, applid))
|
||||
sdaAdapter.Fill(dtToReturn)
|
||||
Return dtToReturn
|
||||
Catch ex As Exception
|
||||
Throw New Exception("Dokumenterstellung::Generic_Select::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
||||
Finally
|
||||
scmCmdToExecute.Dispose()
|
||||
sdaAdapter.Dispose()
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
BIN
edkb08/log_report/vssver.scc
Normal file
BIN
edkb08/log_report/vssver.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user