SDL
This commit is contained in:
@@ -2808,59 +2808,53 @@ Public Class usrCntlKundenuebersicht
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Select Case ADRESSE.LandKz
|
||||
|
||||
Case "A" : land = "AT"
|
||||
Case "D" : land = "DE"
|
||||
Case Else
|
||||
land = ADRESSE.LandKz
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
If ADRESSE.LandKz.ToString.Length <> 2 Then
|
||||
land = cProgramFunctions.getISO2Land(ADRESSE.LandKz)
|
||||
Else
|
||||
land = ADRESSE.LandKz
|
||||
End If
|
||||
Dim company As New cCreditSafeAPI.Company("", "", "", land, KUNDE_ERW.kde_CreditSaveNo, KUNDE_ERW.kde_CreditSaveId, Nothing, "", "", "", "", "", "", "", "", "")
|
||||
|
||||
If lblBonitaetsdatum._value <> Nothing Then
|
||||
|
||||
|
||||
Dim lastChecked As Date = Date.ParseExact(lblBonitaetsdatum._value, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
company.lastChecked = lastChecked
|
||||
|
||||
If lastChecked = Today Then
|
||||
Dim bonaus = VERAG_PROG_ALLGEMEIN.cBonitaetsauskunft.LOADByKdNrDate(kdNr, Today)
|
||||
If bonaus.ba_Pruefungstool = "creditsafe API" AndAlso bonaus.ba_datenarchivId > -1 Then
|
||||
MsgBox("Heute wurde bereits eine erfolgreiche Abfrage durchgeführt" & vbNewLine & "Vorgang wird abgebrochen!")
|
||||
Cursor = Cursors.Default
|
||||
btnCreditsafe.Enabled = True
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If cs.checkDateOfLastRequest(company) < lastChecked Then
|
||||
Dim a As MsgBoxResult = MsgBox("Seit der letzen Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo)
|
||||
If a = vbYes Then
|
||||
|
||||
setCreditsafereportEntry(cs, company, True) 'doppelte Abfragen mitprotokollieren
|
||||
Dim lastChecked As Date = Date.ParseExact(lblBonitaetsdatum._value, "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
|
||||
company.lastChecked = lastChecked
|
||||
|
||||
If lastChecked = Today Then
|
||||
Dim bonaus = VERAG_PROG_ALLGEMEIN.cBonitaetsauskunft.LOADByKdNrDate(kdNr, Today)
|
||||
If bonaus.ba_Pruefungstool = "creditsafe API" AndAlso bonaus.ba_datenarchivId > -1 Then
|
||||
MsgBox("Heute wurde bereits eine erfolgreiche Abfrage durchgeführt" & vbNewLine & "Vorgang wird abgebrochen!")
|
||||
Cursor = Cursors.Default
|
||||
btnCreditsafe.Enabled = True
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If cs.checkDateOfLastRequest(company) < lastChecked Then
|
||||
Dim a As MsgBoxResult = MsgBox("Seit der letzen Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo)
|
||||
If a = vbYes Then
|
||||
|
||||
setCreditsafereportEntry(cs, company, True) 'doppelte Abfragen mitprotokollieren
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
setCreditsafereportEntry(cs, company)
|
||||
|
||||
End If
|
||||
Else
|
||||
|
||||
setCreditsafereportEntry(cs, company)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
setCreditsafereportEntry(cs, company)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
MsgBox("Authentifizierungsfehler bei Creditsafe-User")
|
||||
MsgBox("Authentifizierungsfehler bei Creditsafe-User")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
32
SDL/kunden/usrCntlOfferte.Designer.vb
generated
32
SDL/kunden/usrCntlOfferte.Designer.vb
generated
@@ -49,6 +49,7 @@ Partial Class usrCntlOfferte
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.lblLeistunAddErr2 = New System.Windows.Forms.Label()
|
||||
Me.pnlEdit = New System.Windows.Forms.Panel()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.cbxAutoFakturierung = New System.Windows.Forms.CheckBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.cboLeistungenAdd = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||
@@ -63,7 +64,6 @@ Partial Class usrCntlOfferte
|
||||
Me.lblEditMode = New System.Windows.Forms.Label()
|
||||
Me.btnOffertbearbeiten = New System.Windows.Forms.Button()
|
||||
Me.dgvOfferteNew = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvOfferte, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxtAddSdl.SuspendLayout()
|
||||
@@ -101,7 +101,7 @@ Partial Class usrCntlOfferte
|
||||
Me.lblOffert.Multiline = True
|
||||
Me.lblOffert.Name = "lblOffert"
|
||||
Me.lblOffert.ReadOnly = True
|
||||
Me.lblOffert.Size = New System.Drawing.Size(110, 22)
|
||||
Me.lblOffert.Size = New System.Drawing.Size(171, 22)
|
||||
Me.lblOffert.TabIndex = 0
|
||||
Me.lblOffert.Text = "Offerte"
|
||||
'
|
||||
@@ -402,6 +402,20 @@ Partial Class usrCntlOfferte
|
||||
Me.pnlEdit.Size = New System.Drawing.Size(796, 60)
|
||||
Me.pnlEdit.TabIndex = 20
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button1.ForeColor = System.Drawing.Color.Black
|
||||
Me.Button1.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button1.Location = New System.Drawing.Point(606, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(51, 36)
|
||||
Me.Button1.TabIndex = 33
|
||||
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cbxAutoFakturierung
|
||||
'
|
||||
Me.cbxAutoFakturierung.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
@@ -606,20 +620,6 @@ Partial Class usrCntlOfferte
|
||||
Me.dgvOfferteNew.Size = New System.Drawing.Size(228, 347)
|
||||
Me.dgvOfferteNew.TabIndex = 30
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button1.ForeColor = System.Drawing.Color.Black
|
||||
Me.Button1.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button1.Location = New System.Drawing.Point(606, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(51, 36)
|
||||
Me.Button1.TabIndex = 33
|
||||
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrCntlOfferte
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
|
||||
@@ -92,7 +92,7 @@ Public Class usrCntlOfferte
|
||||
' OFFERTEBind.bindingdataTable.PrimaryKey = {OFFERTEBind.bindingdataTable.Columns("KundenNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsNr"), OFFERTEBind.bindingdataTable.Columns("LeistungsBez")}
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ Public Class usrCntlOfferte
|
||||
' .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.Format = "p"
|
||||
.Columns("PreisänderungProzent").DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight
|
||||
.Columns("PreisAlt").Width = 60
|
||||
.Columns("PreisAlt").DefaultCellStyle.Format = "N2"
|
||||
@@ -334,22 +334,17 @@ Public Class usrCntlOfferte
|
||||
Private Sub dgvOfferteDetails_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles dgvOfferteDetails.CellValueChanged
|
||||
Try
|
||||
|
||||
|
||||
If loaded = True Then
|
||||
dgvOfferteDetails.Rows(e.RowIndex).Cells("Sachbearbeiter").Value = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
|
||||
dgvOfferteDetails.Rows(e.RowIndex).Cells("Geändert am").Value = Now
|
||||
DGVHasChaged = True
|
||||
'saveCurrentOffert()
|
||||
If isNew = True Then
|
||||
|
||||
If isNew Then
|
||||
currentOffert.Art = "Neuanlage"
|
||||
currentOffert.SAVE()
|
||||
|
||||
Else
|
||||
|
||||
currentOffert.Art = "Geändert"
|
||||
currentOffert.SAVE()
|
||||
End If
|
||||
currentOffert.SAVE()
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -782,4 +777,35 @@ Public Class usrCntlOfferte
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
cProgramFunctions.genExcelFromDGV_NEW(dgvOfferteDetails, True)
|
||||
End Sub
|
||||
|
||||
Private Sub dgvOfferteDetails_KeyUp(sender As Object, e As KeyEventArgs) Handles dgvOfferteDetails.KeyUp
|
||||
If e.KeyCode = Keys.Tab Then
|
||||
|
||||
|
||||
dgvOfferteDetails.CurrentCell = GetNextCell(dgvOfferteDetails.CurrentCell)
|
||||
e.Handled = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GetNextCell(currentCell As DataGridViewCell) As DataGridViewCell
|
||||
|
||||
Dim i As Integer = 0
|
||||
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)
|
||||
lblOffert.Text = "C" & nextCellIndex & "R" & nextRowIndex & "RO" & IIf(nextCell.[ReadOnly], "1", "0") & "H" & IIf(Not nextCell.Visible, "1", "0")
|
||||
nextCell = dgvOfferteDetails.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)
|
||||
|
||||
Return nextCell
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user