Essensbestellungen
This commit is contained in:
@@ -259,8 +259,9 @@ Public Class UsrCntlessensbestellungen
|
|||||||
|
|
||||||
Dim mitarbeiter As New cMitarbeiter(cbxMitarbeiter._value)
|
Dim mitarbeiter As New cMitarbeiter(cbxMitarbeiter._value)
|
||||||
|
|
||||||
essen = New cEssensbestellung(cbxMenu._value, cbxMitarbeiter._value, cbxGebäude._value, cbxAbteilung._value, cbxMitarbeiter.Text, txtAnmerkung.Text)
|
Dim MenuID = SQL.getValueTxtBySql("select MenuID from tblEBMenu where MenuDateVon = " & cbxMenu._value, "AVISO")
|
||||||
|
|
||||||
|
essen = New cEssensbestellung(cbxMenu._value, cbxMitarbeiter._value, cbxGebäude._value, cbxAbteilung._value, cbxMitarbeiter.Text, txtAnmerkung.Text, MenuID)
|
||||||
|
|
||||||
If cb_montag.Checked Then
|
If cb_montag.Checked Then
|
||||||
If rbMenu_montag.Checked Then
|
If rbMenu_montag.Checked Then
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ Imports System.Text.RegularExpressions
|
|||||||
Imports iTextSharp.text.pdf
|
Imports iTextSharp.text.pdf
|
||||||
Imports SDL.eu.europa.ec
|
Imports SDL.eu.europa.ec
|
||||||
|
|
||||||
|
|
||||||
Public Class cBerechtignungenFunctions
|
Public Class cBerechtignungenFunctions
|
||||||
|
|
||||||
Public Shared Function loadBerechtigungen(mit_id) As List(Of cBerechtigungen)
|
Public Shared Function loadBerechtigungen(mit_id) As List(Of cBerechtigungen)
|
||||||
@@ -1011,7 +1010,7 @@ Public Class cProgramFunctions
|
|||||||
|
|
||||||
Public Sub screenshot()
|
Public Sub screenshot()
|
||||||
Dim form As New Form
|
Dim form As New Form
|
||||||
form = form.ActiveForm
|
form = Form.ActiveForm
|
||||||
Dim bounds As Rectangle
|
Dim bounds As Rectangle
|
||||||
Dim screenshot As System.Drawing.Bitmap
|
Dim screenshot As System.Drawing.Bitmap
|
||||||
Dim graph As Graphics
|
Dim graph As Graphics
|
||||||
@@ -1124,7 +1123,7 @@ Public Class cProgramFunctions
|
|||||||
Return ""
|
Return ""
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function genExcelFromDT_NEW(dt As DataTable, Optional rangeAsWaehrung() As String = Nothing, Optional ShowAutoFilter As Boolean = True, Optional HeaderTxt As String = "", Optional HeaderTxt2 As String = "", Optional waehrungsZeichen As String = "€") As String
|
Public Shared Function genExcelFromDT_NEW(dt As DataTable, Optional rangeAsWaehrung() As String = Nothing, Optional ShowAutoFilter As Boolean = True, Optional HeaderTxt As String = "", Optional HeaderTxt2 As String = "", Optional waehrungsZeichen As String = "€", Optional fitCellsToContent As Boolean = False) As String
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim sPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\SDL\tmp\" ' My.Computer.FileSystem.GetTempFileName
|
Dim sPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "\VERAG\SDL\tmp\" ' My.Computer.FileSystem.GetTempFileName
|
||||||
@@ -1160,6 +1159,11 @@ Public Class cProgramFunctions
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If fitCellsToContent Then
|
||||||
|
wb.Worksheets(0).Columns().AdjustToContents()
|
||||||
|
wb.Worksheets(0).Rows().AdjustToContents()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim filename As String = sPath & "tmp_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
|
Dim filename As String = sPath & "tmp_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Public Class frmEssensbestellungen
|
|||||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Dürüm", "Dürüm"))
|
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Dürüm", "Dürüm"))
|
||||||
'list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
'list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||||
|
|
||||||
cbxMenu.fillWithSQL("SELECT Distinct Top 50 (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)), MenuDateVon from tblEBMenu order by MenuDateVon desc", True, "AVISO", True) '/ where MenuDateVon >= GETDATE()
|
cbxMenu.fillWithSQL("SELECT Distinct Top 50 (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)), MenuDateVon from tblEBMenu order by MenuDateVon desc", False, "AVISO", True) '/ where MenuDateVon >= GETDATE()
|
||||||
|
|
||||||
cbxAlt_montag.Items.AddRange(list.ToArray())
|
cbxAlt_montag.Items.AddRange(list.ToArray())
|
||||||
cbxAlt_dienstag.Items.AddRange(list.ToArray())
|
cbxAlt_dienstag.Items.AddRange(list.ToArray())
|
||||||
@@ -58,7 +58,9 @@ Public Class frmEssensbestellungen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
essen = New cEssensbestellung(cbxMenu._value, cAllgemein.USRID, cbxGebauede._value, cAllgemein.ABTEILUNG, cAllgemein.MITARBEITER.mit_vname & " " & cAllgemein.MITARBEITER.mit_nname, txtAnmerkung)
|
Dim MenuID = SQL.getValueTxtBySql("select MenuID from tblEBMenu where MenuDateVon = " & cbxMenu._value, "AVISO")
|
||||||
|
|
||||||
|
essen = New cEssensbestellung(cbxMenu._value, cAllgemein.USRID, cbxGebauede._value, cAllgemein.ABTEILUNG, cAllgemein.MITARBEITER.mit_vname & " " & cAllgemein.MITARBEITER.mit_nname, txtAnmerkung, MenuID)
|
||||||
|
|
||||||
If cb_montag.Checked Then
|
If cb_montag.Checked Then
|
||||||
If rbMenu_montag.Checked Then
|
If rbMenu_montag.Checked Then
|
||||||
|
|||||||
37
SDL/frmEssensbestellungenAdministration.Designer.vb
generated
37
SDL/frmEssensbestellungenAdministration.Designer.vb
generated
@@ -28,6 +28,7 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.Label4 = New System.Windows.Forms.Label()
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
Me.Label22 = New System.Windows.Forms.Label()
|
Me.Label22 = New System.Windows.Forms.Label()
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
|
Me.Label10 = New System.Windows.Forms.Label()
|
||||||
Me.Button3 = New System.Windows.Forms.Button()
|
Me.Button3 = New System.Windows.Forms.Button()
|
||||||
Me.txtarchivieren = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
Me.txtarchivieren = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
Me.cbxAlleAnzeigen = New System.Windows.Forms.CheckBox()
|
Me.cbxAlleAnzeigen = New System.Windows.Forms.CheckBox()
|
||||||
@@ -84,7 +85,7 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.cbxMailGebäude = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
Me.cbxMailGebäude = New VERAG_PROG_ALLGEMEIN.MyComboBox()
|
||||||
Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||||
Me.dgvBestellungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
Me.dgvBestellungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||||
Me.Label10 = New System.Windows.Forms.Label()
|
Me.cbxMenudrucken = New System.Windows.Forms.CheckBox()
|
||||||
Me.pnlTop.SuspendLayout()
|
Me.pnlTop.SuspendLayout()
|
||||||
Me.Panel1.SuspendLayout()
|
Me.Panel1.SuspendLayout()
|
||||||
Me.ContextMenuStrip1.SuspendLayout()
|
Me.ContextMenuStrip1.SuspendLayout()
|
||||||
@@ -167,6 +168,15 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.Panel1.Size = New System.Drawing.Size(1242, 106)
|
Me.Panel1.Size = New System.Drawing.Size(1242, 106)
|
||||||
Me.Panel1.TabIndex = 2
|
Me.Panel1.TabIndex = 2
|
||||||
'
|
'
|
||||||
|
'Label10
|
||||||
|
'
|
||||||
|
Me.Label10.AutoSize = True
|
||||||
|
Me.Label10.Location = New System.Drawing.Point(40, 82)
|
||||||
|
Me.Label10.Name = "Label10"
|
||||||
|
Me.Label10.Size = New System.Drawing.Size(30, 13)
|
||||||
|
Me.Label10.TabIndex = 76
|
||||||
|
Me.Label10.Text = "Jahr:"
|
||||||
|
'
|
||||||
'Button3
|
'Button3
|
||||||
'
|
'
|
||||||
Me.Button3.Enabled = False
|
Me.Button3.Enabled = False
|
||||||
@@ -760,7 +770,7 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button1.Location = New System.Drawing.Point(228, 734)
|
Me.Button1.Location = New System.Drawing.Point(224, 732)
|
||||||
Me.Button1.Name = "Button1"
|
Me.Button1.Name = "Button1"
|
||||||
Me.Button1.Size = New System.Drawing.Size(113, 29)
|
Me.Button1.Size = New System.Drawing.Size(113, 29)
|
||||||
Me.Button1.TabIndex = 54
|
Me.Button1.TabIndex = 54
|
||||||
@@ -782,7 +792,7 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.Button2.Location = New System.Drawing.Point(361, 734)
|
Me.Button2.Location = New System.Drawing.Point(359, 732)
|
||||||
Me.Button2.Name = "Button2"
|
Me.Button2.Name = "Button2"
|
||||||
Me.Button2.Size = New System.Drawing.Size(113, 29)
|
Me.Button2.Size = New System.Drawing.Size(113, 29)
|
||||||
Me.Button2.TabIndex = 59
|
Me.Button2.TabIndex = 59
|
||||||
@@ -860,23 +870,27 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Me.dgvBestellungen.ContextMenuStrip = Me.ContextMenuStrip1
|
Me.dgvBestellungen.ContextMenuStrip = Me.ContextMenuStrip1
|
||||||
Me.dgvBestellungen.Location = New System.Drawing.Point(0, 161)
|
Me.dgvBestellungen.Location = New System.Drawing.Point(0, 161)
|
||||||
Me.dgvBestellungen.Name = "dgvBestellungen"
|
Me.dgvBestellungen.Name = "dgvBestellungen"
|
||||||
Me.dgvBestellungen.Size = New System.Drawing.Size(1242, 560)
|
Me.dgvBestellungen.Size = New System.Drawing.Size(1242, 548)
|
||||||
Me.dgvBestellungen.TabIndex = 43
|
Me.dgvBestellungen.TabIndex = 43
|
||||||
'
|
'
|
||||||
'Label10
|
'cbxMenudrucken
|
||||||
'
|
'
|
||||||
Me.Label10.AutoSize = True
|
Me.cbxMenudrucken.AutoSize = True
|
||||||
Me.Label10.Location = New System.Drawing.Point(40, 82)
|
Me.cbxMenudrucken.Checked = True
|
||||||
Me.Label10.Name = "Label10"
|
Me.cbxMenudrucken.CheckState = System.Windows.Forms.CheckState.Checked
|
||||||
Me.Label10.Size = New System.Drawing.Size(30, 13)
|
Me.cbxMenudrucken.Location = New System.Drawing.Point(359, 715)
|
||||||
Me.Label10.TabIndex = 76
|
Me.cbxMenudrucken.Name = "cbxMenudrucken"
|
||||||
Me.Label10.Text = "Jahr:"
|
Me.cbxMenudrucken.Size = New System.Drawing.Size(95, 17)
|
||||||
|
Me.cbxMenudrucken.TabIndex = 77
|
||||||
|
Me.cbxMenudrucken.Text = "Menu drucken"
|
||||||
|
Me.cbxMenudrucken.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'frmEssensbestellungenAdministration
|
'frmEssensbestellungenAdministration
|
||||||
'
|
'
|
||||||
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.ClientSize = New System.Drawing.Size(1242, 767)
|
Me.ClientSize = New System.Drawing.Size(1242, 767)
|
||||||
|
Me.Controls.Add(Me.cbxMenudrucken)
|
||||||
Me.Controls.Add(Me.Label9)
|
Me.Controls.Add(Me.Label9)
|
||||||
Me.Controls.Add(Me.Button2)
|
Me.Controls.Add(Me.Button2)
|
||||||
Me.Controls.Add(Me.lblWarning)
|
Me.Controls.Add(Me.lblWarning)
|
||||||
@@ -968,4 +982,5 @@ Partial Class frmEssensbestellungenAdministration
|
|||||||
Friend WithEvents Button3 As Button
|
Friend WithEvents Button3 As Button
|
||||||
Friend WithEvents txtarchivieren As VERAG_PROG_ALLGEMEIN.MyTextBox
|
Friend WithEvents txtarchivieren As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||||
Friend WithEvents Label10 As Label
|
Friend WithEvents Label10 As Label
|
||||||
|
Friend WithEvents cbxMenudrucken As CheckBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
|
Imports Microsoft.Office.Interop
|
||||||
Imports System.Data.SqlTypes
|
|
||||||
Imports System.Timers
|
|
||||||
Imports Microsoft.Office.Interop
|
|
||||||
Imports VERAG_PROG_ALLGEMEIN
|
Imports VERAG_PROG_ALLGEMEIN
|
||||||
|
|
||||||
Public Class frmEssensbestellungenAdministration
|
Public Class frmEssensbestellungenAdministration
|
||||||
@@ -47,7 +44,7 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
Private Sub loadBestellungen()
|
Private Sub loadBestellungen()
|
||||||
|
|
||||||
|
|
||||||
Dim SQLString As String = "SELECT [eb_mitid] , [eb_mitname] ,[eb_firma] , [eb_kw] , [eb_gebaeude],[eb_abteilung],[eb_montag],[eb_dienstag],[eb_mittwoch],
|
Dim SQLString As String = "SELECT [eb_mitid] , [eb_mitname] ,[eb_firma] , [eb_kw] , [eb_gebaeude],[eb_abteilung],[eb_montag],[eb_dienstag],[eb_mittwoch],
|
||||||
[eb_donnerstag] ,[eb_freitag],[eb_datum],[eb_preis], [eb_anmerkung],[eb_storniert],[eb_storniert_am],[eb_abgerechnet],[eb_abgerechnet_am], [eb_gesendet], [eb_gesendet_am]
|
[eb_donnerstag] ,[eb_freitag],[eb_datum],[eb_preis], [eb_anmerkung],[eb_storniert],[eb_storniert_am],[eb_abgerechnet],[eb_abgerechnet_am], [eb_gesendet], [eb_gesendet_am]
|
||||||
FROM
|
FROM
|
||||||
[tblEssensbestellungen] WHERE 1=1 "
|
[tblEssensbestellungen] WHERE 1=1 "
|
||||||
@@ -622,7 +619,7 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
|
|
||||||
Case "Excel"
|
Case "Excel"
|
||||||
|
|
||||||
SDL.cProgramFunctions.genExcelFromDT_NEW(generateDTBestellungen(True))
|
SDL.cProgramFunctions.genExcelFromDT_NEW(generateDTBestellungen(True),,,,,, True)
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
@@ -642,10 +639,11 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
sqlWhere &= " And (eb_firma = 'VERAG' OR eb_firma = 'IMEX' OR eb_firma = 'FRONTOFFICE')"
|
sqlWhere &= " And (eb_firma = 'VERAG' OR eb_firma = 'IMEX' OR eb_firma = 'FRONTOFFICE')"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SQLStringBEstellungen As String = "SELECT [eb_mitname] as Name ,[eb_mitid] as ID , [eb_kw] as KW , [eb_gebaeude] as Gebaeude ,[eb_abteilung] as Abteilung ,[eb_montag] As Montag ,[eb_dienstag] As Dienstag,[eb_mittwoch] As Mittwoch,
|
Dim SQLStringBEstellungen As String = ""
|
||||||
[eb_donnerstag] As Donnerstag , [eb_freitag] As Freitag, [eb_anmerkung] As Anmerkung , [eb_datum] As Datum , [eb_storniert] as Storniert, [eb_firma] as Firma
|
SQLStringBEstellungen = "SELECT [eb_mitname] as Name ,[eb_mitid] as ID , [eb_kw] as KW , [eb_gebaeude] as Gebaeude ,[eb_abteilung] as Abteilung ,[eb_montag] As Montag ,[eb_dienstag] As Dienstag,[eb_mittwoch] As Mittwoch,
|
||||||
FROM
|
[eb_donnerstag] As Donnerstag , [eb_freitag] As Freitag, [eb_anmerkung] As Anmerkung , [eb_datum] As Datum , [eb_storniert] as Storniert, [eb_firma] as Firma, eb_MenuID
|
||||||
[tblEssensbestellungen] WHERE eb_kw = '" & cbxMailKW._value & "' AND eb_gebaeude = '" & cbxMailGebäude._value & "' AND ISNULL(eb_storniert,1)=0 " & sqlWhere & " Order by eb_datum"
|
FROM [tblEssensbestellungen] left join tblEBMenu on tblEBMenu.MenuID = eb_MenuID
|
||||||
|
WHERE eb_kw = '" & cbxMailKW._value & "' AND eb_gebaeude = '" & cbxMailGebäude._value & "' AND ISNULL(eb_storniert,1)=0 " & sqlWhere & " Order by eb_datum"
|
||||||
|
|
||||||
dtBestellungen = SQL.loadDgvBySql(SQLStringBEstellungen, "AVISO", 100, True)
|
dtBestellungen = SQL.loadDgvBySql(SQLStringBEstellungen, "AVISO", 100, True)
|
||||||
|
|
||||||
@@ -656,6 +654,8 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim uniqueMenusMontag = dtBestellungen.AsEnumerable() _
|
Dim uniqueMenusMontag = dtBestellungen.AsEnumerable() _
|
||||||
.GroupBy(Function(row) _
|
.GroupBy(Function(row) _
|
||||||
New With
|
New With
|
||||||
@@ -722,26 +722,47 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
resultFreitag &= IIf(el.Key.Freitag <> "", String.Format("{1}x {0}, " & vbNewLine, el.Key.Freitag, el.Count()), "")
|
resultFreitag &= IIf(el.Key.Freitag <> "", String.Format("{1}x {0}, " & vbNewLine, el.Key.Freitag, el.Count()), "")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If exportToExcel AndAlso cbxMenudrucken.Checked Then
|
||||||
|
|
||||||
|
Dim displayView = New DataView(dtBestellungen, "eb_MenuID is not null", "eb_MenuID", DataViewRowState.CurrentRows)
|
||||||
|
Dim distinctDT_CSV As DataTable = displayView.ToTable(True, "eb_MenuID")
|
||||||
|
Dim dtMenu As DataTable
|
||||||
|
|
||||||
|
If distinctDT_CSV.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Dim SQLMenu As String = "SELECT MenuEssenMo, MenuEssenDi, MenuEssenMi, MenuEssenDo, MenuEssenFr FROM [tblEBMenu] WHERE menuID='" & distinctDT_CSV.Rows(0).Item("eb_MenuID") & "'"
|
||||||
|
dtMenu = SQL.loadDgvBySql(SQLMenu, "AVISO", 100, True)
|
||||||
|
|
||||||
|
If dtMenu.Rows.Count = 1 Then
|
||||||
|
|
||||||
|
Dim menuRow As DataRow = dtBestellungen.NewRow
|
||||||
|
menuRow("ID") = "0"
|
||||||
|
menuRow("KW") = "-"
|
||||||
|
menuRow("Name") = "MENU"
|
||||||
|
menuRow("Gebaeude") = "-"
|
||||||
|
menuRow("Abteilung") = "-"
|
||||||
|
menuRow("Anmerkung") = DBNull.Value
|
||||||
|
menuRow("Datum") = DBNull.Value
|
||||||
|
menuRow("Storniert") = DBNull.Value
|
||||||
|
menuRow("Firma") = DBNull.Value
|
||||||
|
menuRow("Montag") = setLineBreaks(dtMenu.Rows(0).Item("MenuEssenMo"))
|
||||||
|
menuRow("Dienstag") = setLineBreaks(dtMenu.Rows(0).Item("MenuEssenDi"))
|
||||||
|
menuRow("Mittwoch") = setLineBreaks(dtMenu.Rows(0).Item("MenuEssenMi"))
|
||||||
|
menuRow("Donnerstag") = setLineBreaks(dtMenu.Rows(0).Item("MenuEssenDo"))
|
||||||
|
menuRow("Freitag") = setLineBreaks(dtMenu.Rows(0).Item("MenuEssenFr"))
|
||||||
|
menuRow("eb_MenuID") = ""
|
||||||
|
dtBestellungen.Rows.InsertAt(menuRow, 0)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'Dim SQLStringMenues As String = "SELECT TOP (1) [MenuEssenMoDate] as Montag
|
End If
|
||||||
' ,[MenuEssenDiDate] as Dienstag
|
|
||||||
' ,[MenuEssenMiDate] as Mittwoch
|
|
||||||
' ,[MenuEssenDoDate] as Donnerstag
|
|
||||||
' ,[MenuEssenFrDate] as Freitag
|
|
||||||
' FROM
|
|
||||||
' [tblEBMenu] WHERE eb_kw = '" & cbxMailKW._value & "' AND eb_gebaeude = '" & cbxMailGebäude._value & "' AND ISNULL(eb_storniert,1)=0 " & sqlWhere & " Order by eb_datum"
|
|
||||||
|
|
||||||
'Dim dtMenu = SQL.loadDgvBySql(SQLStringMenues, "AVISO", 100, True)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim R As DataRow = dtBestellungen.NewRow
|
Dim R As DataRow = dtBestellungen.NewRow
|
||||||
R("ID") = "0"
|
R("ID") = "0"
|
||||||
R("KW") = "-"
|
R("KW") = "-"
|
||||||
R("Name") = "SUMME"
|
R("Name") = "SUMME"
|
||||||
R("Gebaeude") = "-"
|
R("Gebaeude") = "-"
|
||||||
R("Name") = DBNull.Value
|
|
||||||
R("Abteilung") = "-"
|
R("Abteilung") = "-"
|
||||||
R("Anmerkung") = DBNull.Value
|
R("Anmerkung") = DBNull.Value
|
||||||
R("Datum") = DBNull.Value
|
R("Datum") = DBNull.Value
|
||||||
@@ -752,17 +773,22 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
R("Mittwoch") = String.Join(" ", resultMittwoch)
|
R("Mittwoch") = String.Join(" ", resultMittwoch)
|
||||||
R("Donnerstag") = String.Join(" ", resultDonnerstag)
|
R("Donnerstag") = String.Join(" ", resultDonnerstag)
|
||||||
R("Freitag") = String.Join(" ", resultFreitag)
|
R("Freitag") = String.Join(" ", resultFreitag)
|
||||||
|
R("eb_MenuID") = ""
|
||||||
dtBestellungen.Rows.Add(R)
|
dtBestellungen.Rows.Add(R)
|
||||||
|
|
||||||
' MessageBox.Show(String.Join(Environment.NewLine, result))
|
|
||||||
|
|
||||||
If exportToExcel Then
|
If exportToExcel Then
|
||||||
|
|
||||||
dtBestellungen.Columns.Remove("ID")
|
dtBestellungen.Columns.Remove("ID")
|
||||||
dtBestellungen.Columns.Remove("Datum")
|
dtBestellungen.Columns.Remove("Datum")
|
||||||
dtBestellungen.Columns.Remove("Storniert")
|
dtBestellungen.Columns.Remove("Storniert")
|
||||||
dtBestellungen.Columns.Remove("Gebaeude")
|
dtBestellungen.Columns.Remove("Gebaeude")
|
||||||
dtBestellungen.Columns.Remove("Abteilung")
|
dtBestellungen.Columns.Remove("Abteilung")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
dtBestellungen.Columns.Remove("eb_MenuID")
|
||||||
|
|
||||||
Return dtBestellungen
|
Return dtBestellungen
|
||||||
|
|
||||||
@@ -1004,4 +1030,31 @@ Public Class frmEssensbestellungenAdministration
|
|||||||
|
|
||||||
|
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
|
Private Function setLineBreaks(s As String) As String
|
||||||
|
|
||||||
|
s.Trim()
|
||||||
|
Dim startIndex = 0
|
||||||
|
Dim EndINdex = 19
|
||||||
|
For index As Integer = 20 * (s.Length \ 19) To 0 Step -20
|
||||||
|
|
||||||
|
s = ReplaceFirst(s, " ", vbNewLine, startIndex + 5, 19)
|
||||||
|
startIndex = startIndex + 19
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return s
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function ReplaceFirst(text As String, search As String, replace As String, startIndex As Integer, EndIndex As Integer) As String
|
||||||
|
|
||||||
|
Dim pos As Integer = text.IndexOf(search, startIndex, IIf(startIndex + EndIndex > text.Length - 1, text.Length - startIndex - 1, EndIndex))
|
||||||
|
If (pos < 0) Then Return text
|
||||||
|
|
||||||
|
Return text.Substring(0, pos) + replace + text.Substring(pos + search.Length)
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -93,16 +93,11 @@ Public Class rptFiskalkunde
|
|||||||
|
|
||||||
|
|
||||||
If BR IsNot Nothing Then
|
If BR IsNot Nothing Then
|
||||||
txtBon.Text = "Bonit<EFBFBD>tsklasse"
|
|
||||||
If AD.LandKz = "AT" Or AD.LandKz = "A" Then
|
txtBon.Text = "Bonit<EFBFBD>tsscore: "
|
||||||
txtBon.Text = "Bonit<EFBFBD>tsscore: "
|
txtBon.Text &= If(BR.ba_CreditSaveBonitaetsScore, "") & IIf(BR.ba_CreditSaveBonitaetsScore IsNot Nothing AndAlso BR.ba_CreditSaveRisikoklasse IsNot Nothing, "/", "") & If(BR.ba_CreditSaveRisikoklasse, "")
|
||||||
txtBon.Text &= If(BR.ba_CreditSaveBonitaetsScore, "")
|
txtBONja.Text = "X"
|
||||||
txtBONja.Text = "X"
|
|
||||||
Else
|
|
||||||
txtBon.Text = "Bonit<EFBFBD>tsindex: "
|
|
||||||
txtBon.Text &= If(BR.ba_CreditSaveBonitaetsIndex, "")
|
|
||||||
txtBONja.Text = "X"
|
|
||||||
End If
|
|
||||||
If IsDate(BR.ba_Datum) Then txtBon.Text &= " - " & CDate(BR.ba_Datum).ToShortDateString
|
If IsDate(BR.ba_Datum) Then txtBon.Text &= " - " & CDate(BR.ba_Datum).ToShortDateString
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
|||||||
13
SDL/kunden/frmKundenblatt.Designer.vb
generated
13
SDL/kunden/frmKundenblatt.Designer.vb
generated
@@ -22,7 +22,6 @@ Partial Class frmKundenblatt
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()>
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
|
||||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||||
@@ -163,21 +162,21 @@ Partial Class frmKundenblatt
|
|||||||
Me.scanUSTVVollmachten = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
|
Me.scanUSTVVollmachten = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
|
||||||
Me.tbUSTVAntrage = New System.Windows.Forms.TabPage()
|
Me.tbUSTVAntrage = New System.Windows.Forms.TabPage()
|
||||||
Me.UsrCntlUSTV = New SDL.usrCntlUSTV()
|
Me.UsrCntlUSTV = New SDL.usrCntlUSTV()
|
||||||
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem6 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.btnAbfVerb = New System.Windows.Forms.Button()
|
Me.btnAbfVerb = New System.Windows.Forms.Button()
|
||||||
Me.lblAbfVerb = New System.Windows.Forms.Label()
|
Me.lblAbfVerb = New System.Windows.Forms.Label()
|
||||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuStrip2 = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuStrip3 = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.mne = New System.Windows.Forms.MenuStrip()
|
Me.mne = New System.Windows.Forms.MenuStrip()
|
||||||
Me.AllgemeinToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.AllgemeinToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem2 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem4 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem4 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.cntxtCntxtMDM = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.cntxtCntxtMDM = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.ToolStripMenuItem8 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem8 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem5 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem5 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripMenuItem7 = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ToolStripMenuItem7 = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@@ -2094,7 +2093,7 @@ Partial Class frmKundenblatt
|
|||||||
'
|
'
|
||||||
Me.cntxtCntxtMDM.ImageScalingSize = New System.Drawing.Size(24, 24)
|
Me.cntxtCntxtMDM.ImageScalingSize = New System.Drawing.Size(24, 24)
|
||||||
Me.cntxtCntxtMDM.Name = "cntxtCntxtMDM"
|
Me.cntxtCntxtMDM.Name = "cntxtCntxtMDM"
|
||||||
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem4
|
Me.cntxtCntxtMDM.OwnerItem = Me.ToolStripMenuItem8
|
||||||
Me.cntxtCntxtMDM.Size = New System.Drawing.Size(61, 4)
|
Me.cntxtCntxtMDM.Size = New System.Drawing.Size(61, 4)
|
||||||
Me.cntxtCntxtMDM.Text = "cntxtMDM"
|
Me.cntxtCntxtMDM.Text = "cntxtMDM"
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ Public Class cEssensbestellung
|
|||||||
Property eb_gesendet_am As Object = Nothing
|
Property eb_gesendet_am As Object = Nothing
|
||||||
Property eb_gesendet As Boolean
|
Property eb_gesendet As Boolean
|
||||||
Property eb_firma As Object = Nothing
|
Property eb_firma As Object = Nothing
|
||||||
|
Property eb_MenuID As Object = Nothing
|
||||||
Property eb_archiviert As Boolean
|
Property eb_archiviert As Boolean
|
||||||
|
|
||||||
|
|
||||||
@@ -41,6 +42,17 @@ Public Class cEssensbestellung
|
|||||||
LOAD()
|
LOAD()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(eb_kw, eb_mitid, eb_gebaeude, eb_abteilung, eb_mitname, eb_anmerkung, eb_MenuID)
|
||||||
|
Me.eb_kw = eb_kw
|
||||||
|
Me.eb_mitid = eb_mitid
|
||||||
|
Me.eb_gebaeude = eb_gebaeude
|
||||||
|
Me.eb_abteilung = eb_abteilung
|
||||||
|
Me.eb_mitname = eb_mitname
|
||||||
|
Me.eb_anmerkung = eb_anmerkung
|
||||||
|
Me.eb_MenuID = eb_MenuID
|
||||||
|
LOAD()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
|
|
||||||
|
|
||||||
@@ -49,6 +61,7 @@ Public Class cEssensbestellung
|
|||||||
Sub New(eb_kw, eb_mitid)
|
Sub New(eb_kw, eb_mitid)
|
||||||
Me.eb_kw = eb_kw
|
Me.eb_kw = eb_kw
|
||||||
Me.eb_mitid = eb_mitid
|
Me.eb_mitid = eb_mitid
|
||||||
|
'Me.eb_MenuID = eb_MenuID
|
||||||
LOAD()
|
LOAD()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -76,6 +89,7 @@ Public Class cEssensbestellung
|
|||||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_gesendet_am", eb_gesendet_am))
|
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_gesendet_am", eb_gesendet_am))
|
||||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_firma", eb_firma))
|
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_firma", eb_firma))
|
||||||
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_archiviert", eb_archiviert))
|
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_archiviert", eb_archiviert))
|
||||||
|
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("eb_MenuID", eb_MenuID))
|
||||||
|
|
||||||
|
|
||||||
Return list
|
Return list
|
||||||
|
|||||||
Reference in New Issue
Block a user