diff --git a/Aviso/frmEssensbestellungen.Designer.vb b/Aviso/frmEssensbestellungen.Designer.vb index 62c873a..b347d06 100644 --- a/Aviso/frmEssensbestellungen.Designer.vb +++ b/Aviso/frmEssensbestellungen.Designer.vb @@ -23,9 +23,9 @@ Partial Class frmEssensbestellungen Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - 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 DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.lblWochenkarte = New System.Windows.Forms.Label() Me.btnSave = New System.Windows.Forms.Button() Me.lblDatum = New System.Windows.Forms.Label() @@ -78,6 +78,8 @@ Partial Class frmEssensbestellungen Me.txtAnzahlMenu = New System.Windows.Forms.Label() Me.dgvBestellungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.cbxMenu = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.Button1 = New System.Windows.Forms.Button() + Me.txtAbteilung = New System.Windows.Forms.Label() Me.MyPanel1.SuspendLayout() Me.Dienstag.SuspendLayout() CType(Me.pbDienstag, System.ComponentModel.ISupportInitialize).BeginInit() @@ -95,7 +97,7 @@ Partial Class frmEssensbestellungen 'lblWochenkarte ' Me.lblWochenkarte.AutoSize = True - Me.lblWochenkarte.Location = New System.Drawing.Point(12, 14) + Me.lblWochenkarte.Location = New System.Drawing.Point(18, 14) Me.lblWochenkarte.Name = "lblWochenkarte" Me.lblWochenkarte.Size = New System.Drawing.Size(34, 13) Me.lblWochenkarte.TabIndex = 1 @@ -103,6 +105,7 @@ Partial Class frmEssensbestellungen ' 'btnSave ' + Me.btnSave.Anchor = System.Windows.Forms.AnchorStyles.Bottom Me.btnSave.Location = New System.Drawing.Point(305, 484) Me.btnSave.Name = "btnSave" Me.btnSave.Size = New System.Drawing.Size(75, 23) @@ -140,7 +143,7 @@ Partial Class frmEssensbestellungen 'lblBestellungen ' Me.lblBestellungen.AutoSize = True - Me.lblBestellungen.Location = New System.Drawing.Point(9, 335) + Me.lblBestellungen.Location = New System.Drawing.Point(15, 335) Me.lblBestellungen.Name = "lblBestellungen" Me.lblBestellungen.Size = New System.Drawing.Size(100, 13) Me.lblBestellungen.TabIndex = 20 @@ -162,13 +165,14 @@ Partial Class frmEssensbestellungen Me.cbxGebauede._value = "" Me.cbxGebauede.DropDownWidth = 150 Me.cbxGebauede.FormattingEnabled = True - Me.cbxGebauede.Location = New System.Drawing.Point(580, 24) + Me.cbxGebauede.Location = New System.Drawing.Point(584, 24) Me.cbxGebauede.Name = "cbxGebauede" Me.cbxGebauede.Size = New System.Drawing.Size(95, 21) Me.cbxGebauede.TabIndex = 21 ' 'MyPanel1 ' + Me.MyPanel1.Controls.Add(Me.Button1) Me.MyPanel1.Controls.Add(Me.txtPreis) Me.MyPanel1.Controls.Add(Me.Label2) Me.MyPanel1.Controls.Add(Me.Dienstag) @@ -655,35 +659,37 @@ Partial Class frmEssensbestellungen Me.dgvBestellungen.AllowUserToAddRows = False Me.dgvBestellungen.AllowUserToDeleteRows = False Me.dgvBestellungen.AllowUserToOrderColumns = True + Me.dgvBestellungen.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.dgvBestellungen.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvBestellungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1 + DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle10.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvBestellungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle10 Me.dgvBestellungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize - DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvBestellungen.DefaultCellStyle = DataGridViewCellStyle2 - Me.dgvBestellungen.Location = New System.Drawing.Point(12, 351) + DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle11.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvBestellungen.DefaultCellStyle = DataGridViewCellStyle11 + Me.dgvBestellungen.Location = New System.Drawing.Point(16, 351) Me.dgvBestellungen.Name = "dgvBestellungen" Me.dgvBestellungen.ReadOnly = True - DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvBestellungen.RowHeadersDefaultCellStyle = DataGridViewCellStyle3 + DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle12.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvBestellungen.RowHeadersDefaultCellStyle = DataGridViewCellStyle12 Me.dgvBestellungen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect Me.dgvBestellungen.ShowEditingIcon = False Me.dgvBestellungen.Size = New System.Drawing.Size(663, 127) @@ -696,16 +702,36 @@ Partial Class frmEssensbestellungen Me.cbxMenu._value = "" Me.cbxMenu.DropDownWidth = 200 Me.cbxMenu.FormattingEnabled = True - Me.cbxMenu.Location = New System.Drawing.Point(12, 30) + Me.cbxMenu.Location = New System.Drawing.Point(15, 30) Me.cbxMenu.Name = "cbxMenu" - Me.cbxMenu.Size = New System.Drawing.Size(95, 21) + Me.cbxMenu.Size = New System.Drawing.Size(136, 21) Me.cbxMenu.TabIndex = 0 ' + 'Button1 + ' + Me.Button1.Image = Global.AVISO.My.Resources.Resources.pdf1 + Me.Button1.Location = New System.Drawing.Point(590, 147) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(61, 57) + Me.Button1.TabIndex = 20 + Me.Button1.UseVisualStyleBackColor = True + Me.Button1.Visible = False + ' + 'txtAbteilung + ' + Me.txtAbteilung.AutoSize = True + Me.txtAbteilung.Location = New System.Drawing.Point(581, 9) + Me.txtAbteilung.Name = "txtAbteilung" + Me.txtAbteilung.Size = New System.Drawing.Size(29, 13) + Me.txtAbteilung.TabIndex = 23 + Me.txtAbteilung.Text = "EDV" + ' 'frmEssensbestellungen ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(687, 518) + Me.Controls.Add(Me.txtAbteilung) Me.Controls.Add(Me.lblBestellungBis) Me.Controls.Add(Me.cbxGebauede) Me.Controls.Add(Me.lblBestellungen) @@ -794,4 +820,6 @@ Partial Class frmEssensbestellungen Friend WithEvents Label2 As Label Friend WithEvents cbxGebauede As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents lblBestellungBis As Label + Friend WithEvents Button1 As Button + Friend WithEvents txtAbteilung As Label End Class diff --git a/Aviso/frmEssensbestellungen.vb b/Aviso/frmEssensbestellungen.vb index 3419059..a0101ef 100644 --- a/Aviso/frmEssensbestellungen.vb +++ b/Aviso/frmEssensbestellungen.vb @@ -1,4 +1,5 @@  +Imports Therefore.API Imports VERAG_PROG_ALLGEMEIN Public Class frmEssensbestellungen @@ -11,10 +12,9 @@ Public Class frmEssensbestellungen Private Sub frmEssensbestellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load - cbxMenu.fillWithSQL("SELECT Distinct (MenuDateVon), MenuTitel from tblEBMenu where MenuDateVon >= GETDATE() order by MenuDateVon desc", True, "AVISO", True) + cbxMenu.fillWithSQL("SELECT Distinct Top 10 (MenuTitel), MenuDateVon from tblEBMenu order by MenuDateVon desc", True, "AVISO", True) '/ where MenuDateVon >= GETDATE() - lblGebaeude.Text = "Gebäude: " - lblAbteilung.Text = "Abteilung: " & VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG + txtAbteilung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG loadDGVBestellungen() cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Frontoffice", "Frontoffice")) @@ -23,6 +23,7 @@ Public Class frmEssensbestellungen cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Maut", "Maut")) cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", "")) cbxGebauede.changeItem("") + btnSave.Enabled = False End Sub @@ -105,9 +106,17 @@ Public Class frmEssensbestellungen Private Sub cbxMenu_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxMenu.SelectedValueChanged + If cbxMenu._value Is Nothing Or cbxMenu._value = "" Then + Button1.Visible = False + loadDGVBestellungen() + btnSave.Enabled = False + Exit Sub + End If + btnSave.Enabled = True + 'Button1.Visible = True dt.Clear() - dt = SQL.loadDgvBySql("SELECT * FROM tblEBMenu where [MenuDateVon] = '" & cbxMenu._value & "'", "AVISO", 100, True) + dt = SQL.loadDgvBySql("SELECT Top 1 * FROM tblEBMenu where [MenuTitel] = '" & cbxMenu._value & "' order by MenuDateVon desc", "AVISO", 100, True) If dt.Rows.Count > 0 Then If checkIfOrderIsPossible() Then @@ -234,19 +243,20 @@ Public Class frmEssensbestellungen .Columns("eb_mitid").Visible = False .Columns("eb_gebaeude").Visible = False .Columns("eb_abteilung").Visible = False - .Columns("eb_montag").Width = 100 + .Columns("eb_montag").Width = 80 .Columns("eb_montag").HeaderText = "Montag" - .Columns("eb_montag").Width = 100 + .Columns("eb_montag").Width = 80 .Columns("eb_dienstag").HeaderText = "Dienstag" - .Columns("eb_dienstag").Width = 100 + .Columns("eb_dienstag").Width = 80 .Columns("eb_mittwoch").HeaderText = "Mittwoch" - .Columns("eb_mittwoch").Width = 100 + .Columns("eb_mittwoch").Width = 80 .Columns("eb_donnerstag").HeaderText = "Donnerstag" - .Columns("eb_donnerstag").Width = 100 + .Columns("eb_donnerstag").Width = 80 .Columns("eb_freitag").HeaderText = "Freitag" - .Columns("eb_freitag").Width = 100 + .Columns("eb_freitag").Width = 80 .Columns("eb_preis").HeaderText = "Preis" .Columns("eb_preis").Width = 40 + .Columns("eb_preis").DefaultCellStyle.Format = "N" End With End Sub @@ -410,6 +420,9 @@ Public Class frmEssensbestellungen End If + cbxGebauede._value = currentEssen.eb_gebaeude + + End Sub Private Function checkIfOrderIsPossible() As Boolean @@ -443,4 +456,8 @@ Public Class frmEssensbestellungen Private Sub rbMenu_Mo_Click(sender As Object, e As EventArgs) Handles rbMenu_Mo.Click, rbMenu_Di.Click, rbMenu_Mi.Click, rbMenu_Do.Click, rbMenu_Fr.Click countChecks() End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + 'Process.Start("\\YM5T001348\Gastro\FTPUpload\Menues\" & cbxMenu._value & ".pdf") + End Sub End Class \ No newline at end of file diff --git a/Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb b/Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb index 6dc595f..4a61bd6 100644 --- a/Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb +++ b/Aviso/frmGesamtsicherheitenMenuNEU.Designer.vb @@ -81,7 +81,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.dgvListe.Location = New System.Drawing.Point(-3, 288) Me.dgvListe.Name = "dgvListe" Me.dgvListe.ReadOnly = True - Me.dgvListe.Size = New System.Drawing.Size(606, 427) + Me.dgvListe.Size = New System.Drawing.Size(658, 427) Me.dgvListe.TabIndex = 1 ' 'ContextMenuStrip1 @@ -143,7 +143,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top Me.Panel1.Location = New System.Drawing.Point(0, 0) Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(606, 288) + Me.Panel1.Size = New System.Drawing.Size(658, 288) Me.Panel1.TabIndex = 0 ' 'btnOpenOver85Days @@ -458,7 +458,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.FlatButton2.FlatAppearance.BorderSize = 0 Me.FlatButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.FlatButton2.ForeColor = System.Drawing.Color.Black - Me.FlatButton2.Location = New System.Drawing.Point(513, 220) + Me.FlatButton2.Location = New System.Drawing.Point(565, 220) Me.FlatButton2.Name = "FlatButton2" Me.FlatButton2.Size = New System.Drawing.Size(81, 20) Me.FlatButton2.TabIndex = 30 @@ -496,7 +496,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.txtbis._WaehrungZeichen = True Me.txtbis.Anchor = System.Windows.Forms.AnchorStyles.Right Me.txtbis.ForeColor = System.Drawing.Color.Black - Me.txtbis.Location = New System.Drawing.Point(513, 196) + Me.txtbis.Location = New System.Drawing.Point(565, 196) Me.txtbis.MaxLineLength = -1 Me.txtbis.MaxLines_Warning = "" Me.txtbis.MaxLines_Warning_Label = Nothing @@ -522,7 +522,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.txtVon._WaehrungZeichen = True Me.txtVon.Anchor = System.Windows.Forms.AnchorStyles.Right Me.txtVon.ForeColor = System.Drawing.Color.Black - Me.txtVon.Location = New System.Drawing.Point(510, 153) + Me.txtVon.Location = New System.Drawing.Point(562, 153) Me.txtVon.MaxLineLength = -1 Me.txtVon.MaxLines_Warning = "" Me.txtVon.MaxLines_Warning_Label = Nothing @@ -538,7 +538,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.Label3.AutoSize = True Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.Label3.ForeColor = System.Drawing.Color.Honeydew - Me.Label3.Location = New System.Drawing.Point(510, 177) + Me.Label3.Location = New System.Drawing.Point(562, 177) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(24, 15) Me.Label3.TabIndex = 22 @@ -551,7 +551,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.Label2.AutoSize = True Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!) Me.Label2.ForeColor = System.Drawing.Color.Honeydew - Me.Label2.Location = New System.Drawing.Point(510, 134) + Me.Label2.Location = New System.Drawing.Point(562, 134) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(28, 15) Me.Label2.TabIndex = 10 @@ -611,7 +611,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.btnNeu.FlatAppearance.BorderSize = 0 Me.btnNeu.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnNeu.ForeColor = System.Drawing.Color.Black - Me.btnNeu.Location = New System.Drawing.Point(519, 253) + Me.btnNeu.Location = New System.Drawing.Point(571, 253) Me.btnNeu.Name = "btnNeu" Me.btnNeu.Size = New System.Drawing.Size(75, 23) Me.btnNeu.TabIndex = 34 @@ -624,7 +624,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.lblSaldo.AutoSize = True Me.lblSaldo.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblSaldo.ForeColor = System.Drawing.Color.Red - Me.lblSaldo.Location = New System.Drawing.Point(398, 11) + Me.lblSaldo.Location = New System.Drawing.Point(450, 11) Me.lblSaldo.Name = "lblSaldo" Me.lblSaldo.Size = New System.Drawing.Size(82, 24) Me.lblSaldo.TabIndex = 1 @@ -636,7 +636,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.lblZollsatz.AutoSize = True Me.lblZollsatz.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblZollsatz.ForeColor = System.Drawing.Color.Honeydew - Me.lblZollsatz.Location = New System.Drawing.Point(399, 116) + Me.lblZollsatz.Location = New System.Drawing.Point(451, 116) Me.lblZollsatz.Name = "lblZollsatz" Me.lblZollsatz.Size = New System.Drawing.Size(63, 16) Me.lblZollsatz.TabIndex = 9 @@ -648,7 +648,7 @@ Partial Class frmGesamtsicherheitenMenuNEU Me.lblReferenzwert.AutoSize = True Me.lblReferenzwert.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblReferenzwert.ForeColor = System.Drawing.Color.Honeydew - Me.lblReferenzwert.Location = New System.Drawing.Point(399, 89) + Me.lblReferenzwert.Location = New System.Drawing.Point(451, 89) Me.lblReferenzwert.Name = "lblReferenzwert" Me.lblReferenzwert.Size = New System.Drawing.Size(95, 16) Me.lblReferenzwert.TabIndex = 6 @@ -658,7 +658,7 @@ Partial Class frmGesamtsicherheitenMenuNEU ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(606, 721) + Me.ClientSize = New System.Drawing.Size(658, 721) Me.Controls.Add(Me.dgvListe) Me.Controls.Add(Me.Panel1) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) diff --git a/Aviso/frmGesamtsicherheitenMenuNEU.vb b/Aviso/frmGesamtsicherheitenMenuNEU.vb index a48b344..878fd20 100644 --- a/Aviso/frmGesamtsicherheitenMenuNEU.vb +++ b/Aviso/frmGesamtsicherheitenMenuNEU.vb @@ -53,7 +53,7 @@ Public Class frmGesamtsicherheitenMenuNEU If cbxWarenort._value <> "" Then sqladdon &= " AND gs_warenort = '" & cbxWarenort._value.ToString & "'" Dim sqlstring As String = - " select * from (Select gs_gsnr as gs_gsnr, MIN(gs_standort) as gs_standort, MIN(gs_warenort) as gs_warenort, MIN(gs_filialenNr) as gs_filialenNr, min(gs_abfertigungsNr) as gs_abfertigungsNr, + " select * from (Select gs_gsnr as gs_gsnr, MIN(gs_standort) as gs_standort, MIN(gs_warenort) as gs_warenort, MIN(gs_filialenNr) as gs_filialenNr, min(gs_abfertigungsNr) as gs_abfertigungsNr, MIN(gs_avisoId) as gs_avisoId, max(gs_LKWKZ) as gs_LKWKZ, min (gs_datum) as gs_datum, FORMAT( (Select SUM( Case when gs_art = 'Open' then (gs_sicherheitsbetrag * -1) @@ -70,6 +70,7 @@ Public Class frmGesamtsicherheitenMenuNEU From (select * from (select gs_gsnr as ding from [tblGesamtsicherheit] where gs_freitext like '%" & txtSuchbegriff.Text & "%' OR gs_abfertigungsNr like '%" & txtSuchbegriff.Text & "%' OR + gs_avisoId like '%" & txtSuchbegriff.Text & "%' OR gs_ATBNr like '%" & txtSuchbegriff.Text & "%' OR gs_LKWKZ like '%" & txtSuchbegriff.Text & "%' OR gs_warenort like '%" & txtSuchbegriff.Text & "%' @@ -97,6 +98,8 @@ Public Class frmGesamtsicherheitenMenuNEU .Columns("gs_SicherheitsSaldo").HeaderText = "Sicherheitssaldo" .Columns("gs_Warenort").Width = 96 .Columns("gs_Warenort").HeaderText = "Warenort" + .Columns("gs_avisoId").Width = 96 + .Columns("gs_avisoId").HeaderText = "LKW-ID" .Columns("gs_LKWKZ").HeaderText = "LKW-KZ" End With @@ -163,6 +166,7 @@ Public Class frmGesamtsicherheitenMenuNEU .FilialNummer = dgvListe.CurrentRow.Cells("gs_filialenNr").Value .Abfertigungsnummer = dgvListe.CurrentRow.Cells("gs_abfertigungsNr").Value .warenortID = dgvListe.CurrentRow.Cells("gs_warenort").Value + .avisoID = dgvListe.CurrentRow.Cells("gs_avisoId").Value .dataTable = Me.dataTable End With diff --git a/Aviso/frmGesamtsicherheitenNEU.Designer.vb b/Aviso/frmGesamtsicherheitenNEU.Designer.vb index 0f5aac4..67e6ec5 100644 --- a/Aviso/frmGesamtsicherheitenNEU.Designer.vb +++ b/Aviso/frmGesamtsicherheitenNEU.Designer.vb @@ -51,7 +51,7 @@ Partial Class frmGesamtsicherheitenNEU Me.lblWarenort = New System.Windows.Forms.Label() Me.cboFiliale = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.btnSave = New VERAG_PROG_ALLGEMEIN.FlatButton() - Me.txtLKWID = New System.Windows.Forms.TextBox() + Me.txtLKWKZ = New System.Windows.Forms.TextBox() Me.txtAbfertNum = New System.Windows.Forms.TextBox() Me.Label18 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label() @@ -327,7 +327,7 @@ Partial Class frmGesamtsicherheitenNEU Me.panOverlay.Controls.Add(Me.lblWarenort) Me.panOverlay.Controls.Add(Me.cboFiliale) Me.panOverlay.Controls.Add(Me.btnSave) - Me.panOverlay.Controls.Add(Me.txtLKWID) + Me.panOverlay.Controls.Add(Me.txtLKWKZ) Me.panOverlay.Controls.Add(Me.txtAbfertNum) Me.panOverlay.Controls.Add(Me.Label18) Me.panOverlay.Controls.Add(Me.Label17) @@ -426,14 +426,14 @@ Partial Class frmGesamtsicherheitenNEU Me.btnSave.Text = "Speichern" Me.btnSave.UseVisualStyleBackColor = False ' - 'txtLKWID + 'txtLKWKZ ' - Me.txtLKWID.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.txtLKWID.Location = New System.Drawing.Point(279, 216) - Me.txtLKWID.Margin = New System.Windows.Forms.Padding(0) - Me.txtLKWID.Name = "txtLKWID" - Me.txtLKWID.Size = New System.Drawing.Size(186, 24) - Me.txtLKWID.TabIndex = 8 + Me.txtLKWKZ.Font = New System.Drawing.Font("Microsoft Sans Serif", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.txtLKWKZ.Location = New System.Drawing.Point(279, 216) + Me.txtLKWKZ.Margin = New System.Windows.Forms.Padding(0) + Me.txtLKWKZ.Name = "txtLKWKZ" + Me.txtLKWKZ.Size = New System.Drawing.Size(186, 24) + Me.txtLKWKZ.TabIndex = 8 ' 'txtAbfertNum ' @@ -1554,7 +1554,7 @@ Partial Class frmGesamtsicherheitenNEU Friend WithEvents txtAnzahlPos As TextBox Friend WithEvents panOverlay As Panel Friend WithEvents btnSave As VERAG_PROG_ALLGEMEIN.FlatButton - Friend WithEvents txtLKWID As TextBox + Friend WithEvents txtLKWKZ As TextBox Friend WithEvents txtAbfertNum As TextBox Friend WithEvents Label18 As Label Friend WithEvents Label17 As Label diff --git a/Aviso/frmGesamtsicherheitenNEU.vb b/Aviso/frmGesamtsicherheitenNEU.vb index cc90253..e6c066c 100644 --- a/Aviso/frmGesamtsicherheitenNEU.vb +++ b/Aviso/frmGesamtsicherheitenNEU.vb @@ -320,8 +320,8 @@ Public Class frmGesamtsicherheitenNEU Me.warenortID = setNullToZero(dt.Rows(0).Item("gs_warenort")) End If - If Me.avisoID.ToString.Length > 0 Then lblGestellungNr.Text &= "Aviso-ID: " & Me.avisoID & " " - If Me.LKWKZ.ToString.Length > 0 Then lblGestellungNr.Text &= "LKW-ID: " & Me.LKWKZ & " " + If Me.avisoID.ToString.Length > 0 Then lblGestellungNr.Text &= "LKW-ID: " & Me.avisoID & " " + If Me.LKWKZ.ToString.Length > 0 Then lblGestellungNr.Text &= "LKW-KZ: " & Me.LKWKZ & " " If Me.FilialNummer.ToString.Length > 0 Then lblGestellungNr.Text &= "FilialNr: " & Me.FilialNummer & " " If Me.Abfertigungsnummer.Length > 0 Then lblGestellungNr.Text &= "AbfNr: " & Me.Abfertigungsnummer & " " If Me.warenortID.Length > 0 Then lblGestellungNr.Text &= "Warenort: " & Me.warenortID & " " @@ -505,8 +505,7 @@ Public Class frmGesamtsicherheitenNEU .gsp_filialenNr = OPEN.gs_filialenNr .gsp_art = "OPEN" .gsp_abfertigungsNr = OPEN.gs_abfertigungsnr - .gsp_erstellungsdatum = Me.datum - .gsp_avisoId = "" + .gsp_erstellungsdatum = DateTimeString2DateTimeKonvertinator(txtSicherheitDate.Text, txtSicherheitTime.Text) .gsp_ust = "" .gsp_avisoId = Me.avisoID '.gsp_ATCNr = "" @@ -671,10 +670,14 @@ Public Class frmGesamtsicherheitenNEU End Try Me.Abfertigungsnummer = txtAbfertNum.Text - Me.LKWKZ = txtLKWID.Text + Me.LKWKZ = txtLKWKZ.Text + If txtlkwIdSearch.Text IsNot "" Then + Me.avisoID = CInt(txtlkwIdSearch.Text) + End If + If setNullToZero(Me.gessicherheitID) > 0 Then - Dim sqlstring = "Update [tblGesamtsicherheit] set [gs_filialenNr] = '" & Me.FilialNummer & "', [gs_abfertigungsNr] = '" & Me.Abfertigungsnummer & "', [gs_LKWKZ] = '" & Me.LKWKZ & "', [gs_warenort] = '" & Me.warenortID & "' WHERE [gs_gsNr] = '" & Me.gessicherheitID & "' " + Dim sqlstring = "Update [tblGesamtsicherheit] set [gs_filialenNr] = '" & Me.FilialNummer & "', [gs_abfertigungsNr] = '" & Me.Abfertigungsnummer & "', [gs_avisoId] = '" & Me.avisoID & "',[gs_LKWKZ] = '" & Me.LKWKZ & "', [gs_warenort] = '" & Me.warenortID & "' WHERE [gs_gsNr] = '" & Me.gessicherheitID & "' " SQL.doSQL(sqlstring, "AVISO") btnAddPos.Visible = True LoadDGVSicherheiten() @@ -721,8 +724,8 @@ Public Class frmGesamtsicherheitenNEU txtSicherheitWarenwert.Text = Sicherh.gs_warenwert txtSicherheitFreitext.Text = Sicherh.gs_freitext cboSicherheitATR.SelectedItem = Sicherh.gs_atr - txtSicherheitDate.Text = Sicherh.gs_erstellungsdatum.ToString("dd.MM.yyyy") - txtSicherheitTime.Text = Sicherh.gs_erstellungsdatum.ToString("HH:mm") + txtSicherheitDate.Text = Sicherh.gs_datum.ToString("dd.MM.yyyy") + txtSicherheitTime.Text = Sicherh.gs_datum.ToString("HH:mm") currentSicherheit = Sicherh txtAnzahlPos.Enabled = False @@ -772,6 +775,7 @@ Public Class frmGesamtsicherheitenNEU .gsp_sicherheitsbetrag = Double.Parse(txtPosSicherheitsbetrag.Text) .gsp_warenwert = Double.Parse(txtPosWarenwert.Text) .gsp_ATCNr = If(txtPositionenCRN.Text <> "", txtPositionenCRN.Text, Nothing) + .gsp_erstellungsdatum = DateTimeString2DateTimeKonvertinator(txtPosDate.Text, txtPosTime.Text) End With If checkSicherheitsbetrag() = False Then Exit Sub @@ -837,8 +841,10 @@ Public Class frmGesamtsicherheitenNEU cboFiliale.SelectedIndex = cboFiliale.FindString(Me.FilialNummer) cboWarenort.fillWithSQL("SELECT [wo_warenort],CONCAT([wo_knnr],' - ' ,[wo_bezeichnung]) FROM [tblWarenorte] WHERE [wo_aktiv] ='1' ORDER BY [wo_reihenfolge] ", True, "AVISO", True) cboWarenort.SelectedIndex = cbx_Suche_Warenort.FindString(Me.warenortID) + txtlkwIdSearch.initSearchBox(Me.FindForm, " LKW_Nr, AvisoID, CAST(Datum as Date) as Datum FROM [Aviso]", {"LKW_Nr", "AvisoID", "Datum"}, "", "Datum desc", "LKW_Nr", "AvisoID", "AVISO",, 250, 200) + txtlkwIdSearch.Text = Me.avisoID txtAbfertNum.Text = Me.Abfertigungsnummer - txtLKWID.Text = Me.LKWKZ + txtLKWKZ.Text = Me.LKWKZ panOben.Enabled = False End Sub @@ -1287,11 +1293,11 @@ Public Class frmGesamtsicherheitenNEU Private Sub txtlkwIdSearch_VALUE_CHANGED() Handles txtlkwIdSearch.VALUE_CHANGED If (txtlkwIdSearch._value <> "") Then - txtLKWID.Text = txtlkwIdSearch._value - txtLKWID.ReadOnly = True + txtLKWKZ.Text = txtlkwIdSearch._value + txtLKWKZ.ReadOnly = True Else - txtLKWID.Clear() - txtLKWID.ReadOnly = False + txtLKWKZ.Clear() + txtLKWKZ.ReadOnly = False End If End Sub