This commit is contained in:
2024-06-20 13:59:21 +02:00
5 changed files with 151 additions and 91 deletions

View File

@@ -101,7 +101,8 @@ Public Class frmFaktSammelRgDrucken
FirmaTmp = "VERAGIMEX" FirmaTmp = "VERAGIMEX"
End If End If
FirmaTmp = "AMBAR" Label5.Visible = True
cboFaktGrp.Visible = True
Select Case FirmaTmp Select Case FirmaTmp
Case "VERAG" 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.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE FIRMENGRUPPE IN ('AMBAR') ", False, "FMZOLL")
cboFirma.changeItem("24") 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) 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 End Select
' cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) ORDER BY Firma_ID ", True, "FMZOLL") ' cboFirma.fillWithSQL("SELECT [Firma_ID],[Firma_Bez] FROM [tblFirma] WHERE Firma_ID NOT IN(3) ORDER BY Firma_ID ", True, "FMZOLL")
cboFirma.changeItem(Firma) cboFirma.changeItem(Firma)

View File

@@ -76,6 +76,8 @@ Partial Class UsrCntlessensbestellungen
Me.cbxMenu = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxMenu = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cbxAbteilung = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.cbxAbteilung = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label5 = New System.Windows.Forms.Label() 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.MyPanel1.SuspendLayout()
Me.GroupBoxDienstag.SuspendLayout() Me.GroupBoxDienstag.SuspendLayout()
Me.GroupBoxMontag.SuspendLayout() Me.GroupBoxMontag.SuspendLayout()
@@ -86,6 +88,8 @@ Partial Class UsrCntlessensbestellungen
' '
'MyPanel1 'MyPanel1
' '
Me.MyPanel1.Controls.Add(Me.txtAnzahlKeb)
Me.MyPanel1.Controls.Add(Me.Label6)
Me.MyPanel1.Controls.Add(Me.lblWarning) Me.MyPanel1.Controls.Add(Me.lblWarning)
Me.MyPanel1.Controls.Add(Me.txtPreis) Me.MyPanel1.Controls.Add(Me.txtPreis)
Me.MyPanel1.Controls.Add(Me.Label2) Me.MyPanel1.Controls.Add(Me.Label2)
@@ -115,7 +119,7 @@ Partial Class UsrCntlessensbestellungen
'txtPreis 'txtPreis
' '
Me.txtPreis.AutoSize = True 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.Name = "txtPreis"
Me.txtPreis.Size = New System.Drawing.Size(13, 13) Me.txtPreis.Size = New System.Drawing.Size(13, 13)
Me.txtPreis.TabIndex = 19 Me.txtPreis.TabIndex = 19
@@ -124,7 +128,7 @@ Partial Class UsrCntlessensbestellungen
'Label2 'Label2
' '
Me.Label2.AutoSize = True 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.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(68, 13) Me.Label2.Size = New System.Drawing.Size(68, 13)
Me.Label2.TabIndex = 18 Me.Label2.TabIndex = 18
@@ -382,7 +386,7 @@ Partial Class UsrCntlessensbestellungen
'txtAnzahlLaCart 'txtAnzahlLaCart
' '
Me.txtAnzahlLaCart.AutoSize = True 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.Name = "txtAnzahlLaCart"
Me.txtAnzahlLaCart.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlLaCart.Size = New System.Drawing.Size(13, 13)
Me.txtAnzahlLaCart.TabIndex = 17 Me.txtAnzahlLaCart.TabIndex = 17
@@ -391,7 +395,7 @@ Partial Class UsrCntlessensbestellungen
'lbl2 'lbl2
' '
Me.lbl2.AutoSize = True 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.Name = "lbl2"
Me.lbl2.Size = New System.Drawing.Size(90, 13) Me.lbl2.Size = New System.Drawing.Size(90, 13)
Me.lbl2.TabIndex = 15 Me.lbl2.TabIndex = 15
@@ -560,7 +564,7 @@ Partial Class UsrCntlessensbestellungen
'txtAnzahlMenu 'txtAnzahlMenu
' '
Me.txtAnzahlMenu.AutoSize = True 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.Name = "txtAnzahlMenu"
Me.txtAnzahlMenu.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlMenu.Size = New System.Drawing.Size(13, 13)
Me.txtAnzahlMenu.TabIndex = 16 Me.txtAnzahlMenu.TabIndex = 16
@@ -719,6 +723,24 @@ Partial Class UsrCntlessensbestellungen
Me.Label5.TabIndex = 39 Me.Label5.TabIndex = 39
Me.Label5.Text = "Abteilung:" 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 'UsrCntlessensbestellungen
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 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 cbxMenu As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cbxAbteilung As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents cbxAbteilung As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents Label5 As Label Friend WithEvents Label5 As Label
Friend WithEvents txtAnzahlKeb As Label
Friend WithEvents Label6 As Label
End Class End Class

View File

@@ -202,10 +202,15 @@ Public Class UsrCntlessensbestellungen
Private Sub countChecks() Private Sub countChecks()
Dim countMenus As Integer Dim countMenus As Integer
Dim countlaCarte As Integer Dim countlaCarte As Integer
Dim countKebab As Integer
countMenus = 0 countMenus = 0
countlaCarte = 0 countlaCarte = 0
countKebab = 0
For Each gb As Control In MyPanel1.Controls For Each gb As Control In MyPanel1.Controls
If TypeOf gb Is GroupBox Then If TypeOf gb Is GroupBox Then
For Each c As Control In gb.Controls 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 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 Dim rb As VERAG_PROG_ALLGEMEIN.MyRadioButton = c
If rb.Checked Then countlaCarte = countlaCarte + 1 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 End If
Next Next
End If End If
@@ -225,7 +240,17 @@ Public Class UsrCntlessensbestellungen
txtAnzahlMenu.Text = countMenus.ToString() txtAnzahlMenu.Text = countMenus.ToString()
txtAnzahlLaCart.Text = countlaCarte.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 End Sub

View File

@@ -28,7 +28,6 @@ Partial Class frmMitarbeitersuche
Me.Button4 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button()
Me.btnClose = New System.Windows.Forms.Button() Me.btnClose = New System.Windows.Forms.Button()
Me.PictureBox2 = New System.Windows.Forms.PictureBox() Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.pnlMain = New System.Windows.Forms.Panel() Me.pnlMain = New System.Windows.Forms.Panel()
Me.pnl = New System.Windows.Forms.Panel() Me.pnl = New System.Windows.Forms.Panel()
Me.Button3 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button()
@@ -60,7 +59,7 @@ Partial Class frmMitarbeitersuche
Me.pnlMotto = New System.Windows.Forms.Panel() Me.pnlMotto = New System.Windows.Forms.Panel()
Me.lblMotto = New System.Windows.Forms.Label() Me.lblMotto = New System.Windows.Forms.Label()
Me.Label7 = 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.Label1 = New System.Windows.Forms.Label()
Me.picGeschlecht = New System.Windows.Forms.PictureBox() Me.picGeschlecht = New System.Windows.Forms.PictureBox()
Me.Label10 = New System.Windows.Forms.Label() Me.Label10 = New System.Windows.Forms.Label()
@@ -83,6 +82,7 @@ Partial Class frmMitarbeitersuche
Me.lblFirma = New System.Windows.Forms.Label() Me.lblFirma = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label()
Me.sbMitarbeiter = New VERAG_PROG_ALLGEMEIN.MySearchBox()
Me.pnlSrch.SuspendLayout() Me.pnlSrch.SuspendLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlMain.SuspendLayout() Me.pnlMain.SuspendLayout()
@@ -155,32 +155,6 @@ Partial Class frmMitarbeitersuche
Me.PictureBox2.TabIndex = 18 Me.PictureBox2.TabIndex = 18
Me.PictureBox2.TabStop = False 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 'pnlMain
' '
Me.pnlMain.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink 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.Panel3)
Me.pnl.Controls.Add(Me.PictureBox3) Me.pnl.Controls.Add(Me.PictureBox3)
Me.pnl.Controls.Add(Me.pnlMotto) 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.Label1)
Me.pnl.Controls.Add(Me.picGeschlecht) Me.pnl.Controls.Add(Me.picGeschlecht)
Me.pnl.Controls.Add(Me.Label10) Me.pnl.Controls.Add(Me.Label10)
@@ -297,6 +271,7 @@ Partial Class frmMitarbeitersuche
Me.pnlZeiten.Name = "pnlZeiten" Me.pnlZeiten.Name = "pnlZeiten"
Me.pnlZeiten.Size = New System.Drawing.Size(624, 66) Me.pnlZeiten.Size = New System.Drawing.Size(624, 66)
Me.pnlZeiten.TabIndex = 22 Me.pnlZeiten.TabIndex = 22
Me.pnlZeiten.Visible = False
' '
'btnAkten 'btnAkten
' '
@@ -565,20 +540,20 @@ Partial Class frmMitarbeitersuche
Me.Label7.TabIndex = 10 Me.Label7.TabIndex = 10
Me.Label7.Text = "Motto:" Me.Label7.Text = "Motto:"
' '
'btn 'btnEdit
' '
Me.btn.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom Me.btnEdit.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift Me.btnEdit.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift
Me.btn.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.btnEdit.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btn.Location = New System.Drawing.Point(702, 9) Me.btnEdit.Location = New System.Drawing.Point(702, 9)
Me.btn.Name = "btn" Me.btnEdit.Name = "btnEdit"
Me.btn.Size = New System.Drawing.Size(70, 58) Me.btnEdit.Size = New System.Drawing.Size(70, 58)
Me.btn.TabIndex = 9 Me.btnEdit.TabIndex = 9
Me.btn.Text = "Bearbeiten" Me.btnEdit.Text = "Bearbeiten"
Me.btn.TextAlign = System.Drawing.ContentAlignment.BottomCenter Me.btnEdit.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btn.UseVisualStyleBackColor = True Me.btnEdit.UseVisualStyleBackColor = True
Me.btn.Visible = False Me.btnEdit.Visible = False
' '
'Label1 'Label1
' '
@@ -815,6 +790,32 @@ Partial Class frmMitarbeitersuche
Me.Label3.Text = "Niederlassung:" Me.Label3.Text = "Niederlassung:"
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft 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 'frmMitarbeitersuche
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) 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 pnlSrch As Windows.Forms.Panel
Friend WithEvents pnlMain 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 lblAbteilung As Windows.Forms.Label
Friend WithEvents lblNiederlassung As Windows.Forms.Label Friend WithEvents lblNiederlassung As Windows.Forms.Label
Friend WithEvents lblFirma As Windows.Forms.Label Friend WithEvents lblFirma As Windows.Forms.Label

View File

@@ -62,11 +62,12 @@ Public Class frmMitarbeitersuche
Private Sub sbMitarbeiter_PropertyChanged() Handles sbMitarbeiter.VALUE_CHANGED Private Sub sbMitarbeiter_PropertyChanged() Handles sbMitarbeiter.VALUE_CHANGED
requestDone = False
initMA(False) initMA(False)
End Sub End Sub
Sub initMA(Optional callTimasSaldo As Boolean = True) Sub initMA(Optional callTimasSaldo As Boolean = True)
btn.Visible = False btnEdit.Visible = False
pnl.Visible = False pnl.Visible = False
'lblTimasZeiten.Visible = False 'lblTimasZeiten.Visible = False
lblTimasSaldo.Visible = False lblTimasSaldo.Visible = False
@@ -166,13 +167,7 @@ Public Class frmMitarbeitersuche
PictureBox3.BackgroundImage = Nothing PictureBox3.BackgroundImage = Nothing
End Select End Select
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then 'requestDone = Not callTimasSaldo
'pnlZeiten.Visible = True
btn.Visible = True
btnSettings.Visible = True
End If
requestDone = Not callTimasSaldo
initTimasData() initTimasData()
If VERAG_PROG_ALLGEMEIN.cAllgemein.USRID = MA.mit_id AndAlso VERAG_PROG_ALLGEMEIN.cAllgemein.MITARBEITER.mit_timasId IsNot Nothing Then 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 pnlZeiten.Visible = False
End If 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 VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MA_TeamBearbeiten", "SDL") Then
If MA.getFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Then 'MA derselben Firma bearbeiten If MA.getFirma = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Then 'MA derselben Firma bearbeiten
btnSettings.Visible = True btnSettings.Visible = True
@@ -222,14 +222,14 @@ Public Class frmMitarbeitersuche
pnlMotto.Visible = False pnlMotto.Visible = False
pic.BackgroundImage = My.Resources.personGray_m pic.BackgroundImage = My.Resources.personGray_m
picGeschlecht.Visible = False picGeschlecht.Visible = False
'pnlZeiten.Visible = False pnlZeiten.Visible = False
End Sub End Sub
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
Me.Close() Me.Close()
End Sub 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 If sbMitarbeiter._value = "" Then Exit Sub
Dim f As New frmMitarbeitersucheBearbeiten(sbMitarbeiter._value) Dim f As New frmMitarbeitersucheBearbeiten(sbMitarbeiter._value)
f.ShowDialog(Me) f.ShowDialog(Me)
@@ -421,78 +421,85 @@ Public Class frmMitarbeitersuche
'normales kommen/gehen '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) 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 If a = vbYes Then
Dim info Dim info
timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, resultCode) timas.setTimeEntry(cAllgemein.MITARBEITER, Now, info, art, resultCode)
MsgBox(info) MsgBox(info)
Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB Thread.Sleep(2000) 'warten bis Eintrag in Timas-DB
requestDone = False requestDone = False
initTimasData() initTimasData()
End If
End If End If
End If End If
End If
End Sub End Sub
Private Sub initTimasData() Private Sub initTimasData()
lblStatusZE.Visible = False 'lblStatusZE.Visible = False
'btnEdit.Visible = False
btn.Visible = True
'Eintrag für Zeitübersicht 'Eintrag für Zeitübersicht
'lblTimasZeiten.Visible = True 'lblTimasZeiten.Visible = True
lblTimasSaldo.Visible = True
lblTimasSaldo.Visible = False
lblTimasSaldo.Text = ""
If Not requestDone Then If Not requestDone Then
lblTimasSaldo.Text = ""
Dim dtZeiten As New DataTable Dim dtZeiten As New DataTable
If timas IsNot Nothing Then If timas IsNot Nothing Then
Dim isServiceRunning As Boolean = True 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) Dim checkEntry As Boolean = timas.getTimeEntries(MA.mit_timasId, dtZeiten,, requestDone)
online = checkEntry online = checkEntry
If requestDone Then If requestDone Then
If checkEntry Then If checkEntry Then
'PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_green
lblStatusZE.BackColor = Color.Green lblStatusZE.BackColor = Color.Green
lblStatusZE.Text = "ONLINE" lblStatusZE.Text = "ONLINE"
btnZEGehen.Enabled = True btnZEGehen.Enabled = True
btnZEKommen.Enabled = False btnZEKommen.Enabled = False
btnAkten.Enabled = False btnAkten.Enabled = False
Else Else
' PictureBox9.Image = VERAG_PROG_ALLGEMEIN.My.Resources.Resources.uhr_red
lblStatusZE.Text = "OFFLINE" lblStatusZE.Text = "OFFLINE"
lblStatusZE.BackColor = Color.Firebrick lblStatusZE.BackColor = Color.Firebrick
btnZEGehen.Enabled = False btnZEGehen.Enabled = False
btnZEKommen.Enabled = True btnZEKommen.Enabled = True
btnAkten.Enabled = True btnAkten.Enabled = True
End If End If
Else 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 lblStatusZE.BackColor = Color.Gray
btnZEGehen.Enabled = False btnZEGehen.Enabled = False
btnZEKommen.Enabled = False btnZEKommen.Enabled = False
Button2.Enabled = False Button2.Enabled = False
btnAkten.Enabled = False btnAkten.Enabled = False
End If 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
End If End If