From ffd45e15a70c8dcd2e90bd8b7b9eea41e274ddda Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 20 Jun 2024 10:39:02 +0200 Subject: [PATCH 1/2] Essensbestellungen --- SDL/UsrCntlEssensbestellungen.Designer.vb | 34 +++++++++++++++++++---- SDL/UsrCntlEssensbestellungen.vb | 27 +++++++++++++++++- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/SDL/UsrCntlEssensbestellungen.Designer.vb b/SDL/UsrCntlEssensbestellungen.Designer.vb index 44128f19..e13fd6eb 100644 --- a/SDL/UsrCntlEssensbestellungen.Designer.vb +++ b/SDL/UsrCntlEssensbestellungen.Designer.vb @@ -76,6 +76,8 @@ Partial Class UsrCntlessensbestellungen Me.cbxMenu = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxAbteilung = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.Label5 = New System.Windows.Forms.Label() + Me.txtAnzahlKeb = New System.Windows.Forms.Label() + Me.Label6 = New System.Windows.Forms.Label() Me.MyPanel1.SuspendLayout() Me.GroupBoxDienstag.SuspendLayout() Me.GroupBoxMontag.SuspendLayout() @@ -86,6 +88,8 @@ Partial Class UsrCntlessensbestellungen ' 'MyPanel1 ' + Me.MyPanel1.Controls.Add(Me.txtAnzahlKeb) + Me.MyPanel1.Controls.Add(Me.Label6) Me.MyPanel1.Controls.Add(Me.lblWarning) Me.MyPanel1.Controls.Add(Me.txtPreis) Me.MyPanel1.Controls.Add(Me.Label2) @@ -115,7 +119,7 @@ Partial Class UsrCntlessensbestellungen 'txtPreis ' Me.txtPreis.AutoSize = True - Me.txtPreis.Location = New System.Drawing.Point(553, 188) + Me.txtPreis.Location = New System.Drawing.Point(580, 200) Me.txtPreis.Name = "txtPreis" Me.txtPreis.Size = New System.Drawing.Size(13, 13) Me.txtPreis.TabIndex = 19 @@ -124,7 +128,7 @@ Partial Class UsrCntlessensbestellungen 'Label2 ' Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(463, 188) + Me.Label2.Location = New System.Drawing.Point(463, 200) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(68, 13) Me.Label2.TabIndex = 18 @@ -382,7 +386,7 @@ Partial Class UsrCntlessensbestellungen 'txtAnzahlLaCart ' Me.txtAnzahlLaCart.AutoSize = True - Me.txtAnzahlLaCart.Location = New System.Drawing.Point(553, 162) + Me.txtAnzahlLaCart.Location = New System.Drawing.Point(580, 174) Me.txtAnzahlLaCart.Name = "txtAnzahlLaCart" Me.txtAnzahlLaCart.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlLaCart.TabIndex = 17 @@ -391,7 +395,7 @@ Partial Class UsrCntlessensbestellungen 'lbl2 ' Me.lbl2.AutoSize = True - Me.lbl2.Location = New System.Drawing.Point(463, 162) + Me.lbl2.Location = New System.Drawing.Point(465, 174) Me.lbl2.Name = "lbl2" Me.lbl2.Size = New System.Drawing.Size(90, 13) Me.lbl2.TabIndex = 15 @@ -560,7 +564,7 @@ Partial Class UsrCntlessensbestellungen 'txtAnzahlMenu ' Me.txtAnzahlMenu.AutoSize = True - Me.txtAnzahlMenu.Location = New System.Drawing.Point(553, 137) + Me.txtAnzahlMenu.Location = New System.Drawing.Point(580, 135) Me.txtAnzahlMenu.Name = "txtAnzahlMenu" Me.txtAnzahlMenu.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlMenu.TabIndex = 16 @@ -719,6 +723,24 @@ Partial Class UsrCntlessensbestellungen Me.Label5.TabIndex = 39 Me.Label5.Text = "Abteilung:" ' + 'txtAnzahlKeb + ' + Me.txtAnzahlKeb.AutoSize = True + Me.txtAnzahlKeb.Location = New System.Drawing.Point(580, 154) + Me.txtAnzahlKeb.Name = "txtAnzahlKeb" + Me.txtAnzahlKeb.Size = New System.Drawing.Size(13, 13) + Me.txtAnzahlKeb.TabIndex = 35 + Me.txtAnzahlKeb.Text = "0" + ' + 'Label6 + ' + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(463, 154) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(112, 13) + Me.Label6.TabIndex = 34 + Me.Label6.Text = "Anzahl Kebap/Dürüm:" + ' 'UsrCntlessensbestellungen ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -810,4 +832,6 @@ Partial Class UsrCntlessensbestellungen Friend WithEvents cbxMenu As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cbxAbteilung As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents Label5 As Label + Friend WithEvents txtAnzahlKeb As Label + Friend WithEvents Label6 As Label End Class diff --git a/SDL/UsrCntlEssensbestellungen.vb b/SDL/UsrCntlEssensbestellungen.vb index 4d98508b..a0866451 100644 --- a/SDL/UsrCntlEssensbestellungen.vb +++ b/SDL/UsrCntlEssensbestellungen.vb @@ -202,10 +202,15 @@ Public Class UsrCntlessensbestellungen Private Sub countChecks() + Dim countMenus As Integer Dim countlaCarte As Integer + Dim countKebab As Integer + countMenus = 0 countlaCarte = 0 + countKebab = 0 + For Each gb As Control In MyPanel1.Controls If TypeOf gb Is GroupBox Then For Each c As Control In gb.Controls @@ -218,6 +223,16 @@ Public Class UsrCntlessensbestellungen If c.Text.ToLower.StartsWith(alacarte.ToLower) AndAlso TypeOf c Is VERAG_PROG_ALLGEMEIN.MyRadioButton AndAlso (c.Enabled = True Or outdated = True And MyPanel1.Enabled = False) Then Dim rb As VERAG_PROG_ALLGEMEIN.MyRadioButton = c If rb.Checked Then countlaCarte = countlaCarte + 1 + + End If + + If TypeOf c Is VERAG_PROG_ALLGEMEIN.MyComboBox AndAlso (c.Enabled = True Or outdated = True And MyPanel1.Enabled = False) Then + Dim cbx As VERAG_PROG_ALLGEMEIN.MyComboBox = c + If cbx.Visible = True AndAlso cbx.SelectedItem IsNot Nothing Then + + countKebab = countKebab + 1 + countlaCarte = countlaCarte - 1 + End If End If Next End If @@ -225,7 +240,17 @@ Public Class UsrCntlessensbestellungen txtAnzahlMenu.Text = countMenus.ToString() txtAnzahlLaCart.Text = countlaCarte.ToString - txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus)) * preisProMahlzeit + txtAnzahlKeb.Text = countKebab.ToString + + If CDate(dt.Rows(0).Item("MenuDateVon")).ToString("dd.MM.yyyy") >= DateTime.Parse("01/06/2024") Then + + txtPreis.Text = (CDbl(countKebab) + CDbl(countMenus)) * 3 + CDbl(countlaCarte) * 5 + Else + + txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus) + CDbl(countKebab)) * preisProMahlzeit + End If + + 'IIf(bestellung.eb_storniert, preisProMahlzeit * 0, preisProMahlzeit * 1) End Sub From 93fcc43346aec201695ccf59072225b01043ebb0 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Thu, 20 Jun 2024 13:30:06 +0200 Subject: [PATCH 2/2] Mitarbeiter-Logik, Abrechnung AMBAR --- SDL/Fakturierung/frmFaktSammelRgDrucken.vb | 5 +- .../frmMitarbeitersuche.Designer.vb | 87 +++++++++--------- .../frmMitarbeitersuche.vb | 89 ++++++++++--------- 3 files changed, 96 insertions(+), 85 deletions(-) diff --git a/SDL/Fakturierung/frmFaktSammelRgDrucken.vb b/SDL/Fakturierung/frmFaktSammelRgDrucken.vb index a90f9d6d..551be32d 100644 --- a/SDL/Fakturierung/frmFaktSammelRgDrucken.vb +++ b/SDL/Fakturierung/frmFaktSammelRgDrucken.vb @@ -101,7 +101,8 @@ Public Class frmFaktSammelRgDrucken FirmaTmp = "VERAGIMEX" End If - FirmaTmp = "AMBAR" + Label5.Visible = True + cboFaktGrp.Visible = True Select Case FirmaTmp Case "VERAG" @@ -127,6 +128,8 @@ Public Class frmFaktSammelRgDrucken cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE FIRMENGRUPPE IN ('AMBAR') ", False, "FMZOLL") cboFirma.changeItem("24") cboSB.fillWithSQL("SELECT [mit_username] FROM [tblMitarbeiter] where mit_firma='AMBAR' and mit_gekuendigt=0 AND (mit_abteilung IN ('VRR','BH') OR (SELECT COUNT(*) FROM [tblBerechtigungsObjekteZuordnung] where [beroz_beroId]=90 AND [beroz_bergrId]=[mit_id] AND beroz_art='B')>0) order by mit_username", False, "ADMIN", True) + Label5.Visible = False + cboFaktGrp.Visible = False End Select ' cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) ORDER BY Firma_ID ", True, "FMZOLL") cboFirma.changeItem(Firma) diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb index ba0df4b4..bfd5dea4 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.Designer.vb @@ -28,7 +28,6 @@ Partial Class frmMitarbeitersuche Me.Button4 = New System.Windows.Forms.Button() Me.btnClose = New System.Windows.Forms.Button() Me.PictureBox2 = New System.Windows.Forms.PictureBox() - Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox() Me.pnlMain = New System.Windows.Forms.Panel() Me.pnl = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() @@ -60,7 +59,7 @@ Partial Class frmMitarbeitersuche Me.pnlMotto = New System.Windows.Forms.Panel() Me.lblMotto = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() - Me.btn = New System.Windows.Forms.Button() + Me.btnEdit = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.picGeschlecht = New System.Windows.Forms.PictureBox() Me.Label10 = New System.Windows.Forms.Label() @@ -83,6 +82,7 @@ Partial Class frmMitarbeitersuche Me.lblFirma = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() + Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox() Me.pnlSrch.SuspendLayout() CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() Me.pnlMain.SuspendLayout() @@ -155,32 +155,6 @@ Partial Class frmMitarbeitersuche Me.PictureBox2.TabIndex = 18 Me.PictureBox2.TabStop = False ' - 'sbMitarbeiter - ' - Me.sbMitarbeiter._allowFreitext = False - Me.sbMitarbeiter._AllowSetValue = False - Me.sbMitarbeiter._allowSpaceAsSplitter = True - Me.sbMitarbeiter._autoSizeGross = False - Me.sbMitarbeiter._hideIfListEmpty = True - Me.sbMitarbeiter._value = Nothing - Me.sbMitarbeiter.conn_art = "FMZOLL" - Me.sbMitarbeiter.dgvpos = "LEFT" - Me.sbMitarbeiter.DISPLAY_PARAM = Nothing - Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!) - Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing - Me.sbMitarbeiter.key_visible = False - Me.sbMitarbeiter.KEYPARAM = Nothing - Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11) - Me.sbMitarbeiter.Name = "sbMitarbeiter" - Me.sbMitarbeiter.searchActive = True - Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29) - Me.sbMitarbeiter.SQL_ORDER_BY = Nothing - Me.sbMitarbeiter.SQL_SELECT = Nothing - Me.sbMitarbeiter.SQL_WHERE = Nothing - Me.sbMitarbeiter.SQL_WhereParamList = Nothing - Me.sbMitarbeiter.TabIndex = 0 - Me.sbMitarbeiter.usrcntl = Nothing - ' 'pnlMain ' Me.pnlMain.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink @@ -209,7 +183,7 @@ Partial Class frmMitarbeitersuche Me.pnl.Controls.Add(Me.Panel3) Me.pnl.Controls.Add(Me.PictureBox3) Me.pnl.Controls.Add(Me.pnlMotto) - Me.pnl.Controls.Add(Me.btn) + Me.pnl.Controls.Add(Me.btnEdit) Me.pnl.Controls.Add(Me.Label1) Me.pnl.Controls.Add(Me.picGeschlecht) Me.pnl.Controls.Add(Me.Label10) @@ -297,6 +271,7 @@ Partial Class frmMitarbeitersuche Me.pnlZeiten.Name = "pnlZeiten" Me.pnlZeiten.Size = New System.Drawing.Size(624, 66) Me.pnlZeiten.TabIndex = 22 + Me.pnlZeiten.Visible = False ' 'btnAkten ' @@ -565,20 +540,20 @@ Partial Class frmMitarbeitersuche Me.Label7.TabIndex = 10 Me.Label7.Text = "Motto:" ' - 'btn + 'btnEdit ' - Me.btn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom - Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.btn.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift - Me.btn.ImageAlign = System.Drawing.ContentAlignment.TopCenter - Me.btn.Location = New System.Drawing.Point(702, 9) - Me.btn.Name = "btn" - Me.btn.Size = New System.Drawing.Size(70, 58) - Me.btn.TabIndex = 9 - Me.btn.Text = "Bearbeiten" - Me.btn.TextAlign = System.Drawing.ContentAlignment.BottomCenter - Me.btn.UseVisualStyleBackColor = True - Me.btn.Visible = False + Me.btnEdit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnEdit.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift + Me.btnEdit.ImageAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnEdit.Location = New System.Drawing.Point(702, 9) + Me.btnEdit.Name = "btnEdit" + Me.btnEdit.Size = New System.Drawing.Size(70, 58) + Me.btnEdit.TabIndex = 9 + Me.btnEdit.Text = "Bearbeiten" + Me.btnEdit.TextAlign = System.Drawing.ContentAlignment.BottomCenter + Me.btnEdit.UseVisualStyleBackColor = True + Me.btnEdit.Visible = False ' 'Label1 ' @@ -815,6 +790,32 @@ Partial Class frmMitarbeitersuche Me.Label3.Text = "Niederlassung:" Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' + 'sbMitarbeiter + ' + Me.sbMitarbeiter._allowFreitext = False + Me.sbMitarbeiter._AllowSetValue = False + Me.sbMitarbeiter._allowSpaceAsSplitter = True + Me.sbMitarbeiter._autoSizeGross = False + Me.sbMitarbeiter._hideIfListEmpty = True + Me.sbMitarbeiter._value = Nothing + Me.sbMitarbeiter.conn_art = "FMZOLL" + Me.sbMitarbeiter.dgvpos = "LEFT" + Me.sbMitarbeiter.DISPLAY_PARAM = Nothing + Me.sbMitarbeiter.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!) + Me.sbMitarbeiter.INVISIBLE_COLUMNS = Nothing + Me.sbMitarbeiter.key_visible = False + Me.sbMitarbeiter.KEYPARAM = Nothing + Me.sbMitarbeiter.Location = New System.Drawing.Point(45, 11) + Me.sbMitarbeiter.Name = "sbMitarbeiter" + Me.sbMitarbeiter.searchActive = True + Me.sbMitarbeiter.Size = New System.Drawing.Size(582, 29) + Me.sbMitarbeiter.SQL_ORDER_BY = Nothing + Me.sbMitarbeiter.SQL_SELECT = Nothing + Me.sbMitarbeiter.SQL_WHERE = Nothing + Me.sbMitarbeiter.SQL_WhereParamList = Nothing + Me.sbMitarbeiter.TabIndex = 0 + Me.sbMitarbeiter.usrcntl = Nothing + ' 'frmMitarbeitersuche ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -855,7 +856,7 @@ Partial Class frmMitarbeitersuche Friend WithEvents pnlSrch As Windows.Forms.Panel Friend WithEvents pnlMain As Windows.Forms.Panel - Friend WithEvents btn As Windows.Forms.Button + Friend WithEvents btnEdit As Windows.Forms.Button Friend WithEvents lblAbteilung As Windows.Forms.Label Friend WithEvents lblNiederlassung As Windows.Forms.Label Friend WithEvents lblFirma As Windows.Forms.Label diff --git a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb index eec475f0..aa8d366e 100644 --- a/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb +++ b/VERAG_PROG_ALLGEMEIN/Mitarbeiterverzeichnis/frmMitarbeitersuche.vb @@ -62,11 +62,12 @@ Public Class frmMitarbeitersuche Private Sub sbMitarbeiter_PropertyChanged() Handles sbMitarbeiter.VALUE_CHANGED + requestDone = False initMA(False) End Sub Sub initMA(Optional callTimasSaldo As Boolean = True) - btn.Visible = False + btnEdit.Visible = False pnl.Visible = False 'lblTimasZeiten.Visible = False lblTimasSaldo.Visible = False @@ -166,13 +167,7 @@ Public Class frmMitarbeitersuche PictureBox3.BackgroundImage = Nothing End Select - If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then - 'pnlZeiten.Visible = True - btn.Visible = True - btnSettings.Visible = True - End If - - requestDone = Not callTimasSaldo + 'requestDone = Not callTimasSaldo initTimasData() If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then @@ -181,6 +176,11 @@ Public Class frmMitarbeitersuche pnlZeiten.Visible = False End If + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then + btnEdit.Visible = True + btnSettings.Visible = True + End If + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MA_TeamBearbeiten", "SDL") Then If MA.getFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Then 'MA derselben Firma bearbeiten btnSettings.Visible = True @@ -222,14 +222,14 @@ Public Class frmMitarbeitersuche pnlMotto.Visible = False pic.BackgroundImage = My.Resources.personGray_m picGeschlecht.Visible = False - 'pnlZeiten.Visible = False + pnlZeiten.Visible = False End Sub Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click Me.Close() End Sub - Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click + Private Sub btn_Click(sender As Object, e As EventArgs) Handles btnEdit.Click If sbMitarbeiter._value = "" Then Exit Sub Dim f As New frmMitarbeitersucheBearbeiten(sbMitarbeiter._value) f.ShowDialog(Me) @@ -421,78 +421,85 @@ Public Class frmMitarbeitersuche 'normales kommen/gehen Dim a As MsgBoxResult = MsgBox(IIf(cbxHomeoffice.Checked, "Homeoffice", "Büro") & vbNewLine & sender.text & " für " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME & vbNewLine & Now.ToString(), vbYesNo) - If a = vbYes Then - Dim info - timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, resultCode) - MsgBox(info) - Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB - requestDone = False - initTimasData() - End If + If a = vbYes Then + Dim info + timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, resultCode) + MsgBox(info) + Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB + requestDone = False + initTimasData() End If - End If + End If + End Sub Private Sub initTimasData() - lblStatusZE.Visible = False - - btn.Visible = True + 'lblStatusZE.Visible = False + 'btnEdit.Visible = False 'Eintrag für Zeitübersicht 'lblTimasZeiten.Visible = True - lblTimasSaldo.Visible = True + + lblTimasSaldo.Visible = False + lblTimasSaldo.Text = "" + If Not requestDone Then - lblTimasSaldo.Text = "" + Dim dtZeiten As New DataTable If timas IsNot Nothing Then Dim isServiceRunning As Boolean = True - timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time") - If Not isServiceRunning Then - 'Abfrage konnte nicht durchgeführt werden. - MsgBox("Abfragefehler am Timas-Server!") - 'Exit Sub - End If - lblStatusZE.Visible = True + Dim checkEntry As Boolean = timas.getTimeEntries(MA.mit_timasId, dtZeiten,, requestDone) online = checkEntry If requestDone Then If checkEntry Then - 'PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green lblStatusZE.BackColor = Color.Green lblStatusZE.Text = "ONLINE" - btnZEGehen.Enabled = True btnZEKommen.Enabled = False btnAkten.Enabled = False Else - ' PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_red lblStatusZE.Text = "OFFLINE" lblStatusZE.BackColor = Color.Firebrick - btnZEGehen.Enabled = False btnZEKommen.Enabled = True btnAkten.Enabled = True End If Else - 'Request wurde nicht verarbeitet -> Verbindungsfehler - lblStatusZE.Text = "Serverfehler" + + If MA.mit_timasId Is Nothing Then + lblStatusZE.Text = "keine ZE" + Else + lblStatusZE.Text = "Serverfehler" + End If lblStatusZE.BackColor = Color.Gray btnZEGehen.Enabled = False btnZEKommen.Enabled = False Button2.Enabled = False btnAkten.Enabled = False + End If + If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id Then + + timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning, "time") + If Not isServiceRunning Then + MsgBox("Abfragefehler am Timas-Server!") + End If + lblStatusZE.Visible = True + lblTimasSaldo.Visible = True + + If dtZeiten.Rows.Count > 0 Then + pnlZeiten.Visible = True + Else + pnlZeiten.Visible = False + End If - If dtZeiten.Rows.Count > 0 AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id Then - pnlZeiten.Visible = True - Else - pnlZeiten.Visible = False End If End If