IDS-Dieselpreise, etc.

This commit is contained in:
2025-08-26 10:38:21 +02:00
parent 868a2abec3
commit 5937ba8067
6 changed files with 492 additions and 637 deletions

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.4.4.1")> <Assembly: AssemblyVersion("1.4.4.2")>
<Assembly: AssemblyFileVersion("1.4.4.1")> <Assembly: AssemblyFileVersion("1.4.4.2")>

View File

@@ -27,27 +27,16 @@ Partial Class usrCntlIDSPreise
Me.lblOffert = New System.Windows.Forms.TextBox() Me.lblOffert = New System.Windows.Forms.TextBox()
Me.Label11 = New System.Windows.Forms.Label() Me.Label11 = New System.Windows.Forms.Label()
Me.dgvOfferteDetails = New System.Windows.Forms.DataGridView() Me.dgvOfferteDetails = New System.Windows.Forms.DataGridView()
Me.btnDeleteLeistung = New System.Windows.Forms.Button()
Me.btnAddLeistung = New System.Windows.Forms.Button()
Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.btnOfferteSpeichern = New System.Windows.Forms.Button() Me.btnOfferteSpeichern = New System.Windows.Forms.Button()
Me.btnHinzufuegen = New System.Windows.Forms.Button() Me.btnEditIDS = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.Label1 = New System.Windows.Forms.Label()
Me.lblLeistunAddErr = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.lblLeistunAddErr2 = New System.Windows.Forms.Label()
Me.pnlEdit = New System.Windows.Forms.Panel()
Me.Label3 = New System.Windows.Forms.Label()
Me.cboLeistungenAdd = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.MyTextBox1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.btnDeleteOfferte = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.sbLeistungAdd = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.btnCreateOffert = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.dgvIDS = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvIDS = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.cbxTypes = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.btnCloseEditMode = New VERAG_PROG_ALLGEMEIN.FlatButton()
Me.lblEditMode = New System.Windows.Forms.Label()
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit()
Me.cntxtAddSdl.SuspendLayout() Me.cntxtAddSdl.SuspendLayout()
Me.pnlEdit.SuspendLayout()
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -95,32 +84,6 @@ Partial Class usrCntlIDSPreise
Me.dgvOfferteDetails.Size = New System.Drawing.Size(796, 475) Me.dgvOfferteDetails.Size = New System.Drawing.Size(796, 475)
Me.dgvOfferteDetails.TabIndex = 5 Me.dgvOfferteDetails.TabIndex = 5
' '
'btnDeleteLeistung
'
Me.btnDeleteLeistung.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.btnDeleteLeistung.BackgroundImage = Global.SDL.My.Resources.Resources.del
Me.btnDeleteLeistung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnDeleteLeistung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDeleteLeistung.Location = New System.Drawing.Point(348, 228)
Me.btnDeleteLeistung.Name = "btnDeleteLeistung"
Me.btnDeleteLeistung.Size = New System.Drawing.Size(28, 23)
Me.btnDeleteLeistung.TabIndex = 8
Me.btnDeleteLeistung.UseVisualStyleBackColor = True
Me.btnDeleteLeistung.Visible = False
'
'btnAddLeistung
'
Me.btnAddLeistung.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.btnAddLeistung.BackgroundImage = Global.SDL.My.Resources.Resources.plus
Me.btnAddLeistung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnAddLeistung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAddLeistung.Location = New System.Drawing.Point(375, 228)
Me.btnAddLeistung.Name = "btnAddLeistung"
Me.btnAddLeistung.Size = New System.Drawing.Size(28, 23)
Me.btnAddLeistung.TabIndex = 9
Me.btnAddLeistung.UseVisualStyleBackColor = True
Me.btnAddLeistung.Visible = False
'
'cntxtAddSdl 'cntxtAddSdl
' '
Me.cntxtAddSdl.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DToolStripMenuItem}) Me.cntxtAddSdl.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DToolStripMenuItem})
@@ -140,196 +103,29 @@ Partial Class usrCntlIDSPreise
Me.btnOfferteSpeichern.ForeColor = System.Drawing.Color.Black Me.btnOfferteSpeichern.ForeColor = System.Drawing.Color.Black
Me.btnOfferteSpeichern.Image = Global.SDL.My.Resources.Resources.save Me.btnOfferteSpeichern.Image = Global.SDL.My.Resources.Resources.save
Me.btnOfferteSpeichern.ImageAlign = System.Drawing.ContentAlignment.TopLeft Me.btnOfferteSpeichern.ImageAlign = System.Drawing.ContentAlignment.TopLeft
Me.btnOfferteSpeichern.Location = New System.Drawing.Point(664, 0) Me.btnOfferteSpeichern.Location = New System.Drawing.Point(899, 514)
Me.btnOfferteSpeichern.Name = "btnOfferteSpeichern" Me.btnOfferteSpeichern.Name = "btnOfferteSpeichern"
Me.btnOfferteSpeichern.Size = New System.Drawing.Size(132, 36) Me.btnOfferteSpeichern.Size = New System.Drawing.Size(132, 36)
Me.btnOfferteSpeichern.TabIndex = 15 Me.btnOfferteSpeichern.TabIndex = 15
Me.btnOfferteSpeichern.Tag = "" Me.btnOfferteSpeichern.Tag = ""
Me.btnOfferteSpeichern.Text = "Speichern" Me.btnOfferteSpeichern.Text = "Speichern"
Me.btnOfferteSpeichern.UseVisualStyleBackColor = True Me.btnOfferteSpeichern.UseVisualStyleBackColor = True
Me.btnOfferteSpeichern.Visible = False
' '
'btnHinzufuegen 'btnEditIDS
' '
Me.btnHinzufuegen.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnEditIDS.allowBorder = False
Me.btnHinzufuegen.ForeColor = System.Drawing.Color.Black Me.btnEditIDS.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnHinzufuegen.Image = Global.SDL.My.Resources.Resources.plus Me.btnEditIDS.BackgroundImage = Global.SDL.My.Resources.Resources.stift
Me.btnHinzufuegen.ImageAlign = System.Drawing.ContentAlignment.TopLeft Me.btnEditIDS.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnHinzufuegen.Location = New System.Drawing.Point(235, 1) Me.btnEditIDS.FlatAppearance.BorderSize = 0
Me.btnHinzufuegen.Name = "btnHinzufuegen" Me.btnEditIDS.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnHinzufuegen.Size = New System.Drawing.Size(106, 36) Me.btnEditIDS.ForeColor = System.Drawing.Color.Black
Me.btnHinzufuegen.TabIndex = 14 Me.btnEditIDS.Location = New System.Drawing.Point(965, 6)
Me.btnHinzufuegen.Tag = "" Me.btnEditIDS.Name = "btnEditIDS"
Me.btnHinzufuegen.Text = "Hinzufügen" Me.btnEditIDS.Size = New System.Drawing.Size(20, 20)
Me.btnHinzufuegen.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.btnEditIDS.TabIndex = 1
Me.btnHinzufuegen.UseVisualStyleBackColor = True Me.btnEditIDS.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(3, 3)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(105, 13)
Me.Label1.TabIndex = 10
Me.Label1.Text = "Leistung hinzufügen:"
'
'lblLeistunAddErr
'
Me.lblLeistunAddErr.AutoSize = True
Me.lblLeistunAddErr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblLeistunAddErr.ForeColor = System.Drawing.Color.Red
Me.lblLeistunAddErr.Location = New System.Drawing.Point(179, 3)
Me.lblLeistunAddErr.Name = "lblLeistunAddErr"
Me.lblLeistunAddErr.Size = New System.Drawing.Size(50, 13)
Me.lblLeistunAddErr.TabIndex = 11
Me.lblLeistunAddErr.Text = "Auswahl!"
Me.lblLeistunAddErr.Visible = False
'
'Label2
'
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.ForeColor = System.Drawing.Color.Red
Me.Label2.Location = New System.Drawing.Point(420, 283)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(50, 13)
Me.Label2.TabIndex = 7
Me.Label2.Text = "Auswahl!"
Me.Label2.Visible = False
'
'lblLeistunAddErr2
'
Me.lblLeistunAddErr2.AutoSize = True
Me.lblLeistunAddErr2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblLeistunAddErr2.ForeColor = System.Drawing.Color.Red
Me.lblLeistunAddErr2.Location = New System.Drawing.Point(2, 38)
Me.lblLeistunAddErr2.Name = "lblLeistunAddErr2"
Me.lblLeistunAddErr2.Size = New System.Drawing.Size(174, 13)
Me.lblLeistunAddErr2.TabIndex = 16
Me.lblLeistunAddErr2.Text = "Diese Bezeichnung existiert bereits!"
Me.lblLeistunAddErr2.Visible = False
'
'pnlEdit
'
Me.pnlEdit.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.pnlEdit.Controls.Add(Me.Label3)
Me.pnlEdit.Controls.Add(Me.Label1)
Me.pnlEdit.Controls.Add(Me.btnHinzufuegen)
Me.pnlEdit.Controls.Add(Me.lblLeistunAddErr2)
Me.pnlEdit.Controls.Add(Me.lblLeistunAddErr)
Me.pnlEdit.Controls.Add(Me.btnOfferteSpeichern)
Me.pnlEdit.Controls.Add(Me.cboLeistungenAdd)
Me.pnlEdit.Controls.Add(Me.MyTextBox1)
Me.pnlEdit.Location = New System.Drawing.Point(244, 513)
Me.pnlEdit.Name = "pnlEdit"
Me.pnlEdit.Size = New System.Drawing.Size(797, 60)
Me.pnlEdit.TabIndex = 20
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.ForeColor = System.Drawing.Color.Red
Me.Label3.Location = New System.Drawing.Point(55, 40)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(110, 13)
Me.Label3.TabIndex = 17
Me.Label3.Text = "Zuerst Offert anlegen!"
Me.Label3.Visible = False
'
'cboLeistungenAdd
'
Me.cboLeistungenAdd._allowedValuesFreiText = Nothing
Me.cboLeistungenAdd._allowFreiText = False
Me.cboLeistungenAdd._value = ""
Me.cboLeistungenAdd.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboLeistungenAdd.DropDownWidth = 350
Me.cboLeistungenAdd.FormattingEnabled = True
Me.cboLeistungenAdd.Location = New System.Drawing.Point(6, 16)
Me.cboLeistungenAdd.Name = "cboLeistungenAdd"
Me.cboLeistungenAdd.Size = New System.Drawing.Size(47, 21)
Me.cboLeistungenAdd.TabIndex = 12
'
'MyTextBox1
'
Me.MyTextBox1._DateTimeOnly = False
Me.MyTextBox1._numbersOnly = False
Me.MyTextBox1._numbersOnlyKommastellen = ""
Me.MyTextBox1._numbersOnlyTrennzeichen = True
Me.MyTextBox1._Prozent = False
Me.MyTextBox1._ShortDateNew = False
Me.MyTextBox1._ShortDateOnly = False
Me.MyTextBox1._TimeOnly = False
Me.MyTextBox1._TimeOnly_Seconds = False
Me.MyTextBox1._value = Nothing
Me.MyTextBox1._Waehrung = False
Me.MyTextBox1._WaehrungZeichen = True
Me.MyTextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!)
Me.MyTextBox1.ForeColor = System.Drawing.Color.Black
Me.MyTextBox1.Location = New System.Drawing.Point(52, 16)
Me.MyTextBox1.MaxLineLength = -1
Me.MyTextBox1.MaxLines_Warning = ""
Me.MyTextBox1.MaxLines_Warning_Label = Nothing
Me.MyTextBox1.Name = "MyTextBox1"
Me.MyTextBox1.Size = New System.Drawing.Size(177, 21)
Me.MyTextBox1.TabIndex = 13
'
'btnDeleteOfferte
'
Me.btnDeleteOfferte.allowBorder = False
Me.btnDeleteOfferte.BackgroundImage = Global.SDL.My.Resources.Resources.del_small
Me.btnDeleteOfferte.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnDeleteOfferte.FlatAppearance.BorderSize = 0
Me.btnDeleteOfferte.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDeleteOfferte.ForeColor = System.Drawing.Color.Black
Me.btnDeleteOfferte.Location = New System.Drawing.Point(182, 9)
Me.btnDeleteOfferte.Name = "btnDeleteOfferte"
Me.btnDeleteOfferte.Size = New System.Drawing.Size(20, 20)
Me.btnDeleteOfferte.TabIndex = 21
Me.btnDeleteOfferte.UseVisualStyleBackColor = True
Me.btnDeleteOfferte.Visible = False
'
'sbLeistungAdd
'
Me.sbLeistungAdd._allowFreitext = False
Me.sbLeistungAdd._AllowSetValue = False
Me.sbLeistungAdd._allowSpaceAsSplitter = False
Me.sbLeistungAdd._autoSizeGross = False
Me.sbLeistungAdd._hideIfListEmpty = True
Me.sbLeistungAdd._value = Nothing
Me.sbLeistungAdd.conn_art = "FMZOLL"
Me.sbLeistungAdd.dgvpos = "LEFT"
Me.sbLeistungAdd.DISPLAY_PARAM = Nothing
Me.sbLeistungAdd.INVISIBLE_COLUMNS = Nothing
Me.sbLeistungAdd.key_visible = False
Me.sbLeistungAdd.KEYPARAM = Nothing
Me.sbLeistungAdd.Location = New System.Drawing.Point(348, 255)
Me.sbLeistungAdd.Name = "sbLeistungAdd"
Me.sbLeistungAdd.searchActive = True
Me.sbLeistungAdd.Size = New System.Drawing.Size(223, 20)
Me.sbLeistungAdd.SQL_ORDER_BY = Nothing
Me.sbLeistungAdd.SQL_SELECT = Nothing
Me.sbLeistungAdd.SQL_WHERE = Nothing
Me.sbLeistungAdd.SQL_WhereParamList = Nothing
Me.sbLeistungAdd.TabIndex = 6
Me.sbLeistungAdd.usrcntl = Nothing
Me.sbLeistungAdd.Visible = False
'
'btnCreateOffert
'
Me.btnCreateOffert.allowBorder = False
Me.btnCreateOffert.BackgroundImage = Global.SDL.My.Resources.Resources.stift
Me.btnCreateOffert.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnCreateOffert.FlatAppearance.BorderSize = 0
Me.btnCreateOffert.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCreateOffert.ForeColor = System.Drawing.Color.Black
Me.btnCreateOffert.Location = New System.Drawing.Point(208, 10)
Me.btnCreateOffert.Name = "btnCreateOffert"
Me.btnCreateOffert.Size = New System.Drawing.Size(20, 20)
Me.btnCreateOffert.TabIndex = 1
Me.btnCreateOffert.UseVisualStyleBackColor = True
' '
'dgvIDS 'dgvIDS
' '
@@ -347,33 +143,69 @@ Partial Class usrCntlIDSPreise
Me.dgvIDS.Name = "dgvIDS" Me.dgvIDS.Name = "dgvIDS"
Me.dgvIDS.ReadOnly = True Me.dgvIDS.ReadOnly = True
Me.dgvIDS.RowHeadersVisible = False Me.dgvIDS.RowHeadersVisible = False
Me.dgvIDS.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
Me.dgvIDS.Size = New System.Drawing.Size(228, 444) Me.dgvIDS.Size = New System.Drawing.Size(228, 444)
Me.dgvIDS.TabIndex = 30 Me.dgvIDS.TabIndex = 30
' '
'cbxTypes
'
Me.cbxTypes._allowedValuesFreiText = Nothing
Me.cbxTypes._allowFreiText = False
Me.cbxTypes._value = ""
Me.cbxTypes.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cbxTypes.DropDownWidth = 350
Me.cbxTypes.FormattingEnabled = True
Me.cbxTypes.Location = New System.Drawing.Point(0, 36)
Me.cbxTypes.Name = "cbxTypes"
Me.cbxTypes.Size = New System.Drawing.Size(149, 21)
Me.cbxTypes.TabIndex = 18
'
'btnCloseEditMode
'
Me.btnCloseEditMode.allowBorder = False
Me.btnCloseEditMode.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnCloseEditMode.BackgroundImage = Global.SDL.My.Resources.Resources.del
Me.btnCloseEditMode.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btnCloseEditMode.FlatAppearance.BorderSize = 0
Me.btnCloseEditMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCloseEditMode.ForeColor = System.Drawing.Color.Black
Me.btnCloseEditMode.Location = New System.Drawing.Point(1000, 8)
Me.btnCloseEditMode.Name = "btnCloseEditMode"
Me.btnCloseEditMode.Size = New System.Drawing.Size(20, 20)
Me.btnCloseEditMode.TabIndex = 31
Me.btnCloseEditMode.UseVisualStyleBackColor = True
Me.btnCloseEditMode.Visible = False
'
'lblEditMode
'
Me.lblEditMode.AutoSize = True
Me.lblEditMode.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblEditMode.ForeColor = System.Drawing.Color.Red
Me.lblEditMode.Location = New System.Drawing.Point(551, 13)
Me.lblEditMode.Name = "lblEditMode"
Me.lblEditMode.Size = New System.Drawing.Size(64, 13)
Me.lblEditMode.TabIndex = 32
Me.lblEditMode.Text = "Edit Mode"
Me.lblEditMode.Visible = False
'
'usrCntlIDSPreise 'usrCntlIDSPreise
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White Me.BackColor = System.Drawing.Color.White
Me.Controls.Add(Me.lblEditMode)
Me.Controls.Add(Me.btnCloseEditMode)
Me.Controls.Add(Me.cbxTypes)
Me.Controls.Add(Me.dgvIDS) Me.Controls.Add(Me.dgvIDS)
Me.Controls.Add(Me.btnDeleteOfferte) Me.Controls.Add(Me.btnOfferteSpeichern)
Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.btnEditIDS)
Me.Controls.Add(Me.sbLeistungAdd)
Me.Controls.Add(Me.btnDeleteLeistung)
Me.Controls.Add(Me.btnAddLeistung)
Me.Controls.Add(Me.btnCreateOffert)
Me.Controls.Add(Me.Label11) Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.lblOffert) Me.Controls.Add(Me.lblOffert)
Me.Controls.Add(Me.dgvOfferteDetails) Me.Controls.Add(Me.dgvOfferteDetails)
Me.Controls.Add(Me.pnlEdit)
Me.Margin = New System.Windows.Forms.Padding(2) Me.Margin = New System.Windows.Forms.Padding(2)
Me.Name = "usrCntlIDSPreise" Me.Name = "usrCntlIDSPreise"
Me.Size = New System.Drawing.Size(1041, 576) Me.Size = New System.Drawing.Size(1041, 576)
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).EndInit()
Me.cntxtAddSdl.ResumeLayout(False) Me.cntxtAddSdl.ResumeLayout(False)
Me.pnlEdit.ResumeLayout(False)
Me.pnlEdit.PerformLayout()
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@@ -382,23 +214,12 @@ Partial Class usrCntlIDSPreise
Friend WithEvents lblOffert As System.Windows.Forms.TextBox Friend WithEvents lblOffert As System.Windows.Forms.TextBox
Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents Label11 As System.Windows.Forms.Label
Friend WithEvents dgvOfferteDetails As System.Windows.Forms.DataGridView Friend WithEvents dgvOfferteDetails As System.Windows.Forms.DataGridView
Friend WithEvents btnCreateOffert As VERAG_PROG_ALLGEMEIN.FlatButton Friend WithEvents btnEditIDS As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents btnDeleteLeistung As Button
Friend WithEvents btnAddLeistung As Button
Friend WithEvents cntxtAddSdl As ContextMenuStrip Friend WithEvents cntxtAddSdl As ContextMenuStrip
Friend WithEvents DToolStripMenuItem As ToolStripMenuItem Friend WithEvents DToolStripMenuItem As ToolStripMenuItem
Friend WithEvents btnOfferteSpeichern As Button Friend WithEvents btnOfferteSpeichern As Button
Friend WithEvents btnHinzufuegen As Button
Friend WithEvents Label1 As Label
Friend WithEvents sbLeistungAdd As VERAG_PROG_ALLGEMEIN.MySearchBox
Friend WithEvents lblLeistunAddErr As Label
Friend WithEvents cboLeistungenAdd As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents MyTextBox1 As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label2 As Label
Friend WithEvents lblLeistunAddErr2 As Label
Friend WithEvents pnlEdit As Panel
' Friend WithEvents CheckVatService1 As eu.europa.ec.checkVatService
Friend WithEvents Label3 As Label
Friend WithEvents btnDeleteOfferte As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents dgvIDS As VERAG_PROG_ALLGEMEIN.MyDatagridview Friend WithEvents dgvIDS As VERAG_PROG_ALLGEMEIN.MyDatagridview
Friend WithEvents cbxTypes As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents btnCloseEditMode As VERAG_PROG_ALLGEMEIN.FlatButton
Friend WithEvents lblEditMode As Label
End Class End Class

View File

@@ -1,5 +1,6 @@
 
Imports DocumentFormat.OpenXml.Office.Word
Imports VERAG_PROG_ALLGEMEIN Imports VERAG_PROG_ALLGEMEIN
Imports VERAG_PROG_ALLGEMEIN.TESTJSON Imports VERAG_PROG_ALLGEMEIN.TESTJSON
@@ -7,21 +8,18 @@ Public Class usrCntlIDSPreise
Dim FUNC As New cProgramFunctions Dim FUNC As New cProgramFunctions
Dim SQL As New SQL Dim SQL As New SQL
Public Event OfferteChanged() Public Event IDSChanged()
Dim OFFERTEBind As cEasyBinding Dim IDSDIESEL_Bind As cEasyBinding
Dim table Dim table
Public BIND_DB = "FMZOLL" Public BIND_DB = "FMZOLL"
Dim tmpDataTable As New DataTable Dim tmpDataTable As New DataTable
Dim currentOffert As VERAG_PROG_ALLGEMEIN.cOfferte Dim currentIDS As VERAG_PROG_ALLGEMEIN.cIDSDieselpreisRW
Dim currentOffertArchiv As VERAG_PROG_ALLGEMEIN.cOfferteArchiv
Dim edit As Boolean Dim edit As Boolean
Dim DGVHasChaged = False Dim DGVHasChaged = False
Dim isStandard Dim isStandard
Dim loaded = False Dim loaded = False
Dim isNew = False
Dim addLeistung = False
Dim ofID As Integer Dim ofID As Integer
Dim isVerag360 As Boolean = False Dim isVerag360 As Boolean = False
@@ -33,51 +31,78 @@ Public Class usrCntlIDSPreise
Public Sub init(Optional _isVerag360 As Boolean = False) Public Sub init(Optional _isVerag360 As Boolean = False)
initDGVOfferte()
edit = False edit = False
handleEditMode(edit) handleEditMode(edit)
isVerag360 = _isVerag360 isVerag360 = _isVerag360
End Sub End Sub
Sub initDGVOfferte()
dgvOfferteDetails.Columns.Clear()
With dgvIDS
.DataSource = SQL.loadDgvBySql("SELECT OutletCountry, Lieferland_ISO2 FROM [VERAG].[dbo].[tbl_IDS_Länder] ORDER BY OutletCountry", "FMZOLL")
.Columns("Lieferland_ISO2").HeaderText = "Land" Sub initDGVDieselpreiseDetails(Optional OutletCountryCode As Integer = -1)
.Columns("OutletCountry").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("OutletCountry").HeaderText = "Bezeichnung"
End With
End Sub
Sub initDGVOfferteDetails(OffertenNr)
loaded = False loaded = False
Try Try
With dgvOfferteDetails With dgvOfferteDetails
'.Columns.Clear()
Dim SQL_ = ""
Select Case cbxTypes._value
Case "L"
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter, tbl_IDS_Rechenwerte.SSMA_TimeStamp, tbl_IDS_Rechenwerte.KategorieNr
FROM tbl_IDS_Produkte INNER JOIN (tbl_IDS_Länder INNER JOIN tbl_IDS_Rechenwerte ON tbl_IDS_Länder.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode) ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Rechenwerte.ProductTypeCode
WHERE (((tbl_IDS_Rechenwerte.OutletCode) Is Null) AND ((tbl_IDS_Rechenwerte.CustomerCode) Is Null) " & IIf(OutletCountryCode > 0, " AND tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode, "") & " )
ORDER BY tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode;"
Case "LS"
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter, tbl_IDS_Rechenwerte.SSMA_TimeStamp, tbl_IDS_Rechenwerte.KategorieNr
FROM tbl_IDS_Produkte
INNER JOIN (tbl_IDS_Länder
INNER JOIN (tbl_IDS_Stationen
INNER JOIN tbl_IDS_Rechenwerte ON (tbl_IDS_Stationen.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode) AND (tbl_IDS_Stationen.OutletCode = tbl_IDS_Rechenwerte.OutletCode)) ON tbl_IDS_Länder.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode)
ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Rechenwerte.ProductTypeCode
WHERE (((tbl_IDS_Rechenwerte.OutletCode) Is Not Null) AND ((tbl_IDS_Rechenwerte.CustomerCode) Is Null) " & IIf(OutletCountryCode > 0, " AND tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode, "") & " )
ORDER BY tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode;"
Case "KRW"
SQL_ = "SELECT tbl_IDS_Kategorien_Rechenwerte.ID as ID, tbl_IDS_Kategorien_Rechenwerte.KategorieNr, tbl_IDS_Kategorien_Rechenwerte.ProductTypeCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Kategorien_Rechenwerte.Rechenwert, tbl_IDS_Kategorien_Rechenwerte.Zeitstempel, tbl_IDS_Kategorien_Rechenwerte.Sachbearbeiter, tbl_IDS_Kategorien_Rechenwerte.SSMA_TimeStamp
FROM tbl_IDS_Produkte INNER JOIN tbl_IDS_Kategorien_Rechenwerte ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Kategorien_Rechenwerte.ProductTypeCode
ORDER BY tbl_IDS_Kategorien_Rechenwerte.KategorieNr, tbl_IDS_Kategorien_Rechenwerte.ProductTypeCode;"
Case "LK"
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, Adressen.Ordnungsbegriff AS CustomerName, tbl_IDS_Rechenwerte.CustomerCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter, tbl_IDS_Rechenwerte.SSMA_TimeStamp, tbl_IDS_Rechenwerte.KategorieNr
FROM tbl_IDS_Produkte INNER JOIN (tbl_IDS_Länder INNER JOIN (Adressen INNER JOIN tbl_IDS_Rechenwerte ON Adressen.AdressenNr = tbl_IDS_Rechenwerte.CustomerCode) ON tbl_IDS_Länder.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode) ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Rechenwerte.ProductTypeCode
WHERE (((tbl_IDS_Rechenwerte.CustomerCode) Is Not Null) AND ((tbl_IDS_Rechenwerte.OutletCode) Is Null) " & IIf(OutletCountryCode > 0, " WHERE tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode, "") & " )
ORDER BY tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, Adressen.Ordnungsbegriff, tbl_IDS_Rechenwerte.CustomerCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode;"
Case "LSK"
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.OutletCode, Adressen.Ordnungsbegriff AS CustomerName, tbl_IDS_Rechenwerte.CustomerCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter, tbl_IDS_Rechenwerte.SSMA_TimeStamp, tbl_IDS_Rechenwerte.KategorieNr
FROM tbl_IDS_Produkte INNER JOIN (tbl_IDS_Länder INNER JOIN (Adressen INNER JOIN (tbl_IDS_Stationen INNER JOIN tbl_IDS_Rechenwerte ON (tbl_IDS_Stationen.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode) AND (tbl_IDS_Stationen.OutletCode = tbl_IDS_Rechenwerte.OutletCode)) ON Adressen.AdressenNr = tbl_IDS_Rechenwerte.CustomerCode) ON tbl_IDS_Länder.OutletCountryCode = tbl_IDS_Rechenwerte.OutletCountryCode) ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Rechenwerte.ProductTypeCode
WHERE (((tbl_IDS_Rechenwerte.OutletCode) Is Not Null) AND ((tbl_IDS_Rechenwerte.CustomerCode) Is Not Null) " & IIf(OutletCountryCode > 0, " WHERE tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode, "") & " )
ORDER BY tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.OutletCode, Adressen.Ordnungsbegriff, tbl_IDS_Rechenwerte.CustomerCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode;"
Case "KOR"
SQL_ = "SELECT tbl_IDS_Kunden_ohne_Rabatt.CustomerCode, tbl_IDS_Kunden_ohne_Rabatt.Zeitstempel, tbl_IDS_Kunden_ohne_Rabatt.Sachbearbeiter
FROM tbl_IDS_Kunden_ohne_Rabatt
ORDER BY tbl_IDS_Kunden_ohne_Rabatt.CustomerCode;"
End Select
If SQL_ = "" Then Exit Sub
Try Try
OFFERTEBind = New cEasyBinding(BIND_DB) IDSDIESEL_Bind = New cEasyBinding(BIND_DB)
OFFERTEBind.initBinding(" SELECT [LeistungsNr],[LeistungsBez],[BerechnungsartNr],[Preis],[Anzahl],[BGebLeistungsNr],[BGebProzent],[BGebMinBetrag],BerechnungsartPosInkludiert,[Eingegeben am],[Geändert am],[Sachbearbeiter],[PreisänderungProzent],[PreisAlt],[Preisänderung],KundenNr,OffertenNr IDSDIESEL_Bind.initBinding(SQL_, "tbl_IDS_Rechenwerte")
From [Offertenpositionen] " & For Each c As DataColumn In IDSDIESEL_Bind.bindingdataTable.Columns
" Where OffertenNr='" & OffertenNr & "' ORDER BY LeistungsNr, Preis DESC", "Offertenpositionen")
For Each c As DataColumn In OFFERTEBind.bindingdataTable.Columns
If c.ColumnName = "SSMA_TimeStamp" Then If c.ColumnName = "SSMA_TimeStamp" Then
OFFERTEBind.bindingdataTable.Columns.Remove(c) IDSDIESEL_Bind.bindingdataTable.Columns.Remove(c)
Exit For Exit For
End If End If
Next Next
' KASSENBind.initBinding("SELECT * FROM " & table & "", table)
.DataSource = OFFERTEBind.bindingdataTable .DataSource = IDSDIESEL_Bind.bindingdataTable
' DataGridView.AutoSize = True
' OFFERTEBind.bindingdataTable.PrimaryKey = {OFFERTEBind.bindingdataTable.Columns("KundenNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsBez")}
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
@@ -88,55 +113,54 @@ Public Class usrCntlIDSPreise
' " FROM [Offertenpositionen] " & ' " FROM [Offertenpositionen] " &
' " WHERE KundenNr='" & kdNr & "' and OffertenNr='" & OffertenNr & "' ORDER BY LeistungsNr ", "FMZOLL") ' " WHERE KundenNr='" & kdNr & "' and OffertenNr='" & OffertenNr & "' ORDER BY LeistungsNr ", "FMZOLL")
FUNC.dgvCellToCbo(dgvOfferteDetails, 2, "Berechnungsart", "BerechnungsartNr", " SELECT [BerechnungsartNr], CAST(BerechnungsartNr as varchar(3)) + ' - ' + [BerechnungsartBez] as [BerechnungsartBez] FROM [Berechnungsart] ORDER BY BerechnungsartNr ", "FMZOLL", 150) 'FUNC.dgvCellToCbo(dgvOfferteDetails, 2, "Kz", "Kz", " SELECT [BerechnungsartNr], CAST(BerechnungsartNr as varchar(3)) + ' - ' + [BerechnungsartBez] as [BerechnungsartBez] FROM [Berechnungsart] ORDER BY BerechnungsartNr ", "FMZOLL", 150)
FUNC.dgvCellToCbo(dgvOfferteDetails, 5, "BGebLeist.", "BGebLeistungsNr", " SELECT [LeistungsNr], CAST(LeistungsNr as varchar(3)) + ' - ' + [LeistungsBez] as LeistungsBez FROM [Leistungen] ORDER BY [LeistungsNr] ", "FMZOLL", 250) 'FUNC.dgvCellToCbo(dgvOfferteDetails, 5, "BGebLeist.", "BGebLeistungsNr", " SELECT [LeistungsNr], CAST(LeistungsNr as varchar(3)) + ' - ' + [LeistungsBez] as LeistungsBez FROM [Leistungen] ORDER BY [LeistungsNr] ", "FMZOLL", 250)
checkPerimissionsDGVDetails() 'checkPerimissionsDGVDetails()
If .Columns.Contains("ID") Then .Columns("ID").Visible = False
'.Columns("KundenNr").Visible = False
'.Columns("LeistungsNr").Width = 30
'.Columns("LeistungsNr").HeaderText = "Nr"
'.Columns("LeistungsBez").MinimumWidth = 200
'.Columns("LeistungsBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
'.Columns("LeistungsBez").HeaderText = "Leistung"
'.Columns("BerechnungsartNr").MinimumWidth = 150
'.Columns("Preis").Width = 60
'.Columns("Preis").DefaultCellStyle.Format = "N2"
'.Columns("Preis").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'.Columns("Anzahl").Width = 50
'.Columns("Anzahl").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
.Columns("OffertenNr").Visible = False '.Columns("BerechnungsartPosInkludiert").HeaderText = "Pos.inkl."
.Columns("KundenNr").Visible = False '.Columns("BerechnungsartPosInkludiert").Width = 45
.Columns("LeistungsNr").Width = 30
.Columns("LeistungsNr").HeaderText = "Nr"
.Columns("LeistungsBez").MinimumWidth = 200
.Columns("LeistungsBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("LeistungsBez").HeaderText = "Leistung"
.Columns("BerechnungsartNr").MinimumWidth = 150
.Columns("Preis").Width = 60
.Columns("Preis").DefaultCellStyle.Format = "N2"
.Columns("Preis").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
.Columns("Anzahl").Width = 50
.Columns("Anzahl").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopCenter
.Columns("BerechnungsartPosInkludiert").HeaderText = "Pos.inkl." '.Columns("BGebLeistungsNr").Width = 60
.Columns("BerechnungsartPosInkludiert").Width = 45 '.Columns("BGebProzent").Width = 55
'.Columns("BGebProzent").HeaderText = "BGeb %"
'.Columns("BGebProzent").DefaultCellStyle.Format = "P"
'.Columns("BGebProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'.Columns("BGebMinBetrag").Width = 60
'.Columns("BGebMinBetrag").HeaderText = "BGebMinBetr."
'.Columns("BGebMinBetrag").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'.Columns("Eingegeben am").Visible = False
'' .Columns("Sachbearbeiter").Visible = False
'' .Columns("Geändert am").Visible = False
'.Columns("PreisänderungProzent").Width = 70
'.Columns("PreisänderungProzent").HeaderText = "Preisänd. %"
'.Columns("PreisänderungProzent").DefaultCellStyle.Format = "p"
'.Columns("PreisänderungProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'.Columns("PreisAlt").Width = 60
'.Columns("PreisAlt").DefaultCellStyle.Format = "N2"
'.Columns("PreisAlt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'.Columns("Preisänderung").Width = 60
'.Columns("Preisänderung").HeaderText = "PreisNeu"
'.Columns("Preisänderung").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
'' .Columns("OffertenBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
'' .Columns("OffertenBez").HeaderText = "Bezeichnung"
.Columns("BGebLeistungsNr").Width = 60 '.Columns("PreisänderungProzent").Visible = False
.Columns("BGebProzent").Width = 55 '.Columns("PreisAlt").Visible = False
.Columns("BGebProzent").HeaderText = "BGeb %" '.Columns("Preisänderung").Visible = False
.Columns("BGebProzent").DefaultCellStyle.Format = "P"
.Columns("BGebProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
.Columns("BGebMinBetrag").Width = 60
.Columns("BGebMinBetrag").HeaderText = "BGebMinBetr."
.Columns("BGebMinBetrag").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
.Columns("Eingegeben am").Visible = False
' .Columns("Sachbearbeiter").Visible = False
' .Columns("Geändert am").Visible = False
.Columns("PreisänderungProzent").Width = 70
.Columns("PreisänderungProzent").HeaderText = "Preisänd. %"
.Columns("PreisänderungProzent").DefaultCellStyle.Format = "p"
.Columns("PreisänderungProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
.Columns("PreisAlt").Width = 60
.Columns("PreisAlt").DefaultCellStyle.Format = "N2"
.Columns("PreisAlt").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
.Columns("Preisänderung").Width = 60
.Columns("Preisänderung").HeaderText = "PreisNeu"
.Columns("Preisänderung").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
' .Columns("OffertenBez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
' .Columns("OffertenBez").HeaderText = "Bezeichnung"
.Columns("PreisänderungProzent").Visible = False
.Columns("PreisAlt").Visible = False
.Columns("Preisänderung").Visible = False
loaded = True loaded = True
End With End With
@@ -150,31 +174,49 @@ Public Class usrCntlIDSPreise
Private Sub dgvOfferteDetails_SelectionChanged(sender As Object, e As EventArgs) Handles dgvIDS.SelectionChanged Private Sub dgvIDS_SelectionChanged(sender As Object, e As EventArgs) Handles dgvIDS.SelectionChanged
Try
checkPermissions() If dgvIDS.SelectedCells.Count > 0 Then
If dgvIDS.SelectedRows.Count > 0 Then If dgvIDS.SelectedCells(0).RowIndex > -1 Then
initDGVOfferteDetails(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value) initDGVDieselpreiseDetails(dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value)
End If End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) End If
End Try
End Sub End Sub
Private Sub usrCntlOfferte_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub usrCntlOfferte_Load(sender As Object, e As EventArgs) Handles MyBase.Load
init(isVerag360) init(isVerag360)
' sbLeistungAdd.initSearchBox(Me.FindForm, " [Code] ,[LeistungsNr],[LeistungsBez] FROM [Leistungen]", {"LeistungsNr", "LeistungsBez"}, " ", "LeistungsNr", "LeistungsNr", , "FMZOLL", , 400, 200) cbxTypes.Items.Clear()
cboLeistungenAdd.fillWithSQL("SELECT [LeistungsNr],Replace([LeistungsBez],'P.P./', '') FROM [Leistungen] ORDER BY LeistungsNr", , "FMZOLL", True) cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Länder", "L"))
cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Länder/Stationen", "LS"))
cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Kategorien/Rechenwerte", "KRW"))
cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Länder/Kunden", "LK"))
cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Länder/Stationen/Kunden", "LSK"))
cbxTypes.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Kunden ohne Rabatt", "KOR"))
checkPermissions() checkPermissions()
Dim SQL_ As String = ""
SQL_ = "SELECT OutletCountry, OutletCountryCode FROM [VERAG].[dbo].[tbl_IDS_Länder] ORDER BY OutletCountry"
With dgvIDS
.DataSource = SQL.loadDgvBySql(SQL_, "FMZOLL")
.Columns("OutletCountry").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("OutletCountry").HeaderText = "Bezeichnung"
.Columns("OutletCountryCode").Visible = False
End With
dgvOfferteDetails.Columns.Clear()
dgvIDS.ClearSelection()
initDGVDieselpreiseDetails()
'AddHandler OFFERTEBind.bindingdataTable.ColumnChanged, Sub(ev As EventArgs, change As DataColumnChangeEventArgs) 'AddHandler OFFERTEBind.bindingdataTable.ColumnChanged, Sub(ev As EventArgs, change As DataColumnChangeEventArgs)
' ' If change.Column.ColumnName="" ' ' If change.Column.ColumnName=""
@@ -186,38 +228,7 @@ Public Class usrCntlIDSPreise
End Sub End Sub
Private Sub btnAddLeistung_Click(sender As Object, e As EventArgs) Handles btnAddLeistung.Click
Try
Dim SQLsrt = " SELECT (select case when COUNT(*)>0 then 1 else 0 end FROM Offertenpositionen where [Offertenpositionen].[OffertenNr]=[Offertenstamm].[OffertenNr]) as vorhanden," &
" [Offertenstamm].[OffertenNr],[OffertenBez] FROM Offertenstamm "
For Each r As DataRow In SQL.loadDgvBySql(SQLsrt, "FMZOLL").Rows
If Not CBool(r("vorhanden")) Then
Dim i As New ToolStripMenuItem
i.Text = r("OffertenNr") & " - " & r("OffertenBez")
i.Name = "tsmiOffertNr_" & r("OffertenNr")
i.Tag = r("OffertenNr")
cntxtAddSdl.Items.Add(i)
' If s.Sperre <> 0 Then i.Enabled = False : i.Text = i.Text & " (gesperrt)"
AddHandler i.Click, AddressOf AddOffert_Click
End If
Next
btnAddLeistung.ContextMenuStrip = cntxtAddSdl
' cntxtAddSdl
Dim ptLowerLeft As New Point(sender.width, sender.Height)
ptLowerLeft = sender.PointToScreen(ptLowerLeft)
ptLowerLeft.X -= sender.width
cntxtAddSdl.Show(ptLowerLeft)
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub AddOffert_Click(sender As Object, e As EventArgs) Handles DToolStripMenuItem.Click Private Sub AddOffert_Click(sender As Object, e As EventArgs) Handles DToolStripMenuItem.Click
If sender.name.contains("tsmiOffertNr_") Then If sender.name.contains("tsmiOffertNr_") Then
@@ -230,124 +241,41 @@ Public Class usrCntlIDSPreise
End Sub End Sub
Private Sub btnHinzufuegen_Click_1(sender As Object, e As EventArgs) Handles btnHinzufuegen.Click
Try
If edit = False Then
MsgBox("Bitte vorher in den Editiermodus wechseln")
Exit Sub
End If
lblLeistunAddErr.Visible = False
lblLeistunAddErr2.Visible = False
Label3.Visible = False
If dgvIDS.SelectedRows.Count <> 1 Then
Label3.Visible = True
End If
'Fehlerprüfung:
'-------
If cboLeistungenAdd._value = "" Then lblLeistunAddErr.Visible = True : Exit Sub
'-------
Dim l As New VERAG_PROG_ALLGEMEIN.cLeistungen(cboLeistungenAdd._value)
Dim o As New VERAG_PROG_ALLGEMEIN.cOffertPosition
o.LeistungsNr = l.LeistungsNr
o.LeistungsBez = MyTextBox1.Text
o.OffertenNr = dgvIDS.SelectedRows(0).Cells("OffertenNr").Value
'o.Preis=l.preis
o.BerechnungsartNr = l.BerechnungsartNr
'o.Anzahl = l.m
'o.BGebLeistungsNr = l.BGebUStV
'o.BGebProzent = l.XXXXXXXXXX
'o.BGebMinBetrag = l.XXXXXXXXXX
o.Eingegeben_am = Now
'o.Geändert_am = l.XXXXXXXXXX
o.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
'o.Preisänderung = l.Preissperre
'o.PreisänderungProzent = l.XXXXXXXXXX
'o.PreisAlt = l.XXXXXXXXXX
If o.INSERT() Then
cboLeistungenAdd.changeItem("")
initDGVOfferteDetails(o.OffertenNr)
addLeistung = True
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub cboLeistungenAdd_KeyDown(sender As Object, e As KeyEventArgs) Handles cboLeistungenAdd.KeyDown, MyTextBox1.KeyDown
If e.KeyCode = Keys.Return Then
btnHinzufuegen.PerformClick()
End If
End Sub
Private Sub cboLeistungenAdd_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboLeistungenAdd.SelectedIndexChanged
If cboLeistungenAdd._value <> "" Then
MyTextBox1.Text = cboLeistungenAdd.Text.ToString.Replace(cboLeistungenAdd._value & " - ", "").Trim()
Else
MyTextBox1.Text = ""
End If
End Sub
Private Sub dgvOfferteDetails_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetails.CellValueChanged Private Sub dgvOfferteDetails_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetails.CellValueChanged
Try Try
Select Case cbxTypes._value
Case "L", "LS", "LSK", "KRW", "LSK"
If loaded = True Then
If currentIDS IsNot Nothing Then
currentIDS.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
currentIDS.Zeitstempel = Now
If loaded = True Then Select Case dgvOfferteDetails.CurrentCell.ColumnIndex
dgvOfferteDetails.Rows(e.RowIndex).Cells("Sachbearbeiter").Value = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME Case 5 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.Rechenwert = CDbl(dgvOfferteDetails.CurrentCell.Value)
dgvOfferteDetails.Rows(e.RowIndex).Cells("Geändert am").Value = Now Case 6 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso dgvOfferteDetails.CurrentCell.Value <> "" AndAlso (dgvOfferteDetails.CurrentCell.Value = "R" Or dgvOfferteDetails.CurrentCell.Value = "P") Then currentIDS.Kz = dgvOfferteDetails.CurrentCell.Value.ToString
DGVHasChaged = True
'saveCurrentOffert()
If isNew Then
currentOffert.Art = "Neuanlage"
Else
currentOffert.Art = "Geändert"
End If
currentOffert.SAVE()
End If End Select
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub DGVHasChaged = True
If currentIDS.SAVE() Then
Private Sub btnDeleteOfferte_Click(sender As Object, e As EventArgs) Handles btnDeleteOfferte.Click If dgvIDS.SelectedCells.Count > 0 Then
Try
If dgvIDS.SelectedRows.Count = 1 Then If dgvIDS.SelectedCells(0).RowIndex > -1 Then
If vbYes = MsgBox("Möchten Sie das Offert '" & dgvIDS.SelectedRows(0).Cells("OffertenBez").Value & "' wirklich löschen", vbYesNoCancel) Then initDGVDieselpreiseDetails(dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value)
saveCurrentOffert() End If
currentOffert.Art = "Offert gelöscht"
currentOffert.SAVE()
OfferteArchivieren()
If SQL.doSQL("DELETE FROM Offerten where [OffertenNr]='" & dgvIDS.SelectedRows(0).Cells("OffertenNr").Value & "' ", "FMZOLL") Then
initDGVOfferte()
RaiseEvent OfferteChanged()
End If
End If
End If
Catch ex As Exception Else
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) initDGVDieselpreiseDetails()
End Try
End Sub
Private Sub btnOfferteSpeichern_Click(sender As Object, e As EventArgs) Handles btnOfferteSpeichern.Click End If
Try
checkPerimissionsDGVDetails() End If
edit = False
handleEditMode(edit)
saveToArchive()
OFFERTEBind.updateBinding() End If
RaiseEvent OfferteChanged() End If
DGVHasChaged = False
End Select
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
@@ -355,69 +283,15 @@ Public Class usrCntlIDSPreise
End Sub End Sub
Private Sub btnOffertbearbeiten_Click(sender As Object, e As EventArgs)
Private Sub btnOffertbearbeiten_Click(sender As Object, e As EventArgs) Handles btnEditIDS.Click
edit = True edit = True
handleEditMode(edit) handleEditMode(edit)
checkPerimissionsDGVDetails() checkPerimissionsDGVDetails()
saveCurrentOffert()
End Sub End Sub
Private Sub OfferteArchivieren(Optional Art As String = "")
Try
currentOffertArchiv = New VERAG_PROG_ALLGEMEIN.cOfferteArchiv()
currentOffertArchiv.KundenNr = currentOffert.KundenNr
currentOffertArchiv.FilialenNr = currentOffert.FilialenNr
currentOffertArchiv.OffertenNr = currentOffert.OffertenNr
currentOffertArchiv.Standardofferte = currentOffert.Standardofferte
currentOffertArchiv.Besonderheiten = currentOffert.Besonderheiten
currentOffertArchiv.Eingegeben_am = currentOffert.Eingegeben_am
currentOffertArchiv.Geändert_am = currentOffert.Geändert_am
currentOffertArchiv.Sachbearbeiter = currentOffert.Sachbearbeiter
currentOffertArchiv.SSMA_TimeStamp = currentOffert.SSMA_TimeStamp
currentOffertArchiv.Gesperrt = currentOffert.Gesperrt
currentOffertArchiv.Gesperrt_Datum = currentOffert.Gesperrt_Datum
currentOffertArchiv.Gesperrt_Grund = currentOffert.Gesperrt_Grund
currentOffertArchiv.Art = currentOffert.Art
ofID = currentOffertArchiv.SAVERETURNID()
If ofID > 0 Then
For Each row As DataRow In tmpDataTable.Rows
If tmpDataTable.Rows.Count = 0 Then Exit Sub
Dim oP As New VERAG_PROG_ALLGEMEIN.cOffertPositionArchiv
oP.OfID = ofID
oP.KundenNr = currentOffertArchiv.KundenNr
oP.LeistungsNr = row("LeistungsNr")
oP.LeistungsBez = row("LeistungsBez")
oP.OffertenNr = currentOffertArchiv.OffertenNr
oP.BerechnungsartNr = row("BerechnungsartNr")
oP.Preis = row("Preis")
oP.Anzahl = row("Anzahl")
oP.BGebLeistungsNr = row("BGebLeistungsNr")
oP.BGebProzent = row("BGebProzent")
oP.BGebMinBetrag = row("BGebMinBetrag")
oP.Eingegeben_am = row("Eingegeben am")
oP.Geändert_am = row("Geändert am")
oP.Sachbearbeiter = row("Sachbearbeiter")
oP.Preisänderung = row("Preisänderung")
oP.PreisänderungProzent = row("PreisänderungProzent")
oP.PreisAlt = row("PreisAlt")
oP.BerechnungsartPosInkludiert = row("BerechnungsartPosInkludiert")
oP.INSERT()
Next
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub cbxArchivierteOfferten_SelectedIndexChanged(sender As Object, e As EventArgs) Private Sub cbxArchivierteOfferten_SelectedIndexChanged(sender As Object, e As EventArgs)
checkPerimissionsDGVDetails() checkPerimissionsDGVDetails()
@@ -428,7 +302,7 @@ Public Class usrCntlIDSPreise
If dgvIDS.SelectedRows.Count = 0 Then Exit Sub If dgvIDS.SelectedRows.Count = 0 Then Exit Sub
initDGVOfferteDetails(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value) initDGVDieselpreiseDetails(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value)
End Sub End Sub
@@ -439,7 +313,7 @@ Public Class usrCntlIDSPreise
Try Try
With dgvOfferteDetails With dgvOfferteDetails
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_BEARBEITEN", "SDL") Then If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("DIESELPREISE_BEARBEITEN", "SDL") Then
For Each c As DataGridViewColumn In .Columns For Each c As DataGridViewColumn In .Columns
c.ReadOnly = True c.ReadOnly = True
handleEditMode(False) handleEditMode(False)
@@ -450,7 +324,7 @@ Public Class usrCntlIDSPreise
For Each c As DataGridViewColumn In .Columns For Each c As DataGridViewColumn In .Columns
If isVerag360 Then If isVerag360 Then
If (c.Name = "Preis" Or c.Name = "LeistungsBez" Or c.Name = "Anzahl" Or c.Name = "BerechnungsartNr" Or c.Name = "BerechnungsartPosInkludiert" Or c.Name = "BGebLeistungsNr" Or c.Name = "BGebProzent" Or c.Name = "BGebMinBetrag" Or c.Name = "Land" Or c.Name = "VZ" Or c.Name = "RMC" Or c.Name = "Fremd") Then If (c.Name = "Rechenwert" Or c.Name = "Kz") Then
If edit Then If edit Then
c.ReadOnly = False c.ReadOnly = False
handleEditMode(edit) handleEditMode(edit)
@@ -462,23 +336,11 @@ Public Class usrCntlIDSPreise
c.ReadOnly = True c.ReadOnly = True
End If End If
Else
If (c.Name = "Preis" Or c.Name = "LeistungsBez" Or c.Name = "Anzahl" Or c.Name = "BerechnungsartNr" Or c.Name = "BerechnungsartPosInkludiert") Then
If edit Then
c.ReadOnly = False
handleEditMode(edit)
Else
c.ReadOnly = True
handleEditMode(edit)
End If
Else
c.ReadOnly = True
End If
End If End If
Next Next
dgvOfferteDetails.AllowUserToDeleteRows = edit dgvOfferteDetails.AllowUserToDeleteRows = False
End If End If
End With End With
@@ -494,7 +356,7 @@ Public Class usrCntlIDSPreise
dgvIDS.Enabled = False dgvIDS.Enabled = False
'currentOffert = New VERAG_PROG_ALLGEMEIN.cOfferte(kdNr, dgvIDS.SelectedRows(0).Cells("OffertenNr").Value, False) 'currentOffert = New VERAG_PROG_ALLGEMEIN.cOfferte(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value, False)
Dim orgDataTable As DataTable = dgvOfferteDetails.DataSource Dim orgDataTable As DataTable = dgvOfferteDetails.DataSource
tmpDataTable = orgDataTable.Copy tmpDataTable = orgDataTable.Copy
@@ -507,9 +369,9 @@ Public Class usrCntlIDSPreise
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_BEARBEITEN", "SDL") Then If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("DIESELPREISE_BEARBEITEN", "SDL") Then
pnlEdit.Visible = False
btnCreateOffert.Visible = False btnEditIDS.Visible = False
dgvIDS.ReadOnly = True dgvIDS.ReadOnly = True
Else Else
@@ -517,11 +379,6 @@ Public Class usrCntlIDSPreise
dgvOfferteDetails.AllowUserToDeleteRows = True dgvOfferteDetails.AllowUserToDeleteRows = True
dgvOfferteDetails.RowHeadersVisible = True dgvOfferteDetails.RowHeadersVisible = True
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("OFFERTE_LOESCHEN", "SDL") Then
btnDeleteOfferte.Visible = True
End If
End If End If
@@ -539,73 +396,34 @@ Public Class usrCntlIDSPreise
dgvIDS.Enabled = False dgvIDS.Enabled = False
dgvOfferteDetails.ReadOnly = False dgvOfferteDetails.ReadOnly = False
btnOfferteSpeichern.Enabled = True btnOfferteSpeichern.Enabled = True
btnCloseEditMode.Visible = True
cbxTypes.Enabled = False
Else Else
dgvIDS.Enabled = True dgvIDS.Enabled = True
dgvOfferteDetails.ReadOnly = True dgvOfferteDetails.ReadOnly = True
btnOfferteSpeichern.Enabled = False btnOfferteSpeichern.Enabled = False
btnCloseEditMode.Visible = False
cbxTypes.Enabled = True
End If End If
lblEditMode.Visible = isInEditMode
End Sub End Sub
Private Sub saveToArchive()
Try
If isNew = False AndAlso isStandard = False Or isNew AndAlso isStandard = False Then 'Neuanlage oder Anlage über "Standardoffert laden" speichern,
If DGVHasChaged = False Then Exit Sub
End If
If isStandard Then
If isNew Then
OfferteArchivieren()
isNew = False
End If
isStandard = False
Else
If DGVHasChaged Then
If isNew = False Then
OfferteArchivieren()
Exit Sub
Else
If isNew Then
OfferteArchivieren()
isNew = False
End If
End If
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub dgvOfferteDetails_UserDeletingRow(sender As Object, e As DataGridViewRowCancelEventArgs) Handles dgvOfferteDetails.UserDeletingRow Private Sub dgvOfferteDetails_UserDeletingRow(sender As Object, e As DataGridViewRowCancelEventArgs) Handles dgvOfferteDetails.UserDeletingRow
DGVHasChaged = True DGVHasChaged = True
End Sub End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs)
cProgramFunctions.genExcelFromDGV_NEW(dgvOfferteDetails, True)
End Sub
Private Sub dgvOfferteDetails_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvOfferteDetails.KeyUp Private Sub dgvOfferteDetails_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvOfferteDetails.KeyUp
If e.KeyCode = Keys.Tab Then If e.KeyCode = Keys.Tab Then
dgvOfferteDetails.CurrentCell = GetNextCell(dgvOfferteDetails.CurrentCell) dgvOfferteDetails.CurrentCell = GetNextCell(dgvOfferteDetails.CurrentCell)
e.Handled = True e.Handled = True
End If End If
End Sub End Sub
Private Function GetNextCell(currentCell As DataGridViewCell) As DataGridViewCell Private Function GetNextCell(currentCell As DataGridViewCell) As DataGridViewCell
@@ -626,4 +444,55 @@ Public Class usrCntlIDSPreise
End Function End Function
Private Sub cbxTypes_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbxTypes.SelectedIndexChanged
If dgvIDS.SelectedRows.Count > 0 Then
initDGVDieselpreiseDetails(dgvIDS.SelectedRows(0).Cells("OutletCountryCode").Value)
Else
initDGVDieselpreiseDetails()
End If
End Sub
Private Sub dgvIDS_MouseDown(sender As Object, e As MouseEventArgs) Handles dgvIDS.MouseDown
Dim hit As DataGridView.HitTestInfo = dgvIDS.HitTest(e.X, e.Y)
' Prüfen ob NICHT auf eine Zelle geklickt wurde
If hit.Type = DataGridViewHitTestType.None OrElse hit.Type = DataGridViewHitTestType.ColumnHeader OrElse hit.Type = DataGridViewHitTestType.RowHeader Then
dgvIDS.ClearSelection()
initDGVDieselpreiseDetails()
Exit Sub
End If
End Sub
Private Sub btnCloseEditMode_Click(sender As Object, e As EventArgs) Handles btnCloseEditMode.Click
edit = False
handleEditMode(edit)
checkPerimissionsDGVDetails()
End Sub
Private Sub dgvOfferteDetails_SelectionChanged(sender As Object, e As EventArgs) Handles dgvOfferteDetails.SelectionChanged
If dgvOfferteDetails.Columns.Contains("ID") Then
If dgvOfferteDetails.SelectedCells.Count > 0 Then
If dgvOfferteDetails.SelectedCells(0).RowIndex > -1 Then
currentIDS = New cIDSDieselpreisRW(dgvOfferteDetails.Rows(dgvOfferteDetails.SelectedCells(0).RowIndex).Cells("ID").Value)
End If
End If
End If
End Sub
End Class End Class

View File

@@ -3120,7 +3120,7 @@ Public Class usrCntlKundenuebersicht
setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest, beforeRequestCount, afterRequestCount, limit, country) setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest, beforeRequestCount, afterRequestCount, limit, country)
End If End If
If beforeRequestCount > (limit - 100) Then 'Benachrichtigung If beforeRequestCount > (limit - 100) AndAlso beforeRequestCount < (limit - 96) Then 'Benachrichtigung
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag; d.breimaier@verag.ag", "Creditsafe-Limit", "ACHTUNG, das Creditsafe-Limit für " & country & " ist fast erreicht!" & vbNewLine & vbNewLine & "Limit: " & limit & " , aktuelle Stand: " & afterRequestCount & vbNewLine & vbNewLine & "*Automatic generated e-mail*",,,,,) VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag; d.breimaier@verag.ag", "Creditsafe-Limit", "ACHTUNG, das Creditsafe-Limit für " & country & " ist fast erreicht!" & vbNewLine & vbNewLine & "Limit: " & limit & " , aktuelle Stand: " & afterRequestCount & vbNewLine & vbNewLine & "*Automatic generated e-mail*",,,,,)
End If End If

View File

@@ -1494,9 +1494,7 @@ Public Class usrCntlMDMAuswertungen
Dim dt As New DataTable Dim dt As New DataTable
dt = (New SQL).loadDgvBySql(sql, "FMZOLL") dt = (New SQL).loadDgvBySql(sql, "FMZOLL")
frmShowData.Show() cProgramFunctions.genExcelFromDT_NEW(dt,,,,,, True)
frmShowData.DataGridView1.DataSource = dt
frmShowData.Label2.Text = "Anzahl: " & frmShowData.DataGridView1.RowCount
@@ -1509,7 +1507,22 @@ Public Class usrCntlMDMAuswertungen
uscCntl.init(True) uscCntl.init(True)
uscCntl.Show() 'uscCntl.Show()
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim frm As New Form
frm.Size = New Size(1600, 1000)
uscCntl.Size = New Size(frm.Size.Width - 50, frm.Size.Height - 50)
uscCntl.Dock = DockStyle.Fill
uscCntl.Anchor = AnchorStyles.Left
uscCntl.Anchor = AnchorStyles.Top
frm.Controls.Add(uscCntl)
frm.StartPosition = FormStartPosition.CenterScreen
frm.Show()
End Sub End Sub
End Class End Class

View File

@@ -301,11 +301,11 @@ Public Class cIDS
Dim str As String = "" Dim str As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," str &= "" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
str = str.Substring(0, str.Length - 1) 'wg. ',' str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblIDSTransactionsNew] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND Paymentsummarynumber=@Paymentsummarynumber AND CustomerCode=@CustomerCode AND OutletCountryCode=@OutletCountryCode AND OutletCode=@OutletCode AND ProductTypeCode=@ProductTypeCode " & IIf(PARAM <> "" AndAlso VALUE <> "", " AND " & PARAM & "=" & VALUE, "") & " AND isnull(charged,0) = 0 ") Return (" UPDATE tblIDSTransactionsNew] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND Paymentsummarynumber=@Paymentsummarynumber AND CustomerCode=@CustomerCode AND OutletCountryCode=@OutletCountryCode AND OutletCode=@OutletCode AND ProductTypeCode=@ProductTypeCode " & IIf(PARAM <> "" AndAlso VALUE <> "", " AND " & PARAM & "=" & VALUE, "") & " AND isnull(charged,0) = 0 ")
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
@@ -321,7 +321,7 @@ Public Class cIDS
Dim values As String = "" Dim values As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "]," str &= "" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
@@ -457,10 +457,10 @@ Public Class cIDS
'Else 'Else
.TransactionVolume = isleernothing((currentRow(8))) .TransactionVolume = isleernothing((currentRow(8)))
.AmminclVAT = isleernothing((currentRow(9))) .AmminclVAT = isleernothing((currentRow(9)))
.TotalNetAmount = isleernothing((currentRow(10))) .TotalNetAmount = isleernothing((currentRow(10)))
.VATAmount = isleernothing((currentRow(11))) .VATAmount = isleernothing((currentRow(11)))
.avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0) .avpriceexclVAT = IIf(avprive <> "" AndAlso IsNumeric(avprive), avprive, 0)
' End If ' End If
@@ -544,31 +544,31 @@ Public Class cIDS
Using cmd As New SqlCommand("SELECT Using cmd As New SqlCommand("SELECT
tblIDSTransactionsNew.KdNrVERAG as Kundennummer, tblIDSTransactionsNew.KdNrVERAG as Kundennummer,
ISNULL(tblIDSTransactionsNew.[OBONumber],ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) AS Rechnungsnummer, ISNULL(tblIDSTransactionsNew.OBONumber],ISNULL(tblIDSTransactionsNew.VRNumber], tblIDSTransactionsNew.Paymentsummarynumber])) AS Rechnungsnummer,
tblIDSTransactionsNew.[YearMonthDay] AS Rechnungsdatum, tblIDSTransactionsNew.YearMonthDay] AS Rechnungsdatum,
SUM(tblIDSTransactionsNew.[VATAmount]) AS Steuerbetrag SUM(tblIDSTransactionsNew.VATAmount]) AS Steuerbetrag
FROM FROM
tblIDSTransactionsNew tblIDSTransactionsNew
INNER JOIN INNER JOIN
tbl_IDS_Länder tbl_IDS_Länder
ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode ON tblIDSTransactionsNew.OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode
WHERE WHERE
tblIDSTransactionsNew.[YearMonthDay] BETWEEN @von AND @bis tblIDSTransactionsNew.YearMonthDay] BETWEEN @von AND @bis
AND tblIDSTransactionsNew.KdNrVERAG = @AdressenNr AND tblIDSTransactionsNew.KdNrVERAG = @AdressenNr
AND tbl_IDS_Länder.[Lieferland_ISO2] = @LandKZ AND tbl_IDS_Länder.Lieferland_ISO2] = @LandKZ
AND tblIDSTransactionsNew.[VATAmount] <> 0 AND tblIDSTransactionsNew.VATAmount] <> 0
" & IIf(Archiv, " ", " AND isnull(UStVAn_ID,0) = 0 ") & " " & IIf(Archiv, " ", " AND isnull(UStVAn_ID,0) = 0 ") & "
GROUP BY GROUP BY
tblIDSTransactionsNew.KdNrVERAG, tblIDSTransactionsNew.KdNrVERAG,
tblIDSTransactionsNew.[YearMonthDay], tblIDSTransactionsNew.YearMonthDay],
ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.OBONumber],
ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) ISNULL(tblIDSTransactionsNew.VRNumber], tblIDSTransactionsNew.Paymentsummarynumber]))
ORDER BY ORDER BY
tblIDSTransactionsNew.KdNrVERAG, tblIDSTransactionsNew.KdNrVERAG,
tblIDSTransactionsNew.[YearMonthDay], tblIDSTransactionsNew.YearMonthDay],
ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.OBONumber],
ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber]));", conn) ISNULL(tblIDSTransactionsNew.VRNumber], tblIDSTransactionsNew.Paymentsummarynumber]));", conn)
cmd.Parameters.AddWithValue("@LandKZ", LandKZ) cmd.Parameters.AddWithValue("@LandKZ", LandKZ)
cmd.Parameters.AddWithValue("@von", von) cmd.Parameters.AddWithValue("@von", von)
@@ -607,11 +607,11 @@ Public Class cIDS
Return SQL.doSQLVarList("update tblIDSTransactionsNew set UStVAn_ID = @UStVAn_ID Return SQL.doSQLVarList("update tblIDSTransactionsNew set UStVAn_ID = @UStVAn_ID
FROM tblIDSTransactionsNew FROM tblIDSTransactionsNew
INNER JOIN tbl_IDS_Länder INNER JOIN tbl_IDS_Länder
ON tblIDSTransactionsNew.[OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode ON tblIDSTransactionsNew.OutletCountryCode] = tbl_IDS_Länder.OutletCountryCode
WHERE WHERE
tblIDSTransactionsNew.[YearMonthDay] = @reDat AND ISNULL(tblIDSTransactionsNew.[OBONumber], ISNULL(tblIDSTransactionsNew.[VRNumber], tblIDSTransactionsNew.[Paymentsummarynumber])) = @reNr tblIDSTransactionsNew.YearMonthDay] = @reDat AND ISNULL(tblIDSTransactionsNew.OBONumber], ISNULL(tblIDSTransactionsNew.VRNumber], tblIDSTransactionsNew.Paymentsummarynumber])) = @reNr
AND tblIDSTransactionsNew.KdNrVERAG = @ids_kdNr AND tblIDSTransactionsNew.KdNrVERAG = @ids_kdNr
AND tbl_IDS_Länder.[Lieferland_ISO2] = @country", "FMZOLL",, list) AND tbl_IDS_Länder.Lieferland_ISO2] = @country", "FMZOLL",, list)
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try End Try
@@ -624,7 +624,7 @@ Public Class cIDS
Shared apiSettingsloaded As Boolean = False Shared apiSettingsloaded As Boolean = False
Shared SQL As New VERAG_PROG_ALLGEMEIN.SQL Shared SQL As New VERAG_PROG_ALLGEMEIN.SQL
Shared Function GET_PARAM_ByName(tcParam_name, TESTSYSTEM) As String Shared Function GET_PARAM_ByName(tcParam_name, TESTSYSTEM) As String
Return SQL.getValueTxtBySql("SELECT TOP 1 [Param_value] FROM [tblPartnersystem_Paramter] WHERE Param_system='IDS' AND [Param_name]='" & tcParam_name & "' AND Param_testsystem = " & IIf(TESTSYSTEM, 1, 0), , , SQL.GetNewOpenConnectionFMZOLL_SYSTEM(False)) Return SQL.getValueTxtBySql("SELECT TOP 1 Param_value] FROM tblPartnersystem_Paramter] WHERE Param_system='IDS' AND Param_name]='" & tcParam_name & "' AND Param_testsystem = " & IIf(TESTSYSTEM, 1, 0), , , SQL.GetNewOpenConnectionFMZOLL_SYSTEM(False))
End Function End Function
Shared Function getFTPConenction(ByRef API_String As String, ByRef API As DataTable, ByRef program As String) As Boolean Shared Function getFTPConenction(ByRef API_String As String, ByRef API As DataTable, ByRef program As String) As Boolean
@@ -770,11 +770,11 @@ Public Class cIDSInvoice
Dim str As String = "" Dim str As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," str &= "" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
str = str.Substring(0, str.Length - 1) 'wg. ',' str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblIDSInvoicesNew] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber") Return (" UPDATE tblIDSInvoicesNew] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber")
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
@@ -788,7 +788,7 @@ Public Class cIDSInvoice
Dim values As String = "" Dim values As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "]," str &= "" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
@@ -1005,11 +1005,11 @@ Public Class cIDSInvoiceSplittedByCountry
Dim str As String = "" Dim str As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," str &= "" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
str = str.Substring(0, str.Length - 1) 'wg. ',' str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblIDSInvoicesNewSplittedByCountry] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber AND Country=@Country") Return (" UPDATE tblIDSInvoicesNewSplittedByCountry] SET " & str & " WHERE YearMonthDay=@YearMonthDay AND CustomerCode=@CustomerCode AND Invoicenumber=@Invoicenumber AND Country=@Country")
Catch ex As Exception Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
@@ -1023,7 +1023,7 @@ Public Class cIDSInvoiceSplittedByCountry
Dim values As String = "" Dim values As String = ""
For Each i In list For Each i In list
If Not i.isPrimaryParam Then If Not i.isPrimaryParam Then
str &= "[" & i.Text & "]," str &= "" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If End If
Next Next
@@ -1039,6 +1039,158 @@ Public Class cIDSInvoiceSplittedByCountry
End Class End Class
Public Class cIDSDieselpreisRW
Property ID As Integer
Property OutletCountryCode As Object = Nothing
Property OutletCode As Object = Nothing
Property CustomerCode As Object = Nothing
Property ProductTypeCode As Object = Nothing
Property Rechenwert As Object = Nothing
Property Kz As Object = Nothing
Property Zeitstempel As Object = Nothing
Property Sachbearbeiter As Object = Nothing
Property KategorieNr As Object = Nothing
Public hasEntry = False
Dim SQL As New SQL
Sub New()
End Sub
Sub New(ID)
Me.ID = ID
LOADID()
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("ID", ID,, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("OutletCountryCode", OutletCountryCode))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("OutletCode", OutletCode))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("CustomerCode", CustomerCode))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ProductTypeCode", ProductTypeCode))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Rechenwert", Rechenwert))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kz", Kz))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Zeitstempel", Zeitstempel))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Sachbearbeiter", Sachbearbeiter))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("KategorieNr", KategorieNr))
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 tbl_IDS_Rechenwerte WHERE ID=@ID) " &
" BEGIN " & getUpdateCmd() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
" commit tran "
Return SQL.doSQLVarList(sqlstr, "FMZOLL", , list)
End Function
Public Sub LOADID()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tbl_IDS_Rechenwerte WHERE ID=@ID ", conn)
cmd.Parameters.AddWithValue("@ID", 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
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Public Sub LOAD()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM tbl_IDS_Rechenwerte WHERE ID=@ID", conn)
cmd.Parameters.AddWithValue("@ID", 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
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
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 tbl_IDS_Rechenwerte SET " & str & " WHERE ID=@ID")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
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 tbl_IDS_Rechenwerte (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
End Class