DragDrop Verträge, VermerkeBesonderheiten KDStamm

This commit is contained in:
2023-11-22 15:27:26 +01:00
parent 71623c9562
commit 7acab43a73
9 changed files with 279 additions and 71 deletions

View File

@@ -1,8 +1,11 @@
Imports com.esendex.sdk.surveys.models
Imports sun.swing
Imports VERAG_PROG_ALLGEMEIN
Public Class usrcntlVertraege
Dim PDF_Attach_TMP = ""
Dim kdnr
Public Vid = -1
Public Shared Event clickOK(ByVal sender As System.Object, ByVal e As System.EventArgs)
@@ -62,7 +65,17 @@ Public Class usrcntlVertraege
KV.kv_vertragArtId = cboVertrag._value
KV.kv_Info = txtVertragVermerk.Text
If KV.SAVEOBJECT Then
If PDF_Attach_TMP <> "" Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "KD_VERTRÄGE", "", "", "", "KV_" & dgvVertraege.SelectedRows(0).Cells("kv_id").Value, kdnr)
If DS.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") Then
KV.kv_datenarchivId = DS.da_id
KV.SAVE()
End If
End If
Vid = KV.kv_Id
initDGVVertraege(KV.kv_KundenNr)
markDGVVertraege(KV.kv_Id)
@@ -71,9 +84,9 @@ Public Class usrcntlVertraege
'setKD(kdNr)
End If
clearKV()
End If
clearKV()
End If
clearKV()
PDF_Attach_TMP = ""
Catch ex As Exception
MsgBox(ex.Message)
End Try
@@ -100,6 +113,7 @@ Public Class usrcntlVertraege
'setKD(kdnr)
End If
clearKV()
PDF_Attach_TMP = ""
End If
End Sub
@@ -109,6 +123,8 @@ Public Class usrcntlVertraege
kdnr = _kdnr
PictureBox1.Visible = PDF_Attach_TMP <> ""
With dgvVertraege
.Columns.Clear()
@@ -175,4 +191,27 @@ Public Class usrcntlVertraege
End Sub
Private Sub Panel1_DragDrop(sender As Object, e As DragEventArgs) Handles Panel1.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
For Each path In files
' addData_SendungAnhang(path)
PDF_Attach_TMP = path
Next
ElseIf e.Data.GetDataPresent("FileGroupDescriptor") Then
Dim FilePath = VERAG_PROG_ALLGEMEIN.cProgramFunctions.EmAilAttach(e)
If FilePath <> "" Then
' addData_SendungAnhang(FilePath)
PDF_Attach_TMP = FilePath
End If
End If
End Sub
End Class