Timas Abfrage optimiert

This commit is contained in:
2024-03-12 14:30:24 +01:00
parent 97e0a1fbba
commit 26139088ca
2 changed files with 57 additions and 17 deletions

View File

@@ -33,6 +33,8 @@ Partial Class frmMitarbTimas
Me.btnOK = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.txtMandantenNr = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.txtLohn = New System.Windows.Forms.TextBox()
Me.lblLohnNr = New System.Windows.Forms.Label()
@@ -79,8 +81,8 @@ Partial Class frmMitarbTimas
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.dgvData = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.txtMandantenNr = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.CheckedListBox1 = New System.Windows.Forms.CheckedListBox()
Me.Label8 = New System.Windows.Forms.Label()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
@@ -176,6 +178,8 @@ Partial Class frmMitarbTimas
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.Label8)
Me.GroupBox2.Controls.Add(Me.CheckedListBox1)
Me.GroupBox2.Controls.Add(Me.txtMandantenNr)
Me.GroupBox2.Controls.Add(Me.Label4)
Me.GroupBox2.Controls.Add(Me.Button1)
@@ -210,6 +214,24 @@ Partial Class frmMitarbTimas
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Timas - User"
'
'txtMandantenNr
'
Me.txtMandantenNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtMandantenNr.Location = New System.Drawing.Point(226, 96)
Me.txtMandantenNr.Name = "txtMandantenNr"
Me.txtMandantenNr.Size = New System.Drawing.Size(91, 20)
Me.txtMandantenNr.TabIndex = 129
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(223, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(78, 13)
Me.Label4.TabIndex = 130
Me.Label4.Text = "Mandanten-Nr:"
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
@@ -670,23 +692,25 @@ Partial Class frmMitarbTimas
Me.TabControl1.Size = New System.Drawing.Size(546, 242)
Me.TabControl1.TabIndex = 123
'
'txtMandantenNr
'CheckedListBox1
'
Me.txtMandantenNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtMandantenNr.Location = New System.Drawing.Point(226, 96)
Me.txtMandantenNr.Name = "txtMandantenNr"
Me.txtMandantenNr.Size = New System.Drawing.Size(91, 20)
Me.txtMandantenNr.TabIndex = 129
Me.CheckedListBox1.Enabled = False
Me.CheckedListBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckedListBox1.FormattingEnabled = True
Me.CheckedListBox1.Location = New System.Drawing.Point(342, 67)
Me.CheckedListBox1.Name = "CheckedListBox1"
Me.CheckedListBox1.Size = New System.Drawing.Size(210, 94)
Me.CheckedListBox1.TabIndex = 131
'
'Label4
'Label8
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.Location = New System.Drawing.Point(223, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(78, 13)
Me.Label4.TabIndex = 130
Me.Label4.Text = "Mandanten-Nr:"
Me.Label8.AutoSize = True
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label8.Location = New System.Drawing.Point(339, 51)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(196, 13)
Me.Label8.TabIndex = 132
Me.Label8.Text = "Einstellungen (werden in Timas gesetzt):"
'
'frmMitarbTimas
'
@@ -773,4 +797,6 @@ Partial Class frmMitarbTimas
Friend WithEvents Button1 As Button
Friend WithEvents txtMandantenNr As TextBox
Friend WithEvents Label4 As Label
Friend WithEvents CheckedListBox1 As CheckedListBox
Friend WithEvents Label8 As Label
End Class

View File

@@ -9,6 +9,7 @@ Public Class frmMitarbTimas
Dim emp As cTimasEmployee
Dim timas As cTimasAPI
Dim dtTimas As New DataTable
Dim dtcustomFields As New DataTable
Sub New()
@@ -44,6 +45,7 @@ Public Class frmMitarbTimas
emp = timas.getEmployee(mid)
avisoEmp = New VERAG_PROG_ALLGEMEIN.cMitarbeiter(emp.externid)
timas.getAllGroups(dtTimas)
initDGV(dtTimas)
@@ -99,6 +101,7 @@ Public Class frmMitarbTimas
cbxGebDat.Checked = True : txtGebDat.Text = emp.birthdayDate
End If
initcheckedlistbox(timas.getEmployeecustomFields(mid))
End Sub
@@ -337,7 +340,7 @@ Public Class frmMitarbTimas
If avisoEmp.mit_emailprivat <> "" Then
txtEmail.Text = avisoEmp.mit_emailprivat
ElseIf avisoEmp.mit_email <> ""Then
ElseIf avisoEmp.mit_email <> "" Then
txtEmail.Text = avisoEmp.mit_email
End If
@@ -351,5 +354,16 @@ Public Class frmMitarbTimas
End If
End If
End Sub
Private Sub initcheckedlistbox(dt As DataTable)
For Each row As DataRow In dt.Rows
If row.Item("type").ToString.ToLower = "boolean" Then
CheckedListBox1.Items.Add(row.Item("name"), IIf(row.Item("value") = "true", True, False))
End If
Next
End Sub
End Class