creditsafe, IDS, etc.
This commit is contained in:
59
SDL/kunden/usrCntlIDSPreise.Designer.vb
generated
59
SDL/kunden/usrCntlIDSPreise.Designer.vb
generated
@@ -25,7 +25,7 @@ Partial Class usrCntlIDSPreise
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.lblIDS = New System.Windows.Forms.TextBox()
|
||||
Me.dgvOfferteDetails = New System.Windows.Forms.DataGridView()
|
||||
Me.dgvIDSData = New System.Windows.Forms.DataGridView()
|
||||
Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.btnOfferteSpeichern = New System.Windows.Forms.Button()
|
||||
@@ -38,7 +38,8 @@ Partial Class usrCntlIDSPreise
|
||||
Me.dgvFILTER = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.btnRW = New System.Windows.Forms.Button()
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
CType(Me.dgvIDSData, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxtAddSdl.SuspendLayout()
|
||||
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvFILTER, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -57,26 +58,26 @@ Partial Class usrCntlIDSPreise
|
||||
Me.lblIDS.TabIndex = 0
|
||||
Me.lblIDS.Text = "IDS"
|
||||
'
|
||||
'dgvOfferteDetails
|
||||
'dgvIDSData
|
||||
'
|
||||
Me.dgvOfferteDetails.AllowUserToAddRows = False
|
||||
Me.dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
Me.dgvOfferteDetails.AllowUserToOrderColumns = True
|
||||
Me.dgvOfferteDetails.AllowUserToResizeRows = False
|
||||
Me.dgvIDSData.AllowUserToAddRows = False
|
||||
Me.dgvIDSData.AllowUserToDeleteRows = False
|
||||
Me.dgvIDSData.AllowUserToOrderColumns = True
|
||||
Me.dgvIDSData.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvOfferteDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.dgvOfferteDetails.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Me.dgvIDSData.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.dgvIDSData.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.dgvOfferteDetails.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvOfferteDetails.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
|
||||
Me.dgvOfferteDetails.Location = New System.Drawing.Point(182, 63)
|
||||
Me.dgvOfferteDetails.MultiSelect = False
|
||||
Me.dgvOfferteDetails.Name = "dgvOfferteDetails"
|
||||
Me.dgvOfferteDetails.RowHeadersVisible = False
|
||||
Me.dgvOfferteDetails.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvOfferteDetails.Size = New System.Drawing.Size(981, 444)
|
||||
Me.dgvOfferteDetails.TabIndex = 5
|
||||
Me.dgvIDSData.BackgroundColor = System.Drawing.Color.White
|
||||
Me.dgvIDSData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing
|
||||
Me.dgvIDSData.Location = New System.Drawing.Point(182, 63)
|
||||
Me.dgvIDSData.MultiSelect = False
|
||||
Me.dgvIDSData.Name = "dgvIDSData"
|
||||
Me.dgvIDSData.RowHeadersVisible = False
|
||||
Me.dgvIDSData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvIDSData.Size = New System.Drawing.Size(981, 444)
|
||||
Me.dgvIDSData.TabIndex = 5
|
||||
'
|
||||
'cntxtAddSdl
|
||||
'
|
||||
@@ -238,11 +239,26 @@ Partial Class usrCntlIDSPreise
|
||||
Me.btnRW.UseVisualStyleBackColor = True
|
||||
Me.btnRW.Visible = False
|
||||
'
|
||||
'btnAdd
|
||||
'
|
||||
Me.btnAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnAdd.BackgroundImage = Global.SDL.My.Resources.Resources.plus
|
||||
Me.btnAdd.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnAdd.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnAdd.Location = New System.Drawing.Point(869, 3)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(36, 28)
|
||||
Me.btnAdd.TabIndex = 37
|
||||
Me.btnAdd.Tag = ""
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrCntlIDSPreise
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.BackColor = System.Drawing.Color.White
|
||||
Me.Controls.Add(Me.btnAdd)
|
||||
Me.Controls.Add(Me.btnRW)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.dgvFILTER)
|
||||
@@ -254,11 +270,11 @@ Partial Class usrCntlIDSPreise
|
||||
Me.Controls.Add(Me.btnOfferteSpeichern)
|
||||
Me.Controls.Add(Me.btnEditIDS)
|
||||
Me.Controls.Add(Me.lblIDS)
|
||||
Me.Controls.Add(Me.dgvOfferteDetails)
|
||||
Me.Controls.Add(Me.dgvIDSData)
|
||||
Me.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.Name = "usrCntlIDSPreise"
|
||||
Me.Size = New System.Drawing.Size(1173, 576)
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.dgvIDSData, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.cntxtAddSdl.ResumeLayout(False)
|
||||
CType(Me.dgvIDS, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.dgvFILTER, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@@ -267,7 +283,7 @@ Partial Class usrCntlIDSPreise
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lblIDS As System.Windows.Forms.TextBox
|
||||
Friend WithEvents dgvOfferteDetails As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents dgvIDSData As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents btnEditIDS As VERAG_PROG_ALLGEMEIN.FlatButton
|
||||
Friend WithEvents cntxtAddSdl As ContextMenuStrip
|
||||
Friend WithEvents DToolStripMenuItem As ToolStripMenuItem
|
||||
@@ -280,4 +296,5 @@ Partial Class usrCntlIDSPreise
|
||||
Friend WithEvents dgvFILTER As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents btnRW As Button
|
||||
Friend WithEvents btnAdd As Button
|
||||
End Class
|
||||
|
||||
@@ -38,13 +38,31 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
Sub initfilterColumnsWidth()
|
||||
|
||||
If dgvFILTER.ColumnCount > 0 AndAlso dgvFILTER.ColumnCount = dgvOfferteDetails.ColumnCount Then
|
||||
If dgvFILTER.ColumnCount > 0 AndAlso dgvFILTER.ColumnCount = dgvIDSData.ColumnCount Then
|
||||
|
||||
dgvFILTER.Width = dgvOfferteDetails.Width
|
||||
For Each c As DataGridViewColumn In dgvOfferteDetails.Columns
|
||||
dgvFILTER.Width = dgvIDSData.Width
|
||||
For Each c As DataGridViewColumn In dgvIDSData.Columns
|
||||
dgvFILTER.Columns(c.Index).Width = c.Width
|
||||
Next
|
||||
|
||||
If Not dgvInitWait Then
|
||||
|
||||
If dgvIDS.SelectedCells.Count > 0 Then
|
||||
|
||||
Select Case cbxTypes._value
|
||||
Case "LK", "L", "LS", "LSK"
|
||||
If dgvIDS.SelectedCells(0).RowIndex > -1 AndAlso dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value > 0 Then
|
||||
Dim row As DataGridViewRow = dgvFILTER.Rows(0)
|
||||
row.Cells("OutletCountryCode").Value = dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value
|
||||
Else
|
||||
dgvFILTER.Rows(0).Cells("OutletCountryCode").Value = Nothing
|
||||
End If
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If kdNr_filter Then
|
||||
Select Case cbxTypes._value
|
||||
Case "LSK", "LK" : initKDFilter()
|
||||
@@ -56,6 +74,8 @@ Public Class usrCntlIDSPreise
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Sub initFilter()
|
||||
dgvInitWait = True
|
||||
|
||||
@@ -68,7 +88,7 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
End Try
|
||||
|
||||
Dim sortedCols = dgvOfferteDetails.Columns.Cast(Of DataGridViewColumn)() _
|
||||
Dim sortedCols = dgvIDSData.Columns.Cast(Of DataGridViewColumn)() _
|
||||
.OrderBy(Function(c) c.DisplayIndex)
|
||||
|
||||
For Each c As DataGridViewColumn In sortedCols
|
||||
@@ -102,7 +122,7 @@ Public Class usrCntlIDSPreise
|
||||
' pnlTest.Controls.Add(dgv)
|
||||
' dgv.Top = 0
|
||||
' dgv.Left = 0
|
||||
dgvFILTER.Width = dgvOfferteDetails.Width
|
||||
dgvFILTER.Width = dgvIDSData.Width
|
||||
If kdNr_filter Then
|
||||
initKDFilter()
|
||||
End If
|
||||
@@ -119,7 +139,7 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
If cbxTypes._value = "" Then Exit Sub
|
||||
|
||||
With dgvOfferteDetails
|
||||
With dgvIDSData
|
||||
|
||||
Dim SQL_ = ""
|
||||
Dim SQL_WHERE = ""
|
||||
@@ -135,7 +155,7 @@ Public Class usrCntlIDSPreise
|
||||
' clearFilter()
|
||||
End If
|
||||
|
||||
dgvOfferteDetails.Columns.Clear()
|
||||
dgvIDSData.Columns.Clear()
|
||||
|
||||
Select Case cbxTypes._value
|
||||
Case "L"
|
||||
@@ -195,57 +215,58 @@ Public Class usrCntlIDSPreise
|
||||
Next
|
||||
|
||||
.DataSource = IDSDIESEL_Bind.bindingdataTable
|
||||
.AllowUserToAddRows = False
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
If edit Then
|
||||
'If edit Then
|
||||
|
||||
Select Case cbxTypes._value
|
||||
Case "L"
|
||||
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Rechenwerte.OutletCountryCode,tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.ProductTypeCode,tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
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 & ") ", ") ") & SQL_WHERE & "
|
||||
ORDER BY tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.ProductTypeCode;"
|
||||
' Select Case cbxTypes._value
|
||||
' Case "L"
|
||||
' SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID, tbl_IDS_Rechenwerte.OutletCountryCode,tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.ProductTypeCode,tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
' 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 & ") ", ") ") & SQL_WHERE & "
|
||||
' 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_Rechenwerte.OutletCountryCode, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Stationen.OutletName,tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
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 & ") ", ") ") & SQL_WHERE & "
|
||||
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 "LS"
|
||||
' SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID,tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Länder.OutletCountry, tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Stationen.OutletName,tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
' 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 & ") ", ") ") & SQL_WHERE & "
|
||||
' 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 "LK"
|
||||
' Case "LK"
|
||||
|
||||
FUNC.dgvCellToCbo(dgvOfferteDetails, 1, "OutletCountryCode", "OutletCountryCode", " SELECT [OutletCountryCode], OutletCountry FROM [tbl_IDS_Länder] ORDER BY OutletCountry ", "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(dgvIDSData, 1, "OutletCountryCode", "OutletCountryCode", " SELECT [OutletCountryCode], OutletCountry FROM [tbl_IDS_Länder] ORDER BY OutletCountry ", "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)
|
||||
|
||||
Case "LSK"
|
||||
SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID,tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Länder.OutletCountry,tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.CustomerCode,Adressen.Ordnungsbegriff AS CustomerName, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
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, " AND tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode & ") ", ") ") & SQL_WHERE & "
|
||||
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 "LSK"
|
||||
' SQL_ = "SELECT tbl_IDS_Rechenwerte.ID as ID,tbl_IDS_Rechenwerte.OutletCountryCode, tbl_IDS_Länder.OutletCountry,tbl_IDS_Rechenwerte.OutletCode, tbl_IDS_Stationen.OutletName, tbl_IDS_Rechenwerte.CustomerCode,Adressen.Ordnungsbegriff AS CustomerName, tbl_IDS_Rechenwerte.ProductTypeCode, tbl_IDS_Produkte.ProductDescription, tbl_IDS_Rechenwerte.Rechenwert, tbl_IDS_Rechenwerte.Kz, tbl_IDS_Rechenwerte.KategorieNr, tbl_IDS_Rechenwerte.Zeitstempel, tbl_IDS_Rechenwerte.Sachbearbeiter
|
||||
' 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, " AND tbl_IDS_Rechenwerte.OutletCountryCode = " & OutletCountryCode & ") ", ") ") & SQL_WHERE & "
|
||||
' 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 "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
|
||||
FROM tbl_IDS_Produkte INNER JOIN tbl_IDS_Kategorien_Rechenwerte ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Kategorien_Rechenwerte.ProductTypeCode
|
||||
WHERE 1 = 1 " & SQL_WHERE & "
|
||||
ORDER BY tbl_IDS_Kategorien_Rechenwerte.KategorieNr, tbl_IDS_Kategorien_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
|
||||
' FROM tbl_IDS_Produkte INNER JOIN tbl_IDS_Kategorien_Rechenwerte ON tbl_IDS_Produkte.ProductTypeCode = tbl_IDS_Kategorien_Rechenwerte.ProductTypeCode
|
||||
' WHERE 1 = 1 " & SQL_WHERE & "
|
||||
' ORDER BY tbl_IDS_Kategorien_Rechenwerte.KategorieNr, tbl_IDS_Kategorien_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
|
||||
WHERE 1 = 1 " & SQL_WHERE & "
|
||||
ORDER BY tbl_IDS_Kunden_ohne_Rabatt.CustomerCode;"
|
||||
' 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
|
||||
' WHERE 1 = 1 " & SQL_WHERE & "
|
||||
' ORDER BY tbl_IDS_Kunden_ohne_Rabatt.CustomerCode;"
|
||||
|
||||
End Select
|
||||
End If
|
||||
' End Select
|
||||
'End If
|
||||
|
||||
|
||||
'.DataSource = SQL.loadDgvBySql(" SELECT [LeistungsNr],[LeistungsBez],[BerechnungsartNr],[Preis],[Anzahl],[BGebLeistungsNr],[BGebProzent],[BGebMinBetrag],[Eingegeben am],[Geändert am],[Sachbearbeiter],[PreisänderungProzent],[PreisAlt],[Preisänderung] " &
|
||||
@@ -302,7 +323,7 @@ Public Class usrCntlIDSPreise
|
||||
For Each c As DataGridViewCell In dgvFILTER.Rows(0).Cells
|
||||
If c.Value IsNot DBNull.Value Then
|
||||
If c.GetType Is GetType(DataGridViewTextBoxCell) Then
|
||||
If c.Value IsNot Nothing AndAlso c.Value <> "" Then
|
||||
If c.Value IsNot Nothing Then
|
||||
Dim srchstr = getSqlText(c.Value.ToString.Trim)
|
||||
'MsgBox(c.OwningColumn.DataPropertyName)
|
||||
If c.OwningColumn.Name.Contains("ProductTypeCode") Then
|
||||
@@ -344,6 +365,7 @@ Public Class usrCntlIDSPreise
|
||||
End If
|
||||
andstr = " AND "
|
||||
End If
|
||||
|
||||
ElseIf c.GetType Is GetType(DataGridViewCheckBoxCell) Then
|
||||
If c.Value IsNot Nothing AndAlso c.Value.ToString <> "" Then
|
||||
If c.Value = CheckState.Checked Then
|
||||
@@ -371,9 +393,9 @@ Public Class usrCntlIDSPreise
|
||||
If dgvIDS.SelectedCells.Count > 0 Then
|
||||
|
||||
If dgvIDS.SelectedCells(0).RowIndex > -1 AndAlso dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value > 0 Then
|
||||
initDGVDieselpreiseDetails(dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value)
|
||||
initDGVDieselpreiseDetails(dgvIDS.Rows(dgvIDS.SelectedCells(0).RowIndex).Cells("OutletCountryCode").Value, True)
|
||||
Else
|
||||
initDGVDieselpreiseDetails()
|
||||
initDGVDieselpreiseDetails(, True)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -442,7 +464,7 @@ Public Class usrCntlIDSPreise
|
||||
.Columns("OutletCountryCode").Visible = False
|
||||
End With
|
||||
'EnableDoubleBuffered(dgvOfferteDetails)
|
||||
dgvOfferteDetails.Columns.Clear()
|
||||
dgvIDSData.Columns.Clear()
|
||||
dgvIDS.ClearSelection()
|
||||
|
||||
initDGVDieselpreiseDetails()
|
||||
@@ -464,11 +486,11 @@ Public Class usrCntlIDSPreise
|
||||
Sub initDGVWidth()
|
||||
Dim DGVwidth = 0
|
||||
Dim reduceWidth = 0
|
||||
For Each c As DataGridViewColumn In dgvOfferteDetails.Columns
|
||||
For Each c As DataGridViewColumn In dgvIDSData.Columns
|
||||
DGVwidth += c.Width
|
||||
Next
|
||||
Dim DGVheight = 0
|
||||
For Each r As DataGridViewRow In dgvOfferteDetails.Rows
|
||||
For Each r As DataGridViewRow In dgvIDSData.Rows
|
||||
DGVheight += r.Height
|
||||
Next
|
||||
DGVheight += 50
|
||||
@@ -488,7 +510,7 @@ Public Class usrCntlIDSPreise
|
||||
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 dgvIDSData.CellValueChanged
|
||||
Try
|
||||
Select Case cbxTypes._value
|
||||
Case "L", "LS", "LSK", "KRW", "LSK", "LK"
|
||||
@@ -496,34 +518,6 @@ Public Class usrCntlIDSPreise
|
||||
If currentIDS IsNot Nothing Then
|
||||
currentIDS.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
currentIDS.Zeitstempel = Now
|
||||
|
||||
Select Case cbxTypes._value
|
||||
Case "L"
|
||||
Select Case dgvOfferteDetails.CurrentCell.ColumnIndex
|
||||
' Case 0 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.OutletCode = CInt(dgvOfferteDetails.CurrentCell.Value)
|
||||
Case 5 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.Rechenwert = CDbl(dgvOfferteDetails.CurrentCell.Value)
|
||||
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
|
||||
End Select
|
||||
|
||||
Case "LS"
|
||||
|
||||
Select Case dgvOfferteDetails.CurrentCell.ColumnIndex
|
||||
Case 5 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.Rechenwert = CDbl(dgvOfferteDetails.CurrentCell.Value)
|
||||
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
|
||||
End Select
|
||||
|
||||
Case "LK"
|
||||
|
||||
Select Case dgvOfferteDetails.CurrentCell.ColumnIndex
|
||||
Case 1 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.OutletCode = CInt(dgvOfferteDetails.CurrentCell.Value)
|
||||
'Case 2 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso dgvOfferteDetails.CurrentCell.Value <> "" Then dgvOfferteDetails.CurrentRow.Cells("").Value =
|
||||
Case 5 : If dgvOfferteDetails.CurrentCell.Value IsNot Nothing AndAlso IsNumeric(dgvOfferteDetails.CurrentCell.Value) Then currentIDS.Rechenwert = CDbl(dgvOfferteDetails.CurrentCell.Value)
|
||||
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
|
||||
End Select
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
DGVHasChaged = True
|
||||
If currentIDS.SAVE() Then
|
||||
|
||||
@@ -578,14 +572,14 @@ Public Class usrCntlIDSPreise
|
||||
Private Sub checkPerimissionsDGVDetails()
|
||||
|
||||
Try
|
||||
With dgvOfferteDetails
|
||||
With dgvIDSData
|
||||
|
||||
If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("DIESELPREISE_BEARBEITEN", "SDL") Then
|
||||
For Each c As DataGridViewColumn In .Columns
|
||||
c.ReadOnly = True
|
||||
handleEditMode(False)
|
||||
Next
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
dgvIDSData.AllowUserToDeleteRows = False
|
||||
Else
|
||||
|
||||
For Each c As DataGridViewColumn In .Columns
|
||||
@@ -607,7 +601,7 @@ Public Class usrCntlIDSPreise
|
||||
End If
|
||||
|
||||
Next
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
dgvIDSData.AllowUserToDeleteRows = False
|
||||
End If
|
||||
|
||||
End With
|
||||
@@ -624,7 +618,7 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
dgvIDS.Enabled = False
|
||||
'currentOffert = New VERAG_PROG_ALLGEMEIN.cOfferte(dgvIDS.SelectedRows(0).Cells("OffertenNr").Value, False)
|
||||
Dim orgDataTable As DataTable = dgvOfferteDetails.DataSource
|
||||
Dim orgDataTable As DataTable = dgvIDSData.DataSource
|
||||
tmpDataTable = orgDataTable.Copy
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -642,9 +636,9 @@ Public Class usrCntlIDSPreise
|
||||
dgvIDS.ReadOnly = True
|
||||
|
||||
Else
|
||||
dgvOfferteDetails.AllowUserToAddRows = True
|
||||
dgvOfferteDetails.AllowUserToDeleteRows = True
|
||||
dgvOfferteDetails.RowHeadersVisible = True
|
||||
dgvIDSData.AllowUserToAddRows = True
|
||||
dgvIDSData.AllowUserToDeleteRows = True
|
||||
dgvIDSData.RowHeadersVisible = True
|
||||
|
||||
End If
|
||||
|
||||
@@ -661,7 +655,7 @@ Public Class usrCntlIDSPreise
|
||||
If isInEditMode Then
|
||||
|
||||
dgvIDS.Enabled = False
|
||||
dgvOfferteDetails.ReadOnly = False
|
||||
dgvIDSData.ReadOnly = False
|
||||
btnOfferteSpeichern.Enabled = True
|
||||
btnCloseEditMode.Visible = True
|
||||
cbxTypes.Enabled = False
|
||||
@@ -669,7 +663,7 @@ Public Class usrCntlIDSPreise
|
||||
Else
|
||||
|
||||
dgvIDS.Enabled = True
|
||||
dgvOfferteDetails.ReadOnly = True
|
||||
dgvIDSData.ReadOnly = True
|
||||
btnOfferteSpeichern.Enabled = False
|
||||
btnCloseEditMode.Visible = False
|
||||
cbxTypes.Enabled = True
|
||||
@@ -679,14 +673,14 @@ Public Class usrCntlIDSPreise
|
||||
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 dgvIDSData.UserDeletingRow
|
||||
DGVHasChaged = 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 dgvIDSData.KeyUp
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
|
||||
dgvOfferteDetails.CurrentCell = GetNextCell(dgvOfferteDetails.CurrentCell)
|
||||
dgvIDSData.CurrentCell = GetNextCell(dgvIDSData.CurrentCell)
|
||||
e.Handled = True
|
||||
|
||||
End If
|
||||
@@ -699,13 +693,13 @@ Public Class usrCntlIDSPreise
|
||||
Dim nextCell As DataGridViewCell = currentCell
|
||||
Dim j = 0
|
||||
Do
|
||||
Dim nextCellIndex As Integer = (nextCell.ColumnIndex + j) Mod dgvOfferteDetails.ColumnCount
|
||||
Dim nextRowIndex As Integer = If(nextCellIndex = 0, (nextCell.RowIndex + 1) Mod dgvOfferteDetails.RowCount, nextCell.RowIndex)
|
||||
Dim nextCellIndex As Integer = (nextCell.ColumnIndex + j) Mod dgvIDSData.ColumnCount
|
||||
Dim nextRowIndex As Integer = If(nextCellIndex = 0, (nextCell.RowIndex + 1) Mod dgvIDSData.RowCount, nextCell.RowIndex)
|
||||
'lblIDS.Text = "C" & nextCellIndex & "R" & nextRowIndex & "RO" & IIf(nextCell.[ReadOnly], "1", "0") & "H" & IIf(Not nextCell.Visible, "1", "0")
|
||||
nextCell = dgvOfferteDetails.Rows(nextRowIndex).Cells(nextCellIndex)
|
||||
nextCell = dgvIDSData.Rows(nextRowIndex).Cells(nextCellIndex)
|
||||
i += 1
|
||||
j = 1
|
||||
Loop While (i < (dgvOfferteDetails.RowCount * dgvOfferteDetails.ColumnCount) AndAlso (nextCell.[ReadOnly]) Or i < (dgvOfferteDetails.RowCount * dgvOfferteDetails.ColumnCount) AndAlso Not nextCell.Visible)
|
||||
Loop While (i < (dgvIDSData.RowCount * dgvIDSData.ColumnCount) AndAlso (nextCell.[ReadOnly]) Or i < (dgvIDSData.RowCount * dgvIDSData.ColumnCount) AndAlso Not nextCell.Visible)
|
||||
|
||||
Return nextCell
|
||||
|
||||
@@ -749,14 +743,14 @@ Public Class usrCntlIDSPreise
|
||||
checkPerimissionsDGVDetails()
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_SelectionChanged(sender As Object, e As EventArgs) Handles dgvOfferteDetails.SelectionChanged
|
||||
Private Sub dgvOfferteDetails_SelectionChanged(sender As Object, e As EventArgs) Handles dgvIDSData.SelectionChanged
|
||||
|
||||
If dgvOfferteDetails.Columns.Contains("ID") Then
|
||||
If dgvIDSData.Columns.Contains("ID") Then
|
||||
|
||||
If dgvOfferteDetails.SelectedCells.Count > 0 Then
|
||||
If dgvIDSData.SelectedCells.Count > 0 Then
|
||||
|
||||
If dgvOfferteDetails.SelectedCells(0).RowIndex > -1 Then
|
||||
currentIDS = New cIDSDieselpreisRW(dgvOfferteDetails.Rows(dgvOfferteDetails.SelectedCells(0).RowIndex).Cells("ID").Value)
|
||||
If dgvIDSData.SelectedCells(0).RowIndex > -1 Then
|
||||
currentIDS = New cIDSDieselpreisRW(dgvIDSData.Rows(dgvIDSData.SelectedCells(0).RowIndex).Cells("ID").Value)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -775,7 +769,7 @@ Public Class usrCntlIDSPreise
|
||||
'2. Check ob der Quellkunde Einträge besitzt! -> nein -> abbrechen
|
||||
'3. alle Einträge durchlaufen und insert_into
|
||||
|
||||
If dgvOfferteDetails.Rows.Count > 0 Then
|
||||
If dgvIDSData.Rows.Count > 0 Then
|
||||
|
||||
Dim newRWKunde As Integer = 0
|
||||
|
||||
@@ -834,7 +828,7 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_ColumnWidthChanged(sender As Object, e As DataGridViewColumnEventArgs) Handles dgvOfferteDetails.ColumnWidthChanged
|
||||
Private Sub dgvOfferteDetails_ColumnWidthChanged(sender As Object, e As DataGridViewColumnEventArgs) Handles dgvIDSData.ColumnWidthChanged
|
||||
initfilterColumnsWidth()
|
||||
End Sub
|
||||
|
||||
@@ -866,7 +860,21 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
End If
|
||||
|
||||
Dim enableButtonAdd As Boolean = True
|
||||
|
||||
For Each col As DataGridViewColumn In dgvFILTER.Columns
|
||||
Dim colName As String = dgvFILTER.Columns(col.Index).Name
|
||||
Dim value As String = dgvFILTER.Rows(0).Cells(col.Index).Value
|
||||
Dim isVisible As Boolean = dgvFILTER.Rows(0).Cells(col.Index).Visible
|
||||
|
||||
'Prüfung ob alle Pflichtfelder ausgefüllt sind.
|
||||
If (colName.Contains("Code") Or colName.Contains("Kz") Or colName.Contains("Rechenwert")) AndAlso (value Is Nothing Or value = "") AndAlso isVisible Then
|
||||
enableButtonAdd = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
btnAdd.Visible = enableButtonAdd
|
||||
|
||||
If dgvIDS.SelectedCells.Count > 0 Then
|
||||
|
||||
@@ -896,7 +904,7 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
Private Sub btnRW_Click(sender As Object, e As EventArgs) Handles btnRW.Click
|
||||
|
||||
If dgvOfferteDetails.Rows.Count > 0 Then
|
||||
If dgvIDSData.Rows.Count > 0 Then
|
||||
|
||||
Dim newRW As Double = 0
|
||||
|
||||
@@ -910,7 +918,7 @@ Public Class usrCntlIDSPreise
|
||||
If vbYes = MsgBox("Möchten Sie den Rechenwert von " & RW & " auf " & s & " setzen?", vbYesNoCancel) Then
|
||||
|
||||
Dim counter As Integer = 0
|
||||
For Each r As DataGridViewRow In dgvOfferteDetails.Rows
|
||||
For Each r As DataGridViewRow In dgvIDSData.Rows
|
||||
|
||||
If r.Cells("ID").Value IsNot Nothing AndAlso IsNumeric(r.Cells("ID").Value) Then
|
||||
|
||||
@@ -955,5 +963,37 @@ Public Class usrCntlIDSPreise
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||
|
||||
If dgvIDSData.Rows.Count = 0 Then
|
||||
If vbYes = MsgBox("Möchten Sie den die oben angegebenen Werte in die Datenbank eintragen?", vbYesNoCancel) Then
|
||||
|
||||
Dim newIDS As New VERAG_PROG_ALLGEMEIN.cIDSDieselpreisRW()
|
||||
Dim OutletCountryCode As Integer = -1
|
||||
If dgvFILTER.Columns.Contains("CustomerCode") AndAlso dgvFILTER.Rows(0).Cells("CustomerCode").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("CustomerCode").Value) Then newIDS.CustomerCode = dgvFILTER.Rows(0).Cells("CustomerCode").Value
|
||||
If dgvFILTER.Columns.Contains("OutletCode") AndAlso dgvFILTER.Rows(0).Cells("OutletCode").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("OutletCode").Value) Then newIDS.OutletCode = dgvFILTER.Rows(0).Cells("OutletCode").Value
|
||||
If dgvFILTER.Columns.Contains("OutletCountryCode") AndAlso dgvFILTER.Rows(0).Cells("OutletCountryCode").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("OutletCountryCode").Value) Then
|
||||
newIDS.OutletCountryCode = dgvFILTER.Rows(0).Cells("OutletCountryCode").Value
|
||||
OutletCountryCode = dgvFILTER.Rows(0).Cells("OutletCountryCode").Value
|
||||
End If
|
||||
If dgvFILTER.Columns.Contains("ProductTypeCode") AndAlso dgvFILTER.Rows(0).Cells("ProductTypeCode").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("ProductTypeCode").Value) Then newIDS.ProductTypeCode = dgvFILTER.Rows(0).Cells("ProductTypeCode").Value
|
||||
If dgvFILTER.Columns.Contains("Rechenwert") AndAlso dgvFILTER.Rows(0).Cells("Rechenwert").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("Rechenwert").Value) Then newIDS.Rechenwert = dgvFILTER.Rows(0).Cells("Rechenwert").Value
|
||||
If dgvFILTER.Columns.Contains("KategorieNr") AndAlso dgvFILTER.Rows(0).Cells("KategorieNr").Value IsNot Nothing AndAlso IsNumeric(dgvFILTER.Rows(0).Cells("KategorieNr").Value) Then newIDS.KategorieNr = dgvFILTER.Rows(0).Cells("KategorieNr").Value
|
||||
If dgvFILTER.Columns.Contains("Kz") AndAlso dgvFILTER.Rows(0).Cells("Kz").Value IsNot Nothing AndAlso dgvFILTER.Rows(0).Cells("Kz").Value <> "" Then newIDS.Kz = dgvFILTER.Rows(0).Cells("Kz").Value
|
||||
|
||||
newIDS.Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
newIDS.Zeitstempel = Now
|
||||
|
||||
If newIDS.SAVE() Then
|
||||
MsgBox("Eintrag wurde gespeichert!")
|
||||
initDGVDieselpreiseDetails(OutletCountryCode, True)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -3410,10 +3410,10 @@ Public Class usrCntlKundenuebersicht
|
||||
frm.Controls.Add(dgv)
|
||||
frm.StartPosition = FormStartPosition.CenterScreen
|
||||
|
||||
If frm.ShowDialog().Cancel Then
|
||||
'If frm.ShowDialog() = DialogResult.Cancel Then
|
||||
initCreditsave()
|
||||
setKD(kdNr)
|
||||
End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -571,7 +571,7 @@ Public Class cCreditSafeAPI
|
||||
|
||||
dtEvents.Rows.Add(R)
|
||||
|
||||
createEvents(R, company.kdNr, company, CL, CR, CL_Datum, CR_Datum)
|
||||
createEvents(R, company.kdNr, company, CL, CR, CL_Datum, CR_Datum, "ED")
|
||||
|
||||
j = j + 1
|
||||
End While
|
||||
@@ -668,7 +668,6 @@ Public Class cCreditSafeAPI
|
||||
|
||||
'------------------------------- ALLE KUNDEN
|
||||
|
||||
|
||||
Dim checkDate As String = ""
|
||||
|
||||
If company IsNot Nothing AndAlso IsDate(company.lastChecked) Then
|
||||
@@ -833,7 +832,7 @@ Public Class cCreditSafeAPI
|
||||
company.csBonID = currentBonID
|
||||
End If
|
||||
|
||||
createEvents(R, company.kdNr, company, CL, CR, CL_Datum, CR_Datum)
|
||||
createEvents(R, company.kdNr, company, CL, CR, CL_Datum, CR_Datum, "E")
|
||||
|
||||
Next
|
||||
|
||||
@@ -917,10 +916,6 @@ Public Class cCreditSafeAPI
|
||||
Dim riskClassChanged As Boolean = False
|
||||
Dim KUNDE_ERW As New cKundenErweitert(KUNDE.KundenNr)
|
||||
|
||||
If company.kdNr = 762207 Then
|
||||
MsgBox("Hier")
|
||||
End If
|
||||
|
||||
If Not (ADR.LandKz = "AT" Or ADR.LandKz = "A") Then 'bei nicht österr. den Index nehmen, sonst den Score
|
||||
Index = IIf(CR = defaultCL, -1, calculatedBonIndexFromBonScore(CR, riskClass))
|
||||
Else
|
||||
@@ -965,7 +960,7 @@ Public Class cCreditSafeAPI
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Sub createEvents(R As DataRow, KundeNr As Integer, company As Company, ByRef CL As Integer, ByRef CR As Integer, ByRef CL_Datum As Date, ByRef CR_Datum As Date)
|
||||
Private Shared Sub createEvents(R As DataRow, KundeNr As Integer, company As Company, ByRef CL As Integer, ByRef CR As Integer, ByRef CL_Datum As Date, ByRef CR_Datum As Date, ByRef Importtype As String)
|
||||
|
||||
|
||||
Dim cEvent As New cCreditsafeEvent(CLng(R("eventId")), KundeNr)
|
||||
@@ -975,13 +970,18 @@ Public Class cCreditSafeAPI
|
||||
globaleventcode = R("globalEventCode").trim()
|
||||
ElseIf Not IsDBNull(R("localEventCode")) Then
|
||||
Select Case R("localEventCode").trim()
|
||||
Case "DECREASE_LIMIT", "INCREASE_LIMIT" : globaleventcode = "CL"
|
||||
Case "DECREASE_RATING", "INCREASE_RATING" : globaleventcode = "CR"
|
||||
Case "DECREASE_LIMIT", "INCREASE_LIMIT", "CL" : globaleventcode = "CL"
|
||||
Case "DECREASE_RATING", "INCREASE_RATING", "CR" : globaleventcode = "CR"
|
||||
Case "55" : If R("companyId").ToString.StartsWith("NL") Then globaleventcode = "CR" 'nur Holland!
|
||||
Case "56" : If R("companyId").ToString.StartsWith("NL") Then globaleventcode = "CL" 'nur Holland!
|
||||
End Select
|
||||
End If
|
||||
|
||||
If globaleventcode = "" Then
|
||||
If Not IsDBNull(R("ruleName")) AndAlso R("ruleName").ToString.Contains("Limit") Then globaleventcode = "CL"
|
||||
If Not IsDBNull(R("ruleName")) AndAlso R("ruleName").ToString.Contains("International Score") Then globaleventcode = "CR"
|
||||
End If
|
||||
|
||||
|
||||
cEvent.eventId = R("eventId")
|
||||
cEvent.companyId = R("companyId")
|
||||
@@ -1057,8 +1057,12 @@ Public Class cCreditSafeAPI
|
||||
cEvent.bonId = company.csBonID
|
||||
End If
|
||||
|
||||
cEvent.kundenNr = company.kdNr
|
||||
'cEvent.kundenNr = company.kdNr
|
||||
|
||||
'die Events sind besser strukturiert als die EventDetails, somit soll ein bereits bestehender Eintrag der über die Events importiert werden nicht von einem Eventdetail überschrieben werden!!!
|
||||
If Not (cEvent.hasEntry AndAlso Importtype = "ED") Then
|
||||
cEvent.SAVE()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1822,9 +1826,9 @@ Public Class cCreditSafeAPI
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(eventId, kundenNr) 'zwei unterschiedliche KundenNr können dieselbe eventID besitzen (weil bei uns alles tlw. doppelt angelegt ist!!!!!)
|
||||
Me.eventId = eventId
|
||||
kundenNr = kundenNr
|
||||
Sub New(eventId_, kundenNr_) 'zwei unterschiedliche KundenNr können dieselbe eventID besitzen (weil bei uns alles tlw. doppelt angelegt ist!!!!!)
|
||||
Me.eventId = eventId_
|
||||
kundenNr = kundenNr_
|
||||
LOADKDNR()
|
||||
End Sub
|
||||
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
|
||||
Reference in New Issue
Block a user