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

@@ -558,7 +558,7 @@ Public Class cFakturierung
If checkAnlage_Orig(RECHNUNG) Then If checkAnlage_Orig(RECHNUNG) Then
Select Case RECHNUNG.RechnungSprache Select Case RECHNUNG.RechnungSprache
Case "EN" : strText = strText & "Please keep the original documents (e.g. ATR, EUR1) carefully for at least 7 years, as these will be required for any inspections by the customs authorities!" & vbCrLf Case "EN" : strText = strText & "Please keep the original documents (e.g. ATR, EUR1) carefully for at least 7 years, as these will be required for any inspections by the customs authorities!" & vbCrLf
Case Else : strText = strText & "Bitte bewahren Sie die Original Dokumente (zB ATR, EUR1) mid. 7 Jahre sorgfältig auf, diese werden bei etwaigen Prüfungen durch die Zollbehörde benötigt!" & vbCrLf Case Else : strText = strText & "Bitte bewahren Sie die Original Dokumente (zB ATR, EUR1) mind. 7 Jahre sorgfältig auf, diese werden bei etwaigen Prüfungen durch die Zollbehörde benötigt!" & vbCrLf
End Select End Select
End If End If
End Select End Select

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.6.5")> <Assembly: AssemblyVersion("1.2.6.6")>
<Assembly: AssemblyFileVersion("1.2.6.5")> <Assembly: AssemblyFileVersion("1.2.6.6")>

View File

@@ -1,4 +1,7 @@
Public Class usrCntlKundenBesonderheiten Imports DocumentFormat.OpenXml.Drawing
Imports DocumentFormat.OpenXml.Drawing.Charts
Public Class usrCntlKundenBesonderheiten
Dim kdNr As Integer = -1 Dim kdNr As Integer = -1
Dim loaded = False Dim loaded = False
@@ -41,7 +44,7 @@
Sub init(kdNr, Optional Kategorie = "", Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "") Sub init(kdNr, Optional Kategorie = "", Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "")
loaded = False loaded = False
If simpleView Then Panel1.Height = 0 : Panel1.Visible = False 'showhideOptions(False) If simpleView Then Panel1.Height = 0 : Panel1.Visible = False 'showhideOptions(False)
cboKategorie.changeItem(Kategorie) cboKategorie.changeItem(Kategorie)
cbx.Checked = False cbx.Checked = False
initDGV(kdNr, simpleView, preferedKategorie, preferedKategorieOtherIN) initDGV(kdNr, simpleView, preferedKategorie, preferedKategorieOtherIN)
loaded = True loaded = True
@@ -53,6 +56,33 @@
cboKategorie.Visible = visible cboKategorie.Visible = visible
lbl.Visible = visible lbl.Visible = visible
End Sub End Sub
Private Sub initDGV_CLMN()
Try
With dgvBesonderheiten
If .Columns.Count = 0 Then dgvBesonderheiten.Columns.Clear() : Exit Sub
For Each r As DataGridViewRow In .Rows
' r.Cells("clmnRufzeichen").Value = ""
Select Case r.Cells("kdb_kategorie").Value
Case "BH" : If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "BH" Then r.Cells("clmnRufzeichen").Value = "!"
Case "VERR"
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG
Case "VERR", "BH" : r.Cells("clmnRufzeichen").Value = "!"
End Select
Case "ZOLL" : If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "ZOLL" Then r.Cells("clmnRufzeichen").Value = "!"
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG
Case "ZOLL", "QS", "FISK" : r.Cells("clmnRufzeichen").Value = "!"
End Select
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Then r.Cells("clmnRufzeichen").Value = "!"
Case "VERIMEX" : If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERIMEX" Then r.Cells("clmnRufzeichen").Value = "!!"
End Select
Next
End With
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub initDGV(Optional kdnrTmp = -1, Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "") Private Sub initDGV(Optional kdnrTmp = -1, Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "")
dgvBesonderheiten.Columns.Clear() dgvBesonderheiten.Columns.Clear()
@@ -129,8 +159,17 @@
.Columns("kdb_mitName").Visible = False .Columns("kdb_mitName").Visible = False
.ColumnHeadersVisible = False .ColumnHeadersVisible = False
End If End If
' .GetOrder()
Dim colm As New DataGridViewTextBoxColumn
colm.HeaderText = ""
colm.Width = 20
colm.Name = "clmnRufzeichen"
colm.DefaultCellStyle.ForeColor = Color.Red
colm.DefaultCellStyle.Font = New Font(.DefaultCellStyle.Font.FontFamily, .DefaultCellStyle.Font.Size, FontStyle.Bold)
.Columns.Insert(2, colm)
' .GetOrder()
initDGV_CLMN()
End With End With
End Sub End Sub
@@ -186,4 +225,10 @@
End If End If
End Sub End Sub
Private Sub dgvBesonderheiten_Paint(sender As Object, e As PaintEventArgs) Handles dgvBesonderheiten.Paint
initDGV_CLMN()
doStyle()
End Sub
End Class End Class

View File

@@ -23,19 +23,19 @@ Partial Class usrCntlKundenuebersicht
<System.Diagnostics.DebuggerStepThrough()> <System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle37 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle38 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle39 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle40 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle41 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle42 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlKundenuebersicht)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrCntlKundenuebersicht))
Dim DataGridViewCellStyle43 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle44 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle45 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle46 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle48 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle47 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.cntxtAddVM = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtAddVM = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.btnExcel = New System.Windows.Forms.Button() Me.btnExcel = New System.Windows.Forms.Button()
@@ -164,6 +164,7 @@ Partial Class usrCntlKundenuebersicht
Me.lblStrasse = New System.Windows.Forms.TextBox() Me.lblStrasse = New System.Windows.Forms.TextBox()
Me.lblFirmenname2 = New System.Windows.Forms.TextBox() Me.lblFirmenname2 = New System.Windows.Forms.TextBox()
Me.lblTESTSystem = New System.Windows.Forms.Label() Me.lblTESTSystem = New System.Windows.Forms.Label()
Me.lblAdressZusatz = New System.Windows.Forms.TextBox()
Me.grpSonstiges = New System.Windows.Forms.GroupBox() Me.grpSonstiges = New System.Windows.Forms.GroupBox()
Me.Button14 = New System.Windows.Forms.Button() Me.Button14 = New System.Windows.Forms.Button()
Me.Button13 = New System.Windows.Forms.Button() Me.Button13 = New System.Windows.Forms.Button()
@@ -252,7 +253,7 @@ Partial Class usrCntlKundenuebersicht
Me.btnReloadOP = New System.Windows.Forms.Button() Me.btnReloadOP = New System.Windows.Forms.Button()
Me.cboFirmaFMZOLL = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboFirmaFMZOLL = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.SessionService1 = New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService() Me.SessionService1 = New VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService()
Me.lblAdressZusatz = New System.Windows.Forms.TextBox() Me.picVertrag = New System.Windows.Forms.PictureBox()
Me.cntxtAddVM.SuspendLayout() Me.cntxtAddVM.SuspendLayout()
Me.tbWeitereKundenDetails.SuspendLayout() Me.tbWeitereKundenDetails.SuspendLayout()
Me.tbOfferten.SuspendLayout() Me.tbOfferten.SuspendLayout()
@@ -302,6 +303,7 @@ Partial Class usrCntlKundenuebersicht
Me.ContextMenuStrip3.SuspendLayout() Me.ContextMenuStrip3.SuspendLayout()
Me.ContextMenuStrip2.SuspendLayout() Me.ContextMenuStrip2.SuspendLayout()
Me.ContextMenuStrip4.SuspendLayout() Me.ContextMenuStrip4.SuspendLayout()
CType(Me.picVertrag, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'cntxtAddVM 'cntxtAddVM
@@ -389,8 +391,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvOfferteDetailsUebersicht.AllowUserToDeleteRows = False Me.dgvOfferteDetailsUebersicht.AllowUserToDeleteRows = False
Me.dgvOfferteDetailsUebersicht.AllowUserToOrderColumns = True Me.dgvOfferteDetailsUebersicht.AllowUserToOrderColumns = True
Me.dgvOfferteDetailsUebersicht.AllowUserToResizeRows = False Me.dgvOfferteDetailsUebersicht.AllowUserToResizeRows = False
DataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvOfferteDetailsUebersicht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle37 Me.dgvOfferteDetailsUebersicht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
Me.dgvOfferteDetailsUebersicht.BackgroundColor = System.Drawing.Color.White Me.dgvOfferteDetailsUebersicht.BackgroundColor = System.Drawing.Color.White
Me.dgvOfferteDetailsUebersicht.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.dgvOfferteDetailsUebersicht.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.dgvOfferteDetailsUebersicht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvOfferteDetailsUebersicht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -410,8 +412,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvOffertenSperrliste.AllowUserToDeleteRows = False Me.dgvOffertenSperrliste.AllowUserToDeleteRows = False
Me.dgvOffertenSperrliste.AllowUserToOrderColumns = True Me.dgvOffertenSperrliste.AllowUserToOrderColumns = True
Me.dgvOffertenSperrliste.AllowUserToResizeRows = False Me.dgvOffertenSperrliste.AllowUserToResizeRows = False
DataGridViewCellStyle38.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvOffertenSperrliste.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle38 Me.dgvOffertenSperrliste.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
Me.dgvOffertenSperrliste.BackgroundColor = System.Drawing.Color.White Me.dgvOffertenSperrliste.BackgroundColor = System.Drawing.Color.White
Me.dgvOffertenSperrliste.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.dgvOffertenSperrliste.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.dgvOffertenSperrliste.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvOffertenSperrliste.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -421,10 +423,10 @@ Partial Class usrCntlKundenuebersicht
Me.dgvOffertenSperrliste.Name = "dgvOffertenSperrliste" Me.dgvOffertenSperrliste.Name = "dgvOffertenSperrliste"
Me.dgvOffertenSperrliste.ReadOnly = True Me.dgvOffertenSperrliste.ReadOnly = True
Me.dgvOffertenSperrliste.RowHeadersVisible = False Me.dgvOffertenSperrliste.RowHeadersVisible = False
DataGridViewCellStyle39.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer)) DataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer), CType(CType(240, Byte), Integer))
DataGridViewCellStyle39.SelectionForeColor = System.Drawing.Color.Black DataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.Black
Me.dgvOffertenSperrliste.RowsDefaultCellStyle = DataGridViewCellStyle39 Me.dgvOffertenSperrliste.RowsDefaultCellStyle = DataGridViewCellStyle3
Me.dgvOffertenSperrliste.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.dgvOffertenSperrliste.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvOffertenSperrliste.Size = New System.Drawing.Size(173, 257) Me.dgvOffertenSperrliste.Size = New System.Drawing.Size(173, 257)
Me.dgvOffertenSperrliste.TabIndex = 0 Me.dgvOffertenSperrliste.TabIndex = 0
@@ -562,8 +564,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvOffenePosten.AllowUserToAddRows = False Me.dgvOffenePosten.AllowUserToAddRows = False
Me.dgvOffenePosten.AllowUserToDeleteRows = False Me.dgvOffenePosten.AllowUserToDeleteRows = False
Me.dgvOffenePosten.AllowUserToResizeRows = False Me.dgvOffenePosten.AllowUserToResizeRows = False
DataGridViewCellStyle40.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle40 Me.dgvOffenePosten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
Me.dgvOffenePosten.BackgroundColor = System.Drawing.Color.White Me.dgvOffenePosten.BackgroundColor = System.Drawing.Color.White
Me.dgvOffenePosten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvOffenePosten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvOffenePosten.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvOffenePosten.Dock = System.Windows.Forms.DockStyle.Fill
@@ -643,8 +645,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvUmsatzbericht.AllowUserToDeleteRows = False Me.dgvUmsatzbericht.AllowUserToDeleteRows = False
Me.dgvUmsatzbericht.AllowUserToOrderColumns = True Me.dgvUmsatzbericht.AllowUserToOrderColumns = True
Me.dgvUmsatzbericht.AllowUserToResizeRows = False Me.dgvUmsatzbericht.AllowUserToResizeRows = False
DataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle41 Me.dgvUmsatzbericht.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
Me.dgvUmsatzbericht.BackgroundColor = System.Drawing.Color.White Me.dgvUmsatzbericht.BackgroundColor = System.Drawing.Color.White
Me.dgvUmsatzbericht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvUmsatzbericht.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvUmsatzbericht.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvUmsatzbericht.Dock = System.Windows.Forms.DockStyle.Fill
@@ -706,8 +708,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvAnhaenge.AllowUserToAddRows = False Me.dgvAnhaenge.AllowUserToAddRows = False
Me.dgvAnhaenge.AllowUserToDeleteRows = False Me.dgvAnhaenge.AllowUserToDeleteRows = False
Me.dgvAnhaenge.AllowUserToResizeRows = False Me.dgvAnhaenge.AllowUserToResizeRows = False
DataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvAnhaenge.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle42 Me.dgvAnhaenge.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
Me.dgvAnhaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.dgvAnhaenge.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.dgvAnhaenge.BackgroundColor = System.Drawing.Color.White Me.dgvAnhaenge.BackgroundColor = System.Drawing.Color.White
Me.dgvAnhaenge.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvAnhaenge.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
@@ -2227,6 +2229,18 @@ Partial Class usrCntlKundenuebersicht
Me.lblTESTSystem.TabIndex = 4 Me.lblTESTSystem.TabIndex = 4
Me.lblTESTSystem.Text = "! TESTSYSTEM !" Me.lblTESTSystem.Text = "! TESTSYSTEM !"
' '
'lblAdressZusatz
'
Me.lblAdressZusatz.BackColor = System.Drawing.Color.White
Me.lblAdressZusatz.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lblAdressZusatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblAdressZusatz.Location = New System.Drawing.Point(6, 62)
Me.lblAdressZusatz.Name = "lblAdressZusatz"
Me.lblAdressZusatz.ReadOnly = True
Me.lblAdressZusatz.Size = New System.Drawing.Size(353, 19)
Me.lblAdressZusatz.TabIndex = 11
Me.lblAdressZusatz.Text = "Zusatz"
'
'grpSonstiges 'grpSonstiges
' '
Me.grpSonstiges.BackColor = System.Drawing.Color.White Me.grpSonstiges.BackColor = System.Drawing.Color.White
@@ -2382,8 +2396,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvVollmachten.AllowUserToDeleteRows = False Me.dgvVollmachten.AllowUserToDeleteRows = False
Me.dgvVollmachten.AllowUserToOrderColumns = True Me.dgvVollmachten.AllowUserToOrderColumns = True
Me.dgvVollmachten.AllowUserToResizeRows = False Me.dgvVollmachten.AllowUserToResizeRows = False
DataGridViewCellStyle43.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvVollmachten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle43 Me.dgvVollmachten.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
Me.dgvVollmachten.BackgroundColor = System.Drawing.Color.White Me.dgvVollmachten.BackgroundColor = System.Drawing.Color.White
Me.dgvVollmachten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvVollmachten.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvVollmachten.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvVollmachten.Dock = System.Windows.Forms.DockStyle.Fill
@@ -2436,8 +2450,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvVertraege.AllowUserToDeleteRows = False Me.dgvVertraege.AllowUserToDeleteRows = False
Me.dgvVertraege.AllowUserToOrderColumns = True Me.dgvVertraege.AllowUserToOrderColumns = True
Me.dgvVertraege.AllowUserToResizeRows = False Me.dgvVertraege.AllowUserToResizeRows = False
DataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvVertraege.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle44 Me.dgvVertraege.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
Me.dgvVertraege.BackgroundColor = System.Drawing.Color.White Me.dgvVertraege.BackgroundColor = System.Drawing.Color.White
Me.dgvVertraege.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvVertraege.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvVertraege.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvVertraege.Dock = System.Windows.Forms.DockStyle.Fill
@@ -2461,6 +2475,7 @@ Partial Class usrCntlKundenuebersicht
Me.Panel1.Controls.Add(Me.cboVertrag) Me.Panel1.Controls.Add(Me.cboVertrag)
Me.Panel1.Controls.Add(Me.datVertrag) Me.Panel1.Controls.Add(Me.datVertrag)
Me.Panel1.Controls.Add(Me.Label4) Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Controls.Add(Me.picVertrag)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel1.Location = New System.Drawing.Point(3, 115) Me.Panel1.Location = New System.Drawing.Point(3, 115)
Me.Panel1.Name = "Panel1" Me.Panel1.Name = "Panel1"
@@ -2600,8 +2615,8 @@ Partial Class usrCntlKundenuebersicht
Me.dgvGestGarantie.AllowUserToDeleteRows = False Me.dgvGestGarantie.AllowUserToDeleteRows = False
Me.dgvGestGarantie.AllowUserToOrderColumns = True Me.dgvGestGarantie.AllowUserToOrderColumns = True
Me.dgvGestGarantie.AllowUserToResizeRows = False Me.dgvGestGarantie.AllowUserToResizeRows = False
DataGridViewCellStyle45.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvGestGarantie.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle45 Me.dgvGestGarantie.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
Me.dgvGestGarantie.BackgroundColor = System.Drawing.Color.White Me.dgvGestGarantie.BackgroundColor = System.Drawing.Color.White
Me.dgvGestGarantie.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvGestGarantie.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvGestGarantie.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvGestGarantie.Dock = System.Windows.Forms.DockStyle.Fill
@@ -3054,24 +3069,24 @@ Partial Class usrCntlKundenuebersicht
Me.dgvAufschub.AllowUserToResizeColumns = False Me.dgvAufschub.AllowUserToResizeColumns = False
Me.dgvAufschub.AllowUserToResizeRows = False Me.dgvAufschub.AllowUserToResizeRows = False
Me.dgvAufschub.BackgroundColor = System.Drawing.Color.White Me.dgvAufschub.BackgroundColor = System.Drawing.Color.White
DataGridViewCellStyle46.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle46.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control
DataGridViewCellStyle46.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle46.ForeColor = System.Drawing.SystemColors.WindowText DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText
DataGridViewCellStyle46.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle46.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle46.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle46 Me.dgvAufschub.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10
Me.dgvAufschub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvAufschub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvAufschub.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.KtoId, Me.Art, Me.HZA, Me.KontoNr, Me.EORI, Me.NL}) Me.dgvAufschub.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.KtoId, Me.Art, Me.HZA, Me.KontoNr, Me.EORI, Me.NL})
DataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle48.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle48.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle48.ForeColor = System.Drawing.SystemColors.ControlText DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle48.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle48.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle48 Me.dgvAufschub.DefaultCellStyle = DataGridViewCellStyle12
Me.dgvAufschub.Location = New System.Drawing.Point(13, 61) Me.dgvAufschub.Location = New System.Drawing.Point(13, 61)
Me.dgvAufschub.MultiSelect = False Me.dgvAufschub.MultiSelect = False
Me.dgvAufschub.Name = "dgvAufschub" Me.dgvAufschub.Name = "dgvAufschub"
@@ -3098,8 +3113,8 @@ Partial Class usrCntlKundenuebersicht
' '
'HZA 'HZA
' '
DataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
Me.HZA.DefaultCellStyle = DataGridViewCellStyle47 Me.HZA.DefaultCellStyle = DataGridViewCellStyle11
Me.HZA.HeaderText = "HZA" Me.HZA.HeaderText = "HZA"
Me.HZA.Name = "HZA" Me.HZA.Name = "HZA"
Me.HZA.ReadOnly = True Me.HZA.ReadOnly = True
@@ -3283,17 +3298,16 @@ Partial Class usrCntlKundenuebersicht
Me.SessionService1.Url = "https://finanzonline.bmf.gv.at/fonws/ws/session" Me.SessionService1.Url = "https://finanzonline.bmf.gv.at/fonws/ws/session"
Me.SessionService1.UseDefaultCredentials = False Me.SessionService1.UseDefaultCredentials = False
' '
'lblAdressZusatz 'picVertrag
' '
Me.lblAdressZusatz.BackColor = System.Drawing.Color.White Me.picVertrag.BackgroundImage = Global.SDL.My.Resources.Resources.pdf
Me.lblAdressZusatz.BorderStyle = System.Windows.Forms.BorderStyle.None Me.picVertrag.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.lblAdressZusatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.picVertrag.Location = New System.Drawing.Point(42, 4)
Me.lblAdressZusatz.Location = New System.Drawing.Point(6, 62) Me.picVertrag.Name = "picVertrag"
Me.lblAdressZusatz.Name = "lblAdressZusatz" Me.picVertrag.Size = New System.Drawing.Size(18, 18)
Me.lblAdressZusatz.ReadOnly = True Me.picVertrag.TabIndex = 9
Me.lblAdressZusatz.Size = New System.Drawing.Size(353, 19) Me.picVertrag.TabStop = False
Me.lblAdressZusatz.TabIndex = 11 Me.picVertrag.Visible = False
Me.lblAdressZusatz.Text = "Zusatz"
' '
'usrCntlKundenuebersicht 'usrCntlKundenuebersicht
' '
@@ -3380,6 +3394,7 @@ Partial Class usrCntlKundenuebersicht
Me.ContextMenuStrip3.ResumeLayout(False) Me.ContextMenuStrip3.ResumeLayout(False)
Me.ContextMenuStrip2.ResumeLayout(False) Me.ContextMenuStrip2.ResumeLayout(False)
Me.ContextMenuStrip4.ResumeLayout(False) Me.ContextMenuStrip4.ResumeLayout(False)
CType(Me.picVertrag, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@@ -3602,4 +3617,5 @@ Partial Class usrCntlKundenuebersicht
Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton Friend WithEvents FlatButton2 As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents SessionService1 As VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService Friend WithEvents SessionService1 As VERAG_PROG_ALLGEMEIN.at.gv.bmf.finanzonline.session.sessionService
Friend WithEvents lblAdressZusatz As TextBox Friend WithEvents lblAdressZusatz As TextBox
Friend WithEvents picVertrag As PictureBox
End Class End Class

View File

@@ -56,6 +56,7 @@ Public Class usrCntlKundenuebersicht
Dim db As New DataSet Dim db As New DataSet
Dim WHEREStatistik = "" Dim WHEREStatistik = ""
Public selectedTAB = "" Public selectedTAB = ""
Dim PDF_Attach_TMP_VERTRAEGE = ""
Property BER_STUFE = 99 Property BER_STUFE = 99
Private datenarchivId = -1 Private datenarchivId = -1
@@ -2339,6 +2340,7 @@ Public Class usrCntlKundenuebersicht
txtVertragVermerk.Text = "" txtVertragVermerk.Text = ""
Button11.Text = "Hinzufügen" Button11.Text = "Hinzufügen"
Button12.Visible = False Button12.Visible = False
picVertrag.Visible = PDF_Attach_TMP_VERTRAEGE <> ""
End Sub End Sub
Private Sub PDFLöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PDFLöschenToolStripMenuItem.Click Private Sub PDFLöschenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PDFLöschenToolStripMenuItem.Click
@@ -2442,6 +2444,15 @@ Public Class usrCntlKundenuebersicht
KV.kv_Info = txtVertragVermerk.Text KV.kv_Info = txtVertragVermerk.Text
If KV.SAVE Then If KV.SAVE Then
If PDF_Attach_TMP_VERTRAEGE <> "" Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "KD_VERTRÄGE", "", "", "", "KV_" & KV.kv_Id, kdNr)
If DS.uploadDataToDATENSERVER(PDF_Attach_TMP_VERTRAEGE) Then
KV.kv_datenarchivId = DS.da_id
KV.SAVE()
End If
PDF_Attach_TMP_VERTRAEGE = ""
End If
setKD(kdNr) setKD(kdNr)
End If End If
clearKV() clearKV()
@@ -2450,6 +2461,7 @@ Public Class usrCntlKundenuebersicht
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
PDF_Attach_TMP_VERTRAEGE = ""
clearKV() clearKV()
End Sub End Sub
@@ -2981,4 +2993,24 @@ Public Class usrCntlKundenuebersicht
End Sub End Sub
Private Sub Button14_DragDrop(sender As Object, e As DragEventArgs) Handles Button14.DragDrop, 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_VERTRAEGE = 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_VERTRAEGE = FilePath
End If
End If
picVertrag.Visible = PDF_Attach_TMP_VERTRAEGE <> ""
End Sub
End Class End Class

View File

@@ -714,7 +714,7 @@ Public Class usrcntlKundeBearbeitenFull
End If End If
initBesonderheitenNEU() initBesonderheitenNEU()
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try End Try
End Sub End Sub

View File

@@ -33,8 +33,10 @@ Partial Class usrcntlVertraege
Me.cboVertrag = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cboVertrag = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.datVertrag = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.datVertrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'dgvVertraege 'dgvVertraege
@@ -59,6 +61,7 @@ Partial Class usrcntlVertraege
'Panel1 'Panel1
' '
Me.Panel1.BackColor = System.Drawing.Color.White Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.Controls.Add(Me.PictureBox1)
Me.Panel1.Controls.Add(Me.Button11) Me.Panel1.Controls.Add(Me.Button11)
Me.Panel1.Controls.Add(Me.Button12) Me.Panel1.Controls.Add(Me.Button12)
Me.Panel1.Controls.Add(Me.txtVertragVermerk) Me.Panel1.Controls.Add(Me.txtVertragVermerk)
@@ -188,6 +191,17 @@ Partial Class usrcntlVertraege
Me.Label4.TabIndex = 0 Me.Label4.TabIndex = 0
Me.Label4.Text = "Vertrag:" Me.Label4.Text = "Vertrag:"
' '
'PictureBox1
'
Me.PictureBox1.BackgroundImage = Global.SDL.My.Resources.Resources.pdf
Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.PictureBox1.Location = New System.Drawing.Point(473, 0)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(22, 19)
Me.PictureBox1.TabIndex = 8
Me.PictureBox1.TabStop = False
Me.PictureBox1.Visible = False
'
'usrcntlVertraege 'usrcntlVertraege
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -199,6 +213,7 @@ Partial Class usrcntlVertraege
CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel1.ResumeLayout(False) Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout() Me.Panel1.PerformLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@@ -212,4 +227,5 @@ Partial Class usrcntlVertraege
Friend WithEvents cboVertrag As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cboVertrag As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents datVertrag As VERAG_PROG_ALLGEMEIN.MyTextBox Friend WithEvents datVertrag As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label4 As Label Friend WithEvents Label4 As Label
Friend WithEvents PictureBox1 As PictureBox
End Class End Class

View File

@@ -1,8 +1,11 @@
Imports com.esendex.sdk.surveys.models Imports com.esendex.sdk.surveys.models
Imports sun.swing
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
Public Class usrcntlVertraege Public Class usrcntlVertraege
Dim PDF_Attach_TMP = ""
Dim kdnr Dim kdnr
Public Vid = -1 Public Vid = -1
Public Shared Event clickOK(ByVal sender As System.Object, ByVal e As System.EventArgs) 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_vertragArtId = cboVertrag._value
KV.kv_Info = txtVertragVermerk.Text KV.kv_Info = txtVertragVermerk.Text
If KV.SAVEOBJECT Then 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 Vid = KV.kv_Id
initDGVVertraege(KV.kv_KundenNr) initDGVVertraege(KV.kv_KundenNr)
markDGVVertraege(KV.kv_Id) markDGVVertraege(KV.kv_Id)
@@ -71,9 +84,9 @@ Public Class usrcntlVertraege
'setKD(kdNr) 'setKD(kdNr)
End If End If
clearKV() clearKV()
End If End If
clearKV() clearKV()
PDF_Attach_TMP = ""
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message) MsgBox(ex.Message)
End Try End Try
@@ -100,6 +113,7 @@ Public Class usrcntlVertraege
'setKD(kdnr) 'setKD(kdnr)
End If End If
clearKV() clearKV()
PDF_Attach_TMP = ""
End If End If
End Sub End Sub
@@ -109,6 +123,8 @@ Public Class usrcntlVertraege
kdnr = _kdnr kdnr = _kdnr
PictureBox1.Visible = PDF_Attach_TMP <> ""
With dgvVertraege With dgvVertraege
.Columns.Clear() .Columns.Clear()
@@ -175,4 +191,27 @@ Public Class usrcntlVertraege
End Sub 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 End Class

View File

@@ -474,6 +474,66 @@ Public Class cProgramFunctions
End Sub End Sub
Shared Function EmAilAttach(e As DragEventArgs) As String
Try
' We have a embedded file. First lets try to get the file name out of memory
Dim theStream As IO.Stream = CType(e.Data.GetData("FileGroupDescriptor"), IO.Stream)
Dim fileGroupDescriptor(512) As Byte
theStream.Read(fileGroupDescriptor, 0, 512)
Dim fileName As System.Text.StringBuilder = New System.Text.StringBuilder("")
Dim i As Integer = 76
While Not (fileGroupDescriptor(i) = 0)
fileName.Append(Convert.ToChar(fileGroupDescriptor(i)))
System.Math.Min(System.Threading.Interlocked.Increment(i), i - 1)
End While
theStream.Close()
' We should have the file name or if its an email, the subject line. Create our temp file based on the temp path and this info
Dim myTempFile As String = IO.Path.GetTempPath & VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(fileName.ToString)
' Look to see if this is a email message. If so save that temporarily and get the temp file.
If InStr(myTempFile, ".msg") > 0 Then
Dim objOL As New Microsoft.Office.Interop.Outlook.Application
Dim objMI As Microsoft.Office.Interop.Outlook.MailItem
If objOL.ActiveExplorer.Selection.Count > 1 Then
MsgBox("Es kann nur ein Element übertagen werden.", MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, "Ein Element pro Vorgang")
End If
For Each objMI In objOL.ActiveExplorer.Selection()
objMI.SaveAs(myTempFile)
Exit For
Next
objOL = Nothing
objMI = Nothing
Else
' If its a attachment we need to pull the file itself out of memory
Dim ms As IO.MemoryStream = CType(e.Data.GetData("FileContents", True), IO.MemoryStream)
Dim FileBytes(CInt(ms.Length)) As Byte
' read the raw data into our variable
ms.Position = 0
ms.Read(FileBytes, 0, CInt(ms.Length))
ms.Close()
' save the raw data into our temp file
Dim fs As IO.FileStream = New IO.FileStream(myTempFile, IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
fs.Write(FileBytes, 0, FileBytes.Length)
fs.Close()
End If
' Make sure we have a actual file and also if we do make sure we erase it when done
If IO.File.Exists(myTempFile) Then
' Assign the file name to the add dialog
EmAilAttach = myTempFile
Else
EmAilAttach = String.Empty
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
EmAilAttach = String.Empty
End Try
End Function
End Class End Class