Compare commits
2 Commits
f3086cc689
...
1b31bae783
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b31bae783 | |||
| 1d137b969c |
@@ -188,7 +188,7 @@ Public Class frmAbrechnungsMaske
|
||||
If cbx.Checked Then
|
||||
reNrSQL = " isnull(Rechnungsausgang.RechnungsNr,'-') as ReNr,cast(isnull(Automailversand_sent, 0) as bit) as AUTO_sent, "
|
||||
Else
|
||||
reNrSQL = " cast(isnull(Automailversand_sent, 0) as bit) as AUTO_sent, "
|
||||
reNrSQL = " isnull(Rechnungsausgang.RechnungsNr,'-') as ReNr, cast(isnull(Automailversand_sent, 0) as bit) as AUTO_sent, "
|
||||
End If
|
||||
|
||||
|
||||
@@ -987,7 +987,7 @@ Public Class frmAbrechnungsMaske
|
||||
|
||||
Dim ListOfRK_ID As New List(Of Integer)
|
||||
|
||||
Dim noRE_DATE = dgvRechnungen.SelectedRows.Cast(Of DataGridViewRow)().Any(Function(r) r.Cells("RENR").Value Is Nothing OrElse IsDBNull(r.Cells("RENR").Value))
|
||||
Dim noRE_DATE = dgvRechnungen.SelectedRows.Cast(Of DataGridViewRow)().Any(Function(r) r.Cells("RENR").Value Is Nothing OrElse IsDBNull(r.Cells("RENR").Value) OrElse (r.Cells("RENR").Value) <> "-")
|
||||
|
||||
If noRE_DATE Then MsgBox("ACHTUNG, Rechnungsdatum wurde nicht gesetzt." & vbNewLine & "Vorgang wird abgebrochen!") : Exit Sub
|
||||
|
||||
|
||||
@@ -669,12 +669,13 @@ Public Class frmFaktSammelRgDrucken
|
||||
Me.Enabled = True
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
|
||||
Else
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
MsgBox("Es wurde keine RE-Nr vergeben !") : Exit Sub
|
||||
|
||||
End If
|
||||
|
||||
setMailversand_ALL(True, Firma, Sammelrechung)
|
||||
|
||||
81
SDL/kunden/usrCntlOfferte.Designer.vb
generated
81
SDL/kunden/usrCntlOfferte.Designer.vb
generated
@@ -22,8 +22,9 @@ Partial Class usrCntlOfferte
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Me.lblBesonderheiten = New System.Windows.Forms.Label()
|
||||
Me.rtbBesonderheiten = New System.Windows.Forms.RichTextBox()
|
||||
Me.lblOffert = New System.Windows.Forms.TextBox()
|
||||
@@ -36,7 +37,7 @@ Partial Class usrCntlOfferte
|
||||
Me.Label67 = New System.Windows.Forms.Label()
|
||||
Me.btnDeleteLeistung = New System.Windows.Forms.Button()
|
||||
Me.btnAddLeistung = New System.Windows.Forms.Button()
|
||||
Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip()
|
||||
Me.cntxtAddSdl = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.DToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.btnOfferteSpeichern = New System.Windows.Forms.Button()
|
||||
Me.btnHinzufuegen = New System.Windows.Forms.Button()
|
||||
@@ -63,10 +64,12 @@ Partial Class usrCntlOfferte
|
||||
Me.lblArchivierteOfferten = New System.Windows.Forms.Label()
|
||||
Me.lblEditMode = New System.Windows.Forms.Label()
|
||||
Me.btnOffertbearbeiten = New System.Windows.Forms.Button()
|
||||
Me.dgvOfferteNew = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.dgvOfferteNew = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.btnKK = New System.Windows.Forms.Button()
|
||||
Me.pnlKostenkalkulation = New System.Windows.Forms.Panel()
|
||||
Me.btnKK_Mail = New System.Windows.Forms.Button()
|
||||
Me.btnSaveBes = New System.Windows.Forms.Button()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
CType(Me.dgvOfferteDetails, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.dgvOfferte, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.cntxtAddSdl.SuspendLayout()
|
||||
@@ -125,8 +128,8 @@ Partial Class usrCntlOfferte
|
||||
Me.dgvOfferteDetails.AllowUserToDeleteRows = False
|
||||
Me.dgvOfferteDetails.AllowUserToOrderColumns = True
|
||||
Me.dgvOfferteDetails.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
|
||||
DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvOfferteDetails.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
|
||||
Me.dgvOfferteDetails.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)
|
||||
@@ -145,8 +148,8 @@ Partial Class usrCntlOfferte
|
||||
Me.dgvOfferte.AllowUserToAddRows = False
|
||||
Me.dgvOfferte.AllowUserToDeleteRows = False
|
||||
Me.dgvOfferte.AllowUserToResizeRows = False
|
||||
DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvOfferte.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
|
||||
DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.dgvOfferte.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
|
||||
Me.dgvOfferte.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.dgvOfferte.BackgroundColor = System.Drawing.Color.White
|
||||
@@ -640,31 +643,46 @@ Partial Class usrCntlOfferte
|
||||
Me.dgvOfferteNew.Size = New System.Drawing.Size(228, 347)
|
||||
Me.dgvOfferteNew.TabIndex = 30
|
||||
'
|
||||
'Button2
|
||||
'btnKK
|
||||
'
|
||||
Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button2.ForeColor = System.Drawing.Color.Black
|
||||
Me.Button2.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button2.Location = New System.Drawing.Point(0, 7)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(131, 36)
|
||||
Me.Button2.TabIndex = 34
|
||||
Me.Button2.Text = "Kostenkalkulation"
|
||||
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
Me.btnKK.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnKK.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnKK.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnKK.Image = Global.SDL.My.Resources.Resources.Excel_logo
|
||||
Me.btnKK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnKK.Location = New System.Drawing.Point(11, 26)
|
||||
Me.btnKK.Name = "btnKK"
|
||||
Me.btnKK.Size = New System.Drawing.Size(44, 36)
|
||||
Me.btnKK.TabIndex = 34
|
||||
Me.btnKK.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnKK.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlKostenkalkulation
|
||||
'
|
||||
Me.pnlKostenkalkulation.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.pnlKostenkalkulation.Controls.Add(Me.Button2)
|
||||
Me.pnlKostenkalkulation.Controls.Add(Me.Label4)
|
||||
Me.pnlKostenkalkulation.Controls.Add(Me.btnKK_Mail)
|
||||
Me.pnlKostenkalkulation.Controls.Add(Me.btnKK)
|
||||
Me.pnlKostenkalkulation.Location = New System.Drawing.Point(3, 385)
|
||||
Me.pnlKostenkalkulation.Name = "pnlKostenkalkulation"
|
||||
Me.pnlKostenkalkulation.Size = New System.Drawing.Size(139, 51)
|
||||
Me.pnlKostenkalkulation.Size = New System.Drawing.Size(119, 65)
|
||||
Me.pnlKostenkalkulation.TabIndex = 34
|
||||
Me.pnlKostenkalkulation.Visible = False
|
||||
'
|
||||
'btnKK_Mail
|
||||
'
|
||||
Me.btnKK_Mail.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnKK_Mail.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnKK_Mail.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnKK_Mail.Image = Global.SDL.My.Resources.Resources.email_big1
|
||||
Me.btnKK_Mail.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnKK_Mail.Location = New System.Drawing.Point(62, 26)
|
||||
Me.btnKK_Mail.Name = "btnKK_Mail"
|
||||
Me.btnKK_Mail.Size = New System.Drawing.Size(44, 36)
|
||||
Me.btnKK_Mail.TabIndex = 35
|
||||
Me.btnKK_Mail.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnKK_Mail.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSaveBes
|
||||
'
|
||||
Me.btnSaveBes.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
@@ -678,6 +696,16 @@ Partial Class usrCntlOfferte
|
||||
Me.btnSaveBes.Tag = ""
|
||||
Me.btnSaveBes.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(5, 4)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(94, 13)
|
||||
Me.Label4.TabIndex = 35
|
||||
Me.Label4.Text = "Kostenkalkulation:"
|
||||
'
|
||||
'usrCntlOfferte
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -718,6 +746,7 @@ Partial Class usrCntlOfferte
|
||||
Me.pnlEdit.PerformLayout()
|
||||
CType(Me.dgvOfferteNew, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnlKostenkalkulation.ResumeLayout(False)
|
||||
Me.pnlKostenkalkulation.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -762,8 +791,10 @@ Partial Class usrCntlOfferte
|
||||
Friend WithEvents btnOffertbearbeiten As Button
|
||||
Friend WithEvents dgvOfferteNew As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents btnKK As Button
|
||||
Friend WithEvents pnlKostenkalkulation As Panel
|
||||
Friend WithEvents btnSaveBes As Button
|
||||
Friend WithEvents btnOffertPreisliste As Button
|
||||
Friend WithEvents btnKK_Mail As Button
|
||||
Friend WithEvents Label4 As Label
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class usrCntlOfferte
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Class usrCntlOfferte
|
||||
|
||||
Dim FUNC As New cProgramFunctions
|
||||
Public kdNr As Integer = -1
|
||||
@@ -877,7 +879,7 @@
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnKK.Click, btnKK_Mail.Click
|
||||
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Try
|
||||
@@ -888,6 +890,7 @@
|
||||
Dim KD As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr)
|
||||
Dim ADR As New VERAG_PROG_ALLGEMEIN.cAdressen(kdNr)
|
||||
Dim FIRMA_TMP = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KD.FilialenNr)
|
||||
Dim FirmaID As Integer = -1
|
||||
|
||||
If dgvOfferteDetails.Rows.Count = 0 Then Exit Sub
|
||||
|
||||
@@ -916,10 +919,10 @@
|
||||
If (offertenNr = 26 Or offertenNr = 38) AndAlso FIRMA_TMP <> "UNISPED" Then FIRMA_TMP = "CS"
|
||||
|
||||
Select Case FIRMA_TMP
|
||||
Case "IMEX" : ExcelBez &= "_IMEX "
|
||||
Case "VERAG" : ExcelBez &= "_AG "
|
||||
Case "UNISPED" : ExcelBez &= "_UNI "
|
||||
Case "CS" : ExcelBez &= "_CS "
|
||||
Case "IMEX" : ExcelBez &= "_IMEX_" : FirmaID = 20
|
||||
Case "VERAG" : ExcelBez &= "_AG_" : FirmaID = 1
|
||||
Case "UNISPED" : ExcelBez &= "_UNISPED_" : FirmaID = 21
|
||||
Case "CS" : ExcelBez &= "_CS " : FirmaID = 11
|
||||
Case Else : ExcelBez &= " "
|
||||
End Select
|
||||
|
||||
@@ -1010,9 +1013,41 @@
|
||||
currentRow = currentRow + 1
|
||||
Next
|
||||
|
||||
|
||||
Datei.Save
|
||||
.Visible = True
|
||||
|
||||
Select Case sender.name
|
||||
Case "btnKK_Mail"
|
||||
|
||||
Dim outl As New Outlook.Application
|
||||
Dim Mail As Microsoft.Office.Interop.Outlook.MailItem
|
||||
Mail = outl.CreateItem(0)
|
||||
|
||||
Mail.To = ADR.E_Mail
|
||||
|
||||
|
||||
Dim TextHTML = ""
|
||||
TextHTML &= "_CHANGEME_"
|
||||
TextHTML &= "<br>"
|
||||
TextHTML &= "<br>"
|
||||
TextHTML &= "Mit freundlichen Grüßen<br>"
|
||||
TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "<br>"
|
||||
TextHTML &= "<br>"
|
||||
TextHTML &= cFakturierung.getSignature("DE", FirmaID, True, True)
|
||||
|
||||
Mail.HTMLBody = "<div style=""font-family:Calibri, Arial"">" & TextHTML & "</div>"
|
||||
Mail.Subject = "Preiserhöhung " & Today().Year
|
||||
Mail.Attachments.Add(Path)
|
||||
Mail.Display()
|
||||
|
||||
|
||||
|
||||
Case Else
|
||||
|
||||
.Visible = True
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -1066,4 +1101,5 @@
|
||||
MsgBox("Noch nicht implementiert!")
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user