This commit is contained in:
2019-10-31 09:23:20 +01:00
parent 021cce6f04
commit c5595a729a
169 changed files with 16226 additions and 3376 deletions

View File

@@ -272,10 +272,11 @@ Public Class KdSearchBox
SQLstr &= " AND ( Ordnungsbegriff LIKE '" & srch & "%' OR AdressenNr LIKE '" & srch & "%' ) "
If srch2 <> "" Then SQLstr &= " AND ( PLZ LIKE '" & srch2 & "%' OR Ort LIKE '" & srch2 & "%' OR LandKz LIKE '" & srch2 & "%' OR Straße LIKE '" & srch2 & "%' ) "
SQLstr &= " AND [Auswahl]='A' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Then
SQLstr &= " AND [FilialenNr]='5501' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" Then
SQLstr &= " AND [FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
Else
SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
'SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
SQLstr &= " AND isnull([FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
End If
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
SQLstr &= " order by Ordnungsbegriff "
@@ -313,10 +314,11 @@ Public Class KdSearchBox
SQLstr &= " AND ( Ordnungsbegriff LIKE '" & srch & "%' OR AdressenNr LIKE '" & srch & "%' ) "
If srch2 <> "" Then SQLstr &= " AND ( PLZ LIKE '" & srch2 & "%' OR Ort LIKE '" & srch2 & "%' OR LandKz LIKE '" & srch2 & "%' OR Straße LIKE '" & srch2 & "%' ) "
SQLstr &= " AND [Auswahl]='I' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX" Then
SQLstr &= " AND [FilialenNr]='5501' "
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA <> "VERAG" Then
SQLstr &= " AND [FilialenNr]='" & VERAG_PROG_ALLGEMEIN.cAllgemein.STAMMFILIALE & "' "
Else
SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
'SQLstr &= " AND isnull([FilialenNr],0)<>'5501' "
SQLstr &= " AND isnull([FilialenNr],0) NOT IN ('5501','5601','5701','5801') "
End If
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
SQLstr &= " order by Ordnungsbegriff "

View File

@@ -272,26 +272,32 @@ Public Class MySearchBox
Public Sub SET_VALUE(KEYPARAM_Value, Optional showerror = True)
If Not active Then Exit Sub
Try
If Not active Then Exit Sub
If KEYPARAM_Value Is Nothing Then KEYPARAM_Value = ""
Dim SQLstr As String = "SELECT TOP 1 " & SQL_SELECT & " WHERE 1=1 "
SQLstr &= " AND " & KEYPARAM & " = '" & KEYPARAM_Value & "' "
SQLstr &= If(SQL_WHERE <> "", " AND " & SQL_WHERE, "")
If SQL_ORDER_BY <> "" Then SQLstr &= " ORDER BY " & SQL_ORDER_BY
' MsgBox(SQLstr)
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
setMeValue(dttmp.Rows(0))
Else
If _allowFreitext Then
Me.Text = KEYPARAM_Value
Me._value = KEYPARAM_Value
' MsgBox(SQLstr)
Dim dttmp As DataTable = SQL.loadDgvBySql(SQLstr, conn_art, , showerror)
If dttmp IsNot Nothing AndAlso dttmp.Rows.Count > 0 Then
setMeValue(dttmp.Rows(0))
Else
Me.Text = ""
Me._value = ""
If _allowFreitext Then
Me.Text = KEYPARAM_Value
Me._value = KEYPARAM_Value
Else
Me.Text = ""
Me._value = ""
End If
hideDgv(usrcntl)
End If
hideDgv(usrcntl)
End If
Catch ex As Exception
MsgBox("Es ist ein Fehler beim Such-Feld (" & Me.Name & ") aufgetreten 03: " & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & System.Reflection.MethodInfo.GetCurrentMethod.Name & vbNewLine & ex.StackTrace)
End Try
End Sub

View File

@@ -22,9 +22,8 @@ Partial Class frmPDFScanList
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.FlowLayoutPanel = New System.Windows.Forms.FlowLayoutPanel()
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.cntxtMulti = New System.Windows.Forms.ContextMenuStrip()
Me.DateiScannenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()

View File

@@ -60,4 +60,5 @@ Public Class frmPDFScanList
If Me IsNot Form.ActiveForm Then Me.Close()
End Sub
End Class

View File

@@ -32,7 +32,8 @@ Public Class usrCntLPDFScanSimple
Private Sub txt_Click(sender As Object, e As EventArgs) Handles txt.Click, Me.Click, picPDF.Click
If File.Exists(pdf_Path) Then
Process.Start(pdf_Path)
' Process.Start(pdf_Path)
Process.Start(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(pdf_Path, bezeichnung))
RaiseEvent CLICKED()
End If
End Sub

View File

@@ -143,7 +143,7 @@ Public Class usrcntlPDFScan
list.SetDesktopLocation(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
Else
'Process.Start(DS.DATA_LIST.LIST(0).coll_pfad)
DS.OPEN_SINGLE()
DS.OPEN_SINGLE(, True)
End If
End If
@@ -248,7 +248,7 @@ Public Class usrcntlPDFScan
For Each ii In DS.DATA_LIST.LIST
If ii.coll_id = coll_id Then
'Zwischenablage
Dim f() As String = {ii.coll_pfad}
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)}
Dim d As New DataObject(DataFormats.FileDrop, f)
Clipboard.SetDataObject(d, True)
Exit Sub
@@ -266,7 +266,7 @@ Public Class usrcntlPDFScan
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Mail.Attachments.Add(ii.coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, ii.coll_bezeichnung & ".pdf")
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue,, ii.coll_bezeichnung & ".pdf")
Mail.Display()
Catch ex As Exception
MsgBox("Fehler beim Öffnen der Mail!")
@@ -382,7 +382,7 @@ Public Class usrcntlPDFScan
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
Try
If DS.DATA_LIST.LIST.Count > 0 Then
Dim f() As String = {DS.DATA_LIST.LIST(0).coll_pfad}
Dim f() As String = {VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung)}
Dim d As New DataObject(DataFormats.FileDrop, f)
Clipboard.SetDataObject(d, True)
End If
@@ -397,7 +397,7 @@ Public Class usrcntlPDFScan
Dim outl As New Outlook.Application
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
Mail = outl.CreateItem(0)
Mail.Attachments.Add(DS.DATA_LIST.LIST(0).coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(DS.DATA_LIST.LIST(0).coll_pfad, DS.DATA_LIST.LIST(0).coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Display()
End If
Catch ex As Exception

View File

@@ -191,7 +191,11 @@ Public Class usrcntlPDFScanList
Private Sub MyListBox1_DoubleClick(sender As Object, e As EventArgs) Handles MyListBox1.DoubleClick
Try
DS.OPEN(DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value)
DS.OPEN(DirectCast(MyListBox1.SelectedItem, VERAG_PROG_ALLGEMEIN.MyListItem).Value,, True)
' VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
Catch ex As Exception
MsgBox("Fehler beim Öffnen!")
End Try
@@ -245,6 +249,7 @@ Public Class usrcntlPDFScanList
Private Sub KopierenZwischenablageToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KopierenZwischenablageToolStripMenuItem.Click
Try
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
Dim f(MyListBox1.SelectedItems.Count - 1) As String
Dim cnt = 0
If MyListBox1.SelectedItems.Count >= 1 Then
@@ -254,7 +259,7 @@ Public Class usrcntlPDFScanList
If ii.coll_id = item.Value Then
'Dim f() As String = {ii.coll_pfad}
If ii.coll_pfad <> "" Then
f(cnt) = ii.coll_pfad
f(cnt) = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung)
cnt += 1
'Exit For
End If
@@ -272,8 +277,10 @@ Public Class usrcntlPDFScanList
End Try
End Sub
Private Sub AlsEmailSendenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AlsEmailSendenToolStripMenuItem.Click
Try
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("ClipBoard_TMP")
If MyListBox1.SelectedItems.Count >= 1 Then
Try
Dim outl As New Outlook.Application
@@ -285,7 +292,7 @@ Public Class usrcntlPDFScanList
For Each ii In DS.DATA_LIST.LIST
If ii.coll_id = item.Value Then
If ii.coll_pfad <> "" Then
Mail.Attachments.Add(ii.coll_pfad, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
Mail.Attachments.Add(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.copyToTmp_KeepFilename(ii.coll_pfad, ii.coll_bezeichnung), Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue)
End If
End If
Next
@@ -301,6 +308,8 @@ Public Class usrcntlPDFScanList
End Try
End Sub
Private Sub Form1_DragEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles Me.DragEnter ', txt.DragEnter, Me.DragEnter, picPDF.DragEnter
e.Effect = DragDropEffects.All
End Sub