Gestellugnsgarantien und Certräge -> UsrCntl gebaut; Anhangsarten, Vermerke entgültig löschen

This commit is contained in:
2023-04-18 13:15:15 +02:00
parent 96e3848aed
commit dae030a193
15 changed files with 1185 additions and 9 deletions

View File

@@ -678,6 +678,12 @@
<Compile Include="kunden\usrCntlKundenZollVollmachten.vb">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="kunden\usrcntlVertraege.Designer.vb">
<DependentUpon>usrcntlVertraege.vb</DependentUpon>
</Compile>
<Compile Include="kunden\usrcntlVertraege.vb">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="mdm\Besuchsberichte\frmBesuchsberichte.Designer.vb">
<DependentUpon>frmBesuchsberichte.vb</DependentUpon>
</Compile>
@@ -749,6 +755,12 @@
<Compile Include="Speditionsbuch\rptSpeditionsberichtRg.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="usrcntlGestellungsgarantien.Designer.vb">
<DependentUpon>usrcntlGestellungsgarantien.vb</DependentUpon>
</Compile>
<Compile Include="usrcntlGestellungsgarantien.vb">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="USTV\cUSTVStatus.vb" />
<Compile Include="USTV\frmMDM_USTVAntrag.Designer.vb">
<DependentUpon>frmMDM_USTVAntrag.vb</DependentUpon>
@@ -2953,6 +2965,9 @@
<EmbeddedResource Include="kunden\usrCntlKundenZollVollmachten.resx">
<DependentUpon>usrCntlKundenZollVollmachten.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="kunden\usrcntlVertraege.resx">
<DependentUpon>usrcntlVertraege.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="mdm\Besuchsberichte\frmBesuchsberichte.resx">
<DependentUpon>frmBesuchsberichte.vb</DependentUpon>
</EmbeddedResource>
@@ -2987,6 +3002,9 @@
<EmbeddedResource Include="Speditionsbuch\rptSpeditionsberichtRg.resx">
<DependentUpon>rptSpeditionsberichtRg.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="usrcntlGestellungsgarantien.resx">
<DependentUpon>usrcntlGestellungsgarantien.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="USTV\frmMDM_USTVAntrag.resx">
<DependentUpon>frmMDM_USTVAntrag.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -235,8 +235,8 @@ Public Class frmBonitaet
Case "DE", "D"
If (CDbl(txtBonitaetsindex.Text) < 1.0 Or CDbl(txtBonitaetsindex.Text) > 5.0) And cboTool._value = "creditsafe" Then
lblWarning.Text = "B-Index muss zwischen 1.0 und 5.0 liegen"
If (CDbl(txtBonitaetsindex.Text) < 1.0 Or CDbl(txtBonitaetsindex.Text) > 6.0) And cboTool._value = "creditsafe" Then
lblWarning.Text = "B-Index muss zwischen 1.0 und 6.0 liegen"
Return False
End If

View File

@@ -2634,10 +2634,6 @@ Public Class usrCntlKundenuebersicht
Me.Cursor = Cursors.Default
End Sub
Private Sub dgvVollmachten_CellContentClick_1(sender As Object, e As DataGridViewCellEventArgs) Handles dgvVollmachten.CellContentClick
End Sub
Private Sub dgvVollmachten_DragDrop(sender As Object, e As DragEventArgs) Handles dgvVollmachten.DragDrop
Try
If e.Data.GetDataPresent("FileDrop", True) = True Then

215
SDL/kunden/usrcntlVertraege.Designer.vb generated Normal file
View File

@@ -0,0 +1,215 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class usrcntlVertraege
Inherits System.Windows.Forms.UserControl
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.dgvVertraege = New System.Windows.Forms.DataGridView()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button11 = New System.Windows.Forms.Button()
Me.Button12 = New System.Windows.Forms.Button()
Me.txtVertragVermerk = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.cboVertrag = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.datVertrag = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label4 = New System.Windows.Forms.Label()
CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'dgvVertraege
'
Me.dgvVertraege.AllowUserToAddRows = False
Me.dgvVertraege.AllowUserToDeleteRows = False
Me.dgvVertraege.AllowUserToOrderColumns = True
Me.dgvVertraege.AllowUserToResizeRows = False
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvVertraege.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
Me.dgvVertraege.BackgroundColor = System.Drawing.Color.White
Me.dgvVertraege.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvVertraege.Location = New System.Drawing.Point(0, 0)
Me.dgvVertraege.MultiSelect = False
Me.dgvVertraege.Name = "dgvVertraege"
Me.dgvVertraege.ReadOnly = True
Me.dgvVertraege.RowHeadersVisible = False
Me.dgvVertraege.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvVertraege.Size = New System.Drawing.Size(495, 97)
Me.dgvVertraege.TabIndex = 9
'
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.White
Me.Panel1.Controls.Add(Me.Button11)
Me.Panel1.Controls.Add(Me.Button12)
Me.Panel1.Controls.Add(Me.txtVertragVermerk)
Me.Panel1.Controls.Add(Me.Label16)
Me.Panel1.Controls.Add(Me.Label5)
Me.Panel1.Controls.Add(Me.cboVertrag)
Me.Panel1.Controls.Add(Me.datVertrag)
Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel1.Location = New System.Drawing.Point(0, 100)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(495, 46)
Me.Panel1.TabIndex = 10
'
'Button11
'
Me.Button11.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button11.ForeColor = System.Drawing.Color.Black
Me.Button11.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button11.Location = New System.Drawing.Point(392, 1)
Me.Button11.Name = "Button11"
Me.Button11.Size = New System.Drawing.Size(78, 25)
Me.Button11.TabIndex = 4
Me.Button11.Tag = ""
Me.Button11.Text = "Hinzufügen"
Me.Button11.UseVisualStyleBackColor = True
'
'Button12
'
Me.Button12.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button12.ForeColor = System.Drawing.Color.Black
Me.Button12.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button12.Location = New System.Drawing.Point(392, 24)
Me.Button12.Name = "Button12"
Me.Button12.Size = New System.Drawing.Size(78, 22)
Me.Button12.TabIndex = 7
Me.Button12.Tag = ""
Me.Button12.Text = "Abbrechen"
Me.Button12.UseVisualStyleBackColor = True
Me.Button12.Visible = False
'
'txtVertragVermerk
'
Me.txtVertragVermerk._DateTimeOnly = False
Me.txtVertragVermerk._numbersOnly = False
Me.txtVertragVermerk._numbersOnlyKommastellen = ""
Me.txtVertragVermerk._numbersOnlyTrennzeichen = True
Me.txtVertragVermerk._Prozent = False
Me.txtVertragVermerk._ShortDateNew = False
Me.txtVertragVermerk._ShortDateOnly = False
Me.txtVertragVermerk._TimeOnly = False
Me.txtVertragVermerk._TimeOnly_Seconds = False
Me.txtVertragVermerk._value = ""
Me.txtVertragVermerk._Waehrung = False
Me.txtVertragVermerk._WaehrungZeichen = True
Me.txtVertragVermerk.ForeColor = System.Drawing.Color.Black
Me.txtVertragVermerk.Location = New System.Drawing.Point(60, 23)
Me.txtVertragVermerk.MaxLineLength = -1
Me.txtVertragVermerk.MaxLines_Warning = ""
Me.txtVertragVermerk.MaxLines_Warning_Label = Nothing
Me.txtVertragVermerk.Name = "txtVertragVermerk"
Me.txtVertragVermerk.Size = New System.Drawing.Size(326, 20)
Me.txtVertragVermerk.TabIndex = 6
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label16.Location = New System.Drawing.Point(5, 26)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(49, 13)
Me.Label16.TabIndex = 5
Me.Label16.Text = "Vermerk:"
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(244, 6)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(41, 13)
Me.Label5.TabIndex = 2
Me.Label5.Text = "Datum:"
'
'cboVertrag
'
Me.cboVertrag._allowedValuesFreiText = Nothing
Me.cboVertrag._allowFreiText = False
Me.cboVertrag._value = ""
Me.cboVertrag.FormattingEnabled = True
Me.cboVertrag.Location = New System.Drawing.Point(60, 3)
Me.cboVertrag.Name = "cboVertrag"
Me.cboVertrag.Size = New System.Drawing.Size(178, 21)
Me.cboVertrag.TabIndex = 1
'
'datVertrag
'
Me.datVertrag._DateTimeOnly = False
Me.datVertrag._numbersOnly = False
Me.datVertrag._numbersOnlyKommastellen = ""
Me.datVertrag._numbersOnlyTrennzeichen = True
Me.datVertrag._Prozent = False
Me.datVertrag._ShortDateNew = True
Me.datVertrag._ShortDateOnly = False
Me.datVertrag._TimeOnly = False
Me.datVertrag._TimeOnly_Seconds = False
Me.datVertrag._value = ""
Me.datVertrag._Waehrung = False
Me.datVertrag._WaehrungZeichen = True
Me.datVertrag.ForeColor = System.Drawing.Color.Black
Me.datVertrag.Location = New System.Drawing.Point(291, 3)
Me.datVertrag.MaxLength = 10
Me.datVertrag.MaxLineLength = -1
Me.datVertrag.MaxLines_Warning = ""
Me.datVertrag.MaxLines_Warning_Label = Nothing
Me.datVertrag.Name = "datVertrag"
Me.datVertrag.Size = New System.Drawing.Size(95, 20)
Me.datVertrag.TabIndex = 3
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(3, 6)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(44, 13)
Me.Label4.TabIndex = 0
Me.Label4.Text = "Vertrag:"
'
'usrcntlVertraege
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.dgvVertraege)
Me.Name = "usrcntlVertraege"
Me.Size = New System.Drawing.Size(495, 146)
CType(Me.dgvVertraege, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.ResumeLayout(False)
End Sub
Public WithEvents dgvVertraege As DataGridView
Friend WithEvents Panel1 As Panel
Public WithEvents Button11 As Button
Friend WithEvents Button12 As Button
Friend WithEvents txtVertragVermerk As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label16 As Label
Friend WithEvents Label5 As Label
Friend WithEvents cboVertrag As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents datVertrag As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label4 As Label
End Class

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,178 @@
Imports com.esendex.sdk.surveys.models
Imports VERAG_PROG_ALLGEMEIN
Public Class usrcntlVertraege
Dim kdnr
Public Vid = -1
Public Shared Event clickOK(ByVal sender As System.Object, ByVal e As System.EventArgs)
Private Sub dgvVertraege_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvVertraege.CellContentDoubleClick
If dgvVertraege.SelectedRows.Count = 1 Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(dgvVertraege.SelectedRows(0).Cells("kv_datenarchivId").Value)
DS.OPEN_SINGLE()
End If
End Sub
Private Sub dgvVertraege_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvVertraege.CellMouseClick
If e.RowIndex < 0 Then Exit Sub
DirectCast(sender, DataGridView).Rows(e.RowIndex).Selected = True
If e.Button = Windows.Forms.MouseButtons.Right Then
If dgvVertraege.SelectedRows.Count > 0 Then
'ContextMenuStrip4.Show(Cursor.Position)
End If
End If
End Sub
Private Sub usrcntlVertraege_Load(sender As Object, e As EventArgs) Handles MyBase.Load
cboVertrag.fillWithSQL("SELECT kva_id,kva_Bezeichnung FROM [tblKundenVertraegeArten] ORDER BY kva_Bezeichnung", False, "FMZOLL", True)
initDGVVertraege(kdnr)
End Sub
Sub clearKV()
cboVertrag.changeItem("")
datVertrag.Text = ""
txtVertragVermerk.Text = ""
Button11.Text = "Hinzufügen"
Button12.Visible = False
If kdnr > 0 Then
Button11.Enabled = True
Else
Button11.Enabled = False
End If
End Sub
Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
Try
If cboVertrag._value <> "" And datVertrag._value <> "" Then
Dim KV As New VERAG_PROG_ALLGEMEIN.cKundenVertraege
If Button12.Visible Then
If dgvVertraege.SelectedRows.Count = 1 Then
KV = New VERAG_PROG_ALLGEMEIN.cKundenVertraege(dgvVertraege.SelectedRows(0).Cells("kv_id").Value)
Else
Exit Sub
End If
End If
KV.kv_KundenNr = kdnr
KV.kv_erhalten_Datum = datVertrag._value
KV.kv_vertragArtId = cboVertrag._value
KV.kv_Info = txtVertragVermerk.Text
If KV.SAVEOBJECT Then
Vid = KV.kv_Id
initDGVVertraege(KV.kv_KundenNr)
markDGVVertraege(KV.kv_Id)
initDGVVertraege(KV.kv_KundenNr)
RaiseEvent clickOK(sender, e)
'setKD(kdNr)
End If
clearKV()
End If
clearKV()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
If cboVertrag._value <> "" And datVertrag._value <> "" Then
Dim KV As New VERAG_PROG_ALLGEMEIN.cKundenVertraege
If Button12.Visible Then
If dgvVertraege.SelectedRows.Count = 1 Then
KV = New VERAG_PROG_ALLGEMEIN.cKundenVertraege(dgvVertraege.SelectedRows(0).Cells("kv_id").Value)
Else
Exit Sub
End If
End If
KV.kv_KundenNr = kdnr
KV.kv_erhalten_Datum = datVertrag._value
KV.kv_vertragArtId = cboVertrag._value
KV.kv_Info = txtVertragVermerk.Text
If KV.SAVE Then
Me.usrcntlVertraege_Load(sender, e)
'setKD(kdnr)
End If
clearKV()
End If
End Sub
Sub initDGVVertraege(Optional _kdnr = -1)
kdnr = _kdnr
With dgvVertraege
.Columns.Clear()
If kdnr = -1 Or kdnr Is Nothing Then Exit Sub
.DataSource = VERAG_PROG_ALLGEMEIN.cKundenVertraege.LOAD_LIST(kdnr)
If .Columns.Count = 0 Then Exit Sub
.Columns("kv_Id").Visible = False
.Columns("kv_KundenNr").Visible = False
.Columns("kv_vertragArtId").Visible = False
.Columns("kv_datenarchivId").Visible = False
.Columns("kv_erhalten_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("kv_erhalten_Datum").Width = 70
.Columns("kv_erhalten_Datum").HeaderText = "Datum"
.Columns("kva_Bezeichnung").Width = 120
.Columns("kva_Bezeichnung").HeaderText = "Art"
.Columns("kv_Info").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("kv_Info").HeaderText = "Info"
.Columns("kv_gueltig").Width = 35
.Columns("kv_gueltig").HeaderText = "gültig"
If True Then
Dim c As New DataGridViewImageColumn
c.Name = "clmnPDF" : c.HeaderText = "PDF"
c.Image = My.Resources.pdf_gray : c.ImageLayout = DataGridViewImageCellLayout.Zoom
c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
c.DefaultCellStyle.Tag = "PDF anzeigen"
.Columns.Add(c)
For Each r As DataGridViewRow In .Rows
If r.Cells("kv_datenarchivId").Value IsNot DBNull.Value AndAlso CInt(r.Cells("kv_datenarchivId").Value) > 0 Then
DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
End If
Next
End If
End With
clearKV()
End Sub
Private Sub insertAttachement(kv As cKundenVertraege)
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("Kundendaten_bearbeiten", "SDL") Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER("DOKUMENTE", "KD_VERTRÄGE", "", "", "", "KV_" & kv.kv_Id, kdnr)
If DS.uploadDataToDATENSERVERFileDialog(, ".pdf", , "PDF") Then
kv.kv_datenarchivId = DS.da_id
End If
MsgBox("keine Berechtigung!")
End If
End Sub
Private Sub markDGVVertraege(Optional vid As Integer = 0)
dgvVertraege.ClearSelection()
If vid > 0 Then
For Each row As DataGridViewRow In dgvVertraege.Rows
If row.Cells("kv_Id").Value = vid Then
row.Selected = True
End If
Next
End If
End Sub
End Class

View File

@@ -0,0 +1,192 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class usrcntlGestellungsgarantien
Inherits System.Windows.Forms.UserControl
'UserControl überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.dgvGestGarantie = New System.Windows.Forms.DataGridView()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.cbxGG = New System.Windows.Forms.CheckBox()
Me.txtGGDatum = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtT1VerzollungsadresseBestimmungszollstelle = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.Label11 = New System.Windows.Forms.Label()
Me.Button8 = New System.Windows.Forms.Button()
Me.Button9 = New System.Windows.Forms.Button()
CType(Me.dgvGestGarantie, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel2.SuspendLayout()
Me.SuspendLayout()
'
'dgvGestGarantie
'
Me.dgvGestGarantie.AllowUserToAddRows = False
Me.dgvGestGarantie.AllowUserToDeleteRows = False
Me.dgvGestGarantie.AllowUserToOrderColumns = True
Me.dgvGestGarantie.AllowUserToResizeRows = False
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvGestGarantie.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
Me.dgvGestGarantie.BackgroundColor = System.Drawing.Color.White
Me.dgvGestGarantie.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvGestGarantie.Location = New System.Drawing.Point(3, 3)
Me.dgvGestGarantie.MultiSelect = False
Me.dgvGestGarantie.Name = "dgvGestGarantie"
Me.dgvGestGarantie.ReadOnly = True
Me.dgvGestGarantie.RowHeadersVisible = False
Me.dgvGestGarantie.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvGestGarantie.Size = New System.Drawing.Size(506, 102)
Me.dgvGestGarantie.TabIndex = 13
'
'Panel2
'
Me.Panel2.BackColor = System.Drawing.Color.White
Me.Panel2.Controls.Add(Me.cbxGG)
Me.Panel2.Controls.Add(Me.txtGGDatum)
Me.Panel2.Controls.Add(Me.txtT1VerzollungsadresseBestimmungszollstelle)
Me.Panel2.Controls.Add(Me.Label11)
Me.Panel2.Controls.Add(Me.Button8)
Me.Panel2.Controls.Add(Me.Button9)
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Bottom
Me.Panel2.Location = New System.Drawing.Point(0, 107)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(509, 46)
Me.Panel2.TabIndex = 14
'
'cbxGG
'
Me.cbxGG.AutoSize = True
Me.cbxGG.Location = New System.Drawing.Point(87, 27)
Me.cbxGG.Name = "cbxGG"
Me.cbxGG.Size = New System.Drawing.Size(165, 17)
Me.cbxGG.TabIndex = 4
Me.cbxGG.Text = "generelle Gestellungsgarantie"
Me.cbxGG.UseVisualStyleBackColor = True
'
'txtGGDatum
'
Me.txtGGDatum._DateTimeOnly = False
Me.txtGGDatum._numbersOnly = False
Me.txtGGDatum._numbersOnlyKommastellen = ""
Me.txtGGDatum._numbersOnlyTrennzeichen = True
Me.txtGGDatum._Prozent = False
Me.txtGGDatum._ShortDateNew = True
Me.txtGGDatum._ShortDateOnly = False
Me.txtGGDatum._TimeOnly = False
Me.txtGGDatum._TimeOnly_Seconds = False
Me.txtGGDatum._value = ""
Me.txtGGDatum._Waehrung = False
Me.txtGGDatum._WaehrungZeichen = True
Me.txtGGDatum.ForeColor = System.Drawing.Color.Black
Me.txtGGDatum.Location = New System.Drawing.Point(256, 7)
Me.txtGGDatum.MaxLength = 10
Me.txtGGDatum.MaxLineLength = -1
Me.txtGGDatum.MaxLines_Warning = ""
Me.txtGGDatum.MaxLines_Warning_Label = Nothing
Me.txtGGDatum.Name = "txtGGDatum"
Me.txtGGDatum.Size = New System.Drawing.Size(100, 20)
Me.txtGGDatum.TabIndex = 2
'
'txtT1VerzollungsadresseBestimmungszollstelle
'
Me.txtT1VerzollungsadresseBestimmungszollstelle._allowFreitext = False
Me.txtT1VerzollungsadresseBestimmungszollstelle._AllowSetValue = False
Me.txtT1VerzollungsadresseBestimmungszollstelle._allowSpaceAsSplitter = False
Me.txtT1VerzollungsadresseBestimmungszollstelle._autoSizeGross = False
Me.txtT1VerzollungsadresseBestimmungszollstelle._hideIfListEmpty = True
Me.txtT1VerzollungsadresseBestimmungszollstelle._value = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.conn_art = "FMZOLL"
Me.txtT1VerzollungsadresseBestimmungszollstelle.dgvpos = "LEFT"
Me.txtT1VerzollungsadresseBestimmungszollstelle.DISPLAY_PARAM = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.INVISIBLE_COLUMNS = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.key_visible = False
Me.txtT1VerzollungsadresseBestimmungszollstelle.KEYPARAM = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.Location = New System.Drawing.Point(87, 7)
Me.txtT1VerzollungsadresseBestimmungszollstelle.MaxLength = 8
Me.txtT1VerzollungsadresseBestimmungszollstelle.Name = "txtT1VerzollungsadresseBestimmungszollstelle"
Me.txtT1VerzollungsadresseBestimmungszollstelle.searchActive = True
Me.txtT1VerzollungsadresseBestimmungszollstelle.Size = New System.Drawing.Size(163, 20)
Me.txtT1VerzollungsadresseBestimmungszollstelle.SQL_ORDER_BY = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.SQL_SELECT = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.SQL_WHERE = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.SQL_WhereParamList = Nothing
Me.txtT1VerzollungsadresseBestimmungszollstelle.TabIndex = 1
Me.txtT1VerzollungsadresseBestimmungszollstelle.usrcntl = Nothing
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label11.Location = New System.Drawing.Point(3, 10)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(78, 13)
Me.Label11.TabIndex = 0
Me.Label11.Text = "GG für Zollamt:"
'
'Button8
'
Me.Button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button8.ForeColor = System.Drawing.Color.Black
Me.Button8.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button8.Location = New System.Drawing.Point(362, 3)
Me.Button8.Name = "Button8"
Me.Button8.Size = New System.Drawing.Size(78, 25)
Me.Button8.TabIndex = 3
Me.Button8.Tag = ""
Me.Button8.Text = "Hinzufügen"
Me.Button8.UseVisualStyleBackColor = True
'
'Button9
'
Me.Button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button9.ForeColor = System.Drawing.Color.Black
Me.Button9.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button9.Location = New System.Drawing.Point(362, 24)
Me.Button9.Name = "Button9"
Me.Button9.Size = New System.Drawing.Size(78, 22)
Me.Button9.TabIndex = 5
Me.Button9.Tag = ""
Me.Button9.Text = "Abbrechen"
Me.Button9.UseVisualStyleBackColor = True
Me.Button9.Visible = False
'
'usrcntlGestellungsgarantien
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.Panel2)
Me.Controls.Add(Me.dgvGestGarantie)
Me.Name = "usrcntlGestellungsgarantien"
Me.Size = New System.Drawing.Size(509, 153)
CType(Me.dgvGestGarantie, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout()
Me.ResumeLayout(False)
End Sub
Public WithEvents dgvGestGarantie As DataGridView
Friend WithEvents Panel2 As Panel
Friend WithEvents cbxGG As CheckBox
Friend WithEvents txtGGDatum As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents txtT1VerzollungsadresseBestimmungszollstelle As VERAG_PROG_ALLGEMEIN.MySearchBox
Friend WithEvents Label11 As Label
Friend WithEvents Button8 As Button
Friend WithEvents Button9 As Button
End Class

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,132 @@
Public Class usrcntlGestellungsgarantien
Dim kdnr
Public Gid = -1
Public Shared Event clickOK(ByVal sender As System.Object, ByVal e As System.EventArgs)
Private Sub usrcntlGestellungsgarantien_Load(sender As Object, e As EventArgs) Handles MyBase.Load
txtT1VerzollungsadresseBestimmungszollstelle.initSearchBox(Me.FindForm, "[Code] ,[Code] as Nr,Description as Dienststelle,left(Code,2) as Land,[Description] +' (' +left(Code,2)+')' as display FROM [tbl_DY_ZollDE_C0141_Zollstellen]", {" [Code]", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", " left(Code,2),[Description]", "Code", "display", "FMZOLL", , 400, 200, {"display", "Code"})
initDGVGestGarantie()
End Sub
Sub initDGVGestGarantie(Optional _kdnr = -1)
kdnr = _kdnr
With dgvGestGarantie
.Columns.Clear()
If kdnr = -1 Then Exit Sub
.DataSource = VERAG_PROG_ALLGEMEIN.cGestellungsgarantien.LOAD_LIST(kdnr)
If .Columns.Count = 0 Then Exit Sub
.Columns("gg_Id").Visible = False
.Columns("gg_KundenNr").Visible = False
.Columns("gg_datenarchivId").Visible = False
.Columns("gg_erhalten_Datum").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
.Columns("gg_erhalten_Datum").Width = 70
.Columns("gg_erhalten_Datum").HeaderText = "Datum"
.Columns("gg_Zollamt").Width = 80
.Columns("gg_Zollamt").HeaderText = "Zollamt"
.Columns("gg_Info").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("gg_Info").HeaderText = "Info"
If True Then
Dim c As New DataGridViewImageColumn
c.Name = "clmnPDF" : c.HeaderText = "PDF"
c.Image = My.Resources.pdf_gray : c.ImageLayout = DataGridViewImageCellLayout.Zoom
c.Width = 40 : c.DefaultCellStyle.Padding = New Padding(2) : c.DefaultCellStyle.BackColor = Color.White
c.DefaultCellStyle.Tag = "PDF anzeigen"
.Columns.Add(c)
For Each r As DataGridViewRow In .Rows
If r.Cells("gg_datenarchivId").Value IsNot DBNull.Value AndAlso CInt(r.Cells("gg_datenarchivId").Value) > 0 Then
DirectCast(r.Cells("clmnPDF"), DataGridViewImageCell).Value = My.Resources.pdf
End If
Next
End If
End With
clearGG()
End Sub
Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
If (txtT1VerzollungsadresseBestimmungszollstelle._value <> "" Or cbxGG.Checked) And txtGGDatum._value <> "" Then
Dim GG As New VERAG_PROG_ALLGEMEIN.cGestellungsgarantien
If Button9.Visible Then
If dgvGestGarantie.SelectedRows.Count = 1 Then
GG = New VERAG_PROG_ALLGEMEIN.cGestellungsgarantien(dgvGestGarantie.SelectedRows(0).Cells("gg_id").Value)
Else
Exit Sub
End If
End If
GG.gg_KundenNr = kdnr
GG.gg_erhalten_Datum = txtGGDatum._value
GG.gg_Zollamt = If(cbxGG.Checked, "GENERELL", txtT1VerzollungsadresseBestimmungszollstelle._value)
If Not Button9.Visible AndAlso VERAG_PROG_ALLGEMEIN.cGestellungsgarantien.ENTRY_Exists(kdnr, GG.gg_Zollamt, txtGGDatum._value) Then
MsgBox("Der Eintrag existiert bereits!")
Exit Sub
End If
GG.gg_Info = txtT1VerzollungsadresseBestimmungszollstelle.GET_VALUE_OnlyReturn(txtT1VerzollungsadresseBestimmungszollstelle._value, False)
If GG.SAVEOBJECT Then
Gid = GG.gg_Id
txtT1VerzollungsadresseBestimmungszollstelle.SET_VALUE("")
initDGVGestGarantie(GG.gg_KundenNr)
txtT1VerzollungsadresseBestimmungszollstelle.Focus()
markDGVGestGarantie(GG.gg_Id)
initDGVGestGarantie(GG.gg_KundenNr)
RaiseEvent clickOK(sender, e)
End If
clearGG()
End If
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
clearGG()
End Sub
Sub clearGG()
txtT1VerzollungsadresseBestimmungszollstelle.SET_VALUE("")
txtGGDatum.Text = ""
cbxGG.Checked = False
Button8.Text = "Hinzufügen"
Button9.Visible = False
If kdnr > 0 Then
Button8.Enabled = True
Else
Button8.Enabled = False
End If
End Sub
Private Sub txtT1VerzollungsadresseBestimmungszollstelle_KeyDown(sender As Object, e As KeyEventArgs) Handles txtT1VerzollungsadresseBestimmungszollstelle.KeyDown
If e.KeyCode = Keys.Return Then
If txtT1VerzollungsadresseBestimmungszollstelle.usrcntl.Visible Then Exit Sub
Button8.PerformClick()
End If
End Sub
Private Sub dgvGestGarantie_CellContentDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvGestGarantie.CellContentDoubleClick
If dgvGestGarantie.SelectedRows.Count = 1 Then
Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(dgvGestGarantie.SelectedRows(0).Cells("gg_datenarchivId").Value)
DS.OPEN_SINGLE()
End If
End Sub
Private Sub markDGVGestGarantie(Optional gid As Integer = 0)
dgvGestGarantie.ClearSelection()
If gid > 0 Then
For Each row As DataGridViewRow In dgvGestGarantie.Rows
If row.Cells("gg_Id").Value = gid Then
row.Selected = True
End If
Next
End If
End Sub
End Class

View File

@@ -2140,7 +2140,6 @@ Public Class cVermerkeDAL
Public Function SpeichernVermerkIDAufgehoben(VermerkID, VermerkIDAufgehoben) As Boolean
Dim SQLstr As String = " UPDATE Vermerke SET VermerkIDAufgehoben = @VermerkIDAufgehoben WHERE VermerkID = @VermerkID"
'MsgBox("UPDATE Vermerke SET VermerkIDAufgehoben = " & VermerkIDAufgehoben & " WHERE VermerkID = " & VermerkID & "")
Dim conn As SqlConnection = cDatenbankAVISO.GetNewOpenConnection()
Using cmd As New SqlCommand(SQLstr, conn)
cmd.Parameters.AddWithValue("@VermerkID", VermerkID)
@@ -2157,6 +2156,21 @@ Public Class cVermerkeDAL
Return False
End Function
Public Sub togglegeloescht(ByVal hID As Integer)
Dim sql = String.Format("UPDATE Vermerke SET Geloescht=Geloescht-1 WHERE VermerkID = {0}", hID)
Dim conn As SqlConnection = cDatenbankAVISO.GetNewOpenConnection()
Using cmd As New SqlCommand(sql, conn)
Try
cmd.ExecuteNonQuery()
Catch ex As SqlException
MsgBox("Gelöscht kann nicht gesetzt werden!" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Fehler beim Löschen")
End Try
End Using
conn.Close()
End Sub
Public Sub UpdateLKW(ByVal avisoID As Integer, ByVal LKW_fertig As Boolean)

View File

@@ -0,0 +1,164 @@
Imports System.Data.SqlClient
Imports System.Reflection
Public Class cAvisoAnhangsarten_LIST
Public LIST As New List(Of cAvisoAnhangsarten)
Sub New()
LOAD_LIST()
End Sub
Public Sub LOAD_LIST()
Try
LIST.Clear()
Using conn As SqlConnection = SQL.GetNewOpenConnectionAVISO()
Using cmd As New SqlCommand("SELECT * FROM [tblAvisoAnhangsArten] ", conn)
' cmd.Parameters.AddWithValue("@OffertenNr", OffertenNr)
Dim dr = cmd.ExecuteReader()
While dr.Read
Dim l As New cAvisoAnhangsarten
For Each i In l.getParameterList()
Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
If dr.Item(i.Text) Is DBNull.Value Then
propInfo.SetValue(l, Nothing)
Else
propInfo.SetValue(l, dr.Item(i.Text))
End If
Next
LIST.Add(l)
End While
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
End Class
Public Class cAvisoAnhangsarten
Property aa_id As Integer
Property aa_name As Object = Nothing
Property aa_sort As Object = Nothing
Property aa_isBrexti As Object = Nothing
Property aa_aktiv As Object = Nothing
Property aa_bezeichnung As Object = Nothing
Property aa_firma As Object = Nothing
Public hasEntry = False
Dim SQL As New SQL
Sub New()
End Sub
Sub New(aa_id)
Me.aa_id = aa_id
LOAD()
End Sub
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_id", aa_id,, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_name", aa_name))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_sort", aa_sort))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_isBrexti", aa_isBrexti))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_aktiv", aa_aktiv))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_bezeichnung", aa_bezeichnung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("aa_firma", aa_firma))
Return list
End Function
Public Function SAVE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM [tblAvisoAnhangsArten] WHERE aa_id=@aa_id) " &
" BEGIN " & getUpdateCmd() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
" commit tran "
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Sub LOAD()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionAVISO()
Using cmd As New SqlCommand("SELECT * FROM [tblAvisoAnhangsArten] WHERE aa_id=@aa_id ", conn)
cmd.Parameters.AddWithValue("@aa_id", aa_id)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each li In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
If dr.Item(li.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(li.Text))
End If
Next
hasEntry = True
End If
dr.Close()
End Using
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblAvisoAnhangsArten] SET " & str & " WHERE aa_id=@aa_id ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO [tblAvisoAnhangsArten] (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
Return ""
End Function
End Class

View File

@@ -54,6 +54,19 @@ Public Class cGestellungsgarantien
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Function SAVEOBJECT() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN If EXISTS(Select * FROM tblGestellungsgarantien With(updlock, serializable) WHERE gg_Id=@gg_Id) " &
" BEGIN " & getUpdateCmd() & " End " &
" Else " &
" BEGIN " & getInsertCmd() & " End " &
" commit tran "
gg_Id = SQL.doSQLVarListID(gg_Id, sqlstr, "FMZOLL", , list)
Return gg_Id
End Function
Public Sub LOAD()
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()

View File

@@ -55,6 +55,19 @@ Public Class cKundenVertraege
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Function SAVEOBJECT() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN If EXISTS(Select * FROM tblKundenVertraege With(updlock, serializable) WHERE kv_Id=@kv_Id) " &
" BEGIN " & getUpdateCmd() & " End " &
" Else " &
" BEGIN " & getInsertCmd() & " End " &
" commit tran "
kv_Id = SQL.doSQLVarListID(kv_Id, sqlstr, "FMZOLL", , list)
Return kv_Id
End Function
Public Sub LOAD()
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()

View File

@@ -209,7 +209,7 @@ Public Class cDATENSERVER
Return s
End Function
Public Function uploadDataToDATENSERVER(srcPath, Optional bezeichnung = "", Optional endung = "", Optional allowMsg = True, Optional coll_archiv = False, Optional delteFromFileSystem = True) As Boolean
Public Function uploadDataToDATENSERVER(srcPath, Optional bezeichnung = "", Optional endung = "", Optional allowMsg = True, Optional coll_archiv = False, Optional delteFromFileSystem = True, Optional enableOverwritting = False) As Boolean
'LAST_ID = -1
If endung = "" Then Dim fi As New IO.DirectoryInfo(srcPath) : endung = fi.Extension
' If bezeichnung = "" Then bezeichnung = System.IO.Path.GetFileName(srcPath) : endung = ""
@@ -219,7 +219,7 @@ Public Class cDATENSERVER
genHEADER_DATA()
If Not da_multifiles Then
If allowMsg AndAlso DATA_LIST.LIST.Count > 0 Then
If allowMsg AndAlso (DATA_LIST.LIST.Count > 0 And Not enableOverwritting) Then
If Not vbYes = MsgBox("Die Datei existiert bereits. Soll die Datei ersetzt werden?", vbYesNoCancel) Then
Return False 'NICHT Passiert
End If

View File

@@ -324,6 +324,7 @@
<Compile Include="Classes\cAPI.vb" />
<Compile Include="Classes\cAufschubKonten.vb" />
<Compile Include="Classes\cAvisoAnhaenge.vb" />
<Compile Include="Classes\cAvisoAnhangsarten.vb" />
<Compile Include="Classes\cAvisoBenachrichtigungen.vb" />
<Compile Include="Classes\cBesuchsbericht.vb" />
<Compile Include="Classes\cBonitaetsauskunft.vb" />