You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.8 KiB
73 lines
2.8 KiB
Imports System.IO
|
|
Public Class frmScanKorrektur
|
|
Dim db_conn As New DB_Connection
|
|
Dim dbd As New DB
|
|
|
|
Private Sub SchliessenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SchliessenToolStripMenuItem.Click
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub frmScanKorrektur_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
dbd.Get_Data("Stefan Hutter lokal")
|
|
Me.C1TrueDBGrid1.DataSource = dbd.dsDaten
|
|
Me.C1TrueDBGrid1.DataMember = dbd.dsDaten.Tables(0).TableName
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(0).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(1).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(2).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(3).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(4).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(5).AutoSize()
|
|
Me.C1TrueDBGrid1.Splits(0).DisplayColumns(6).AutoSize()
|
|
|
|
|
|
End Sub
|
|
|
|
Private Sub C1TrueDBGrid1_RowColChange(sender As Object, e As C1.Win.C1TrueDBGrid.RowColChangeEventArgs) Handles C1TrueDBGrid1.RowColChange
|
|
Try
|
|
Dim myRow As DataRow
|
|
If System.IO.File.Exists("h:\tssettings\edoka\tmp.pdf") Then
|
|
Try
|
|
System.IO.File.Delete("h:\tssettings\edoka\tmp.pdf")
|
|
System.IO.File.Delete("h:\tssettings\edoka\tmp.xml")
|
|
Catch
|
|
End Try
|
|
|
|
End If
|
|
myRow = dbd.dsDaten.Tables(0).Rows(0)
|
|
Dim MyData() As Byte
|
|
MyData = myRow.Item("Daten")
|
|
'If myRow.Item(2).ToString = "" Then DokType = ".doc" Else DokType = myRow.Item(2)
|
|
Dim K As Long
|
|
K = UBound(MyData)
|
|
Dim fs As New FileStream("h:\tssettings\edoka\tmp.pdf", FileMode.OpenOrCreate, FileAccess.Write)
|
|
fs.Write(MyData, 0, K)
|
|
fs.Close()
|
|
fs = Nothing
|
|
Me.PdfViewerControl1.Load("h:\tssettings\edoka\tmp.pdf")
|
|
|
|
|
|
|
|
Dim writeFile As TextWriter = New StreamWriter("h:\tssettings\edoka\tmp.xml")
|
|
|
|
writeFile.WriteLine(myRow.Item("xml"))
|
|
writeFile.Flush()
|
|
writeFile.Close()
|
|
writeFile = Nothing
|
|
|
|
'If myRow.Item(2).ToString = "" Then DokType = ".doc" Else DokType = myRow.Item(2)
|
|
|
|
|
|
Dim ds As New DataSet
|
|
ds.ReadXml("h:\tssettings\edoka\tmp.xml")
|
|
Me.txtnrpar00.Text = ds.Tables(0).Rows(0).Item("Partnernr")
|
|
Me.txtbarcode.Text = ds.Tables(0).Rows(0).Item("Barcodeid")
|
|
Catch ex As Exception
|
|
MsgBox(ex.Message)
|
|
End Try
|
|
|
|
End Sub
|
|
|
|
Private Sub txtnrpar00_VisibleChanged(sender As Object, e As EventArgs) Handles txtnrpar00.VisibleChanged, Label1.VisibleChanged
|
|
|
|
End Sub
|
|
End Class |