Essensbestellungen, scanlist, etc.
This commit is contained in:
@@ -119,7 +119,7 @@ Partial Class usrcntlPDFScanList
|
||||
Me.cntxt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UmbenennenToolStripMenuItem, Me.LöschenToolStripMenuItem, Me.ToolStripSeparator1, Me.KopierenZwischenablageToolStripMenuItem, Me.AlsEmailSendenToolStripMenuItem})
|
||||
Me.cntxt.Name = "cntxt"
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 120)
|
||||
Me.cntxt.Size = New System.Drawing.Size(218, 98)
|
||||
'
|
||||
'usrcntlPDFScanList
|
||||
'
|
||||
|
||||
@@ -25,6 +25,7 @@ Public Class usrcntlPDFScanList
|
||||
|
||||
|
||||
Public Event FileAdded(id As String, path As String, name As String)
|
||||
Public Event FileDeleted()
|
||||
|
||||
Private Sub usrcntlPDFScan_Layout(sender As Object, e As LayoutEventArgs) Handles Me.Layout
|
||||
' Me.txt.Text = _TEXT_PDF
|
||||
@@ -187,6 +188,7 @@ Public Class usrcntlPDFScanList
|
||||
DS.DELETE_COMPLETE()
|
||||
End If
|
||||
initPdf()
|
||||
RaiseEvent FileDeleted()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
@@ -332,35 +334,76 @@ Public Class usrcntlPDFScanList
|
||||
e.Effect = DragDropEffects.All
|
||||
End Sub
|
||||
Private Sub txt_Click(sender As Object, e As DragEventArgs) Handles Me.DragDrop ', txt.DragDrop, Me.DragDrop, picPDF.DragDrop
|
||||
If e.Data.GetDataPresent("FileDrop", True) = True Then
|
||||
Dim FileList As String() = CType(e.Data.GetData("FileDrop"), Object) 'Hier wird der Variable "Wert" das übergeben, was wir auf die Form gezogen haben. Bei einer Datei wäre es dann der Pfad der Datei.
|
||||
If FileList.Count > 0 Then
|
||||
If Not _MULTI_FILES And FileList.Count > 1 Then
|
||||
MsgBox("Es können nicht mehrere Dateien hochgeladen werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
For Each W In FileList
|
||||
If W.ToUpper.EndsWith(".PDF") Then
|
||||
Try
|
||||
Dim bezeichnung = System.IO.Path.GetFileName(W).ToString
|
||||
DS.uploadDataToDATENSERVER(W, bezeichnung, ".pdf")
|
||||
'Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
'RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
'If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!" & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
'If e.Data.GetDataPresent("FileDrop", True) = True Then
|
||||
' Dim FileList As String() = CType(e.Data.GetData("FileDrop"), Object) 'Hier wird der Variable "Wert" das übergeben, was wir auf die Form gezogen haben. Bei einer Datei wäre es dann der Pfad der Datei.
|
||||
' If FileList.Count > 0 Then
|
||||
' If Not _MULTI_FILES And FileList.Count > 1 Then
|
||||
' MsgBox("Es können nicht mehrere Dateien hochgeladen werden!")
|
||||
' Exit Sub
|
||||
' End If
|
||||
' For Each W In FileList
|
||||
' If W.ToUpper.EndsWith(".PDF") Then
|
||||
' Try
|
||||
' Dim bezeichnung = System.IO.Path.GetFileName(W).ToString
|
||||
' DS.uploadDataToDATENSERVER(W, bezeichnung, ".pdf")
|
||||
' 'Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' 'RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
' 'If DS.DATA_LIST.LIST.Count > 0 Then
|
||||
' ' Dim l As VERAG_PROG_ALLGEMEIN.cDatenarchiv_Collection = DS.DATA_LIST.LIST(DS.DATA_LIST.LIST.Count - 1)
|
||||
' ' RaiseEvent FileAdded(l.coll_id, l.coll_pfad, l.coll_bezeichnung)
|
||||
' 'End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox("FEHLER: UserControl möglicherweise nicht initialisiert!" & ex.Message & ex.StackTrace)
|
||||
' End Try
|
||||
' End If
|
||||
' Next
|
||||
' initPdf()
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
Try
|
||||
Dim added = False
|
||||
|
||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
|
||||
|
||||
If files.Count > 1 Then
|
||||
MsgBox("Nur eine Datei möglich!")
|
||||
ElseIf files.Count > 0 Then
|
||||
If files(0) <> "" Then
|
||||
Dim fio As New System.IO.FileInfo(files(0))
|
||||
|
||||
If DS.uploadDataToDATENSERVER(files(0), fio.Name, ".pdf") Then
|
||||
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
|
||||
MsgBox("Dokument wurde hochgeladen.")
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
initPdf()
|
||||
End If
|
||||
|
||||
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
|
||||
Dim FilePath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.EmAilAttach(e)
|
||||
If FilePath <> "" Then
|
||||
Dim fio As New System.IO.FileInfo(FilePath)
|
||||
If DS.uploadDataToDATENSERVER(FilePath, fio.Name, ".pdf") Then
|
||||
RaiseEvent FileAdded(DS.da_id, DS.GET_TOP1_PATH, DS.da_name)
|
||||
MsgBox("Dokument wurde hochgeladen.")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub cntxt_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles cntxt.Opening
|
||||
UmbenennenToolStripMenuItem.Visible = (MyListBox1.SelectedItems.Count = 1)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user