Timas, Asfinag-Schnittstelle
This commit is contained in:
43
UID/Mitarbeiter/frmMitarbTimas.Designer.vb
generated
43
UID/Mitarbeiter/frmMitarbTimas.Designer.vb
generated
@@ -43,8 +43,6 @@ Partial Class frmMitarbTimas
|
||||
Me.txtInfo = New System.Windows.Forms.TextBox()
|
||||
Me.lblInfo = New System.Windows.Forms.Label()
|
||||
Me.lkl = New System.Windows.Forms.LinkLabel()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.txtPwd = New System.Windows.Forms.TextBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.txtTelNr = New System.Windows.Forms.TextBox()
|
||||
Me.cbxEinsteigsDat = New System.Windows.Forms.CheckBox()
|
||||
@@ -80,6 +78,7 @@ 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.Button1 = New System.Windows.Forms.Button()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.Panel1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
@@ -175,6 +174,7 @@ Partial Class frmMitarbTimas
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.Button1)
|
||||
Me.GroupBox2.Controls.Add(Me.txtLohn)
|
||||
Me.GroupBox2.Controls.Add(Me.lblLohnNr)
|
||||
Me.GroupBox2.Controls.Add(Me.cbxAccount)
|
||||
@@ -185,8 +185,6 @@ Partial Class frmMitarbTimas
|
||||
Me.GroupBox2.Controls.Add(Me.txtInfo)
|
||||
Me.GroupBox2.Controls.Add(Me.lblInfo)
|
||||
Me.GroupBox2.Controls.Add(Me.lkl)
|
||||
Me.GroupBox2.Controls.Add(Me.Label8)
|
||||
Me.GroupBox2.Controls.Add(Me.txtPwd)
|
||||
Me.GroupBox2.Controls.Add(Me.Label6)
|
||||
Me.GroupBox2.Controls.Add(Me.txtTelNr)
|
||||
Me.GroupBox2.Controls.Add(Me.cbxEinsteigsDat)
|
||||
@@ -295,36 +293,18 @@ Partial Class frmMitarbTimas
|
||||
'
|
||||
Me.lkl.AutoSize = True
|
||||
Me.lkl.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lkl.Location = New System.Drawing.Point(347, 36)
|
||||
Me.lkl.Location = New System.Drawing.Point(266, 55)
|
||||
Me.lkl.Name = "lkl"
|
||||
Me.lkl.Size = New System.Drawing.Size(35, 13)
|
||||
Me.lkl.TabIndex = 117
|
||||
Me.lkl.TabStop = True
|
||||
Me.lkl.Text = "Reset"
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
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(206, 55)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(146, 13)
|
||||
Me.Label8.TabIndex = 114
|
||||
Me.Label8.Text = "(erst bei Doppelklick sichtbar)"
|
||||
'
|
||||
'txtPwd
|
||||
'
|
||||
Me.txtPwd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtPwd.Location = New System.Drawing.Point(204, 52)
|
||||
Me.txtPwd.Name = "txtPwd"
|
||||
Me.txtPwd.Size = New System.Drawing.Size(178, 20)
|
||||
Me.txtPwd.TabIndex = 115
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(202, 36)
|
||||
Me.Label6.Location = New System.Drawing.Point(202, 55)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(53, 13)
|
||||
Me.Label6.TabIndex = 116
|
||||
@@ -674,6 +654,18 @@ Partial Class frmMitarbTimas
|
||||
Me.TabControl1.Size = New System.Drawing.Size(546, 242)
|
||||
Me.TabControl1.TabIndex = 123
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button1.BackColor = System.Drawing.Color.White
|
||||
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button1.Location = New System.Drawing.Point(418, 15)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(128, 23)
|
||||
Me.Button1.TabIndex = 88
|
||||
Me.Button1.Text = "aus AVISO laden"
|
||||
Me.Button1.UseVisualStyleBackColor = False
|
||||
'
|
||||
'frmMitarbTimas
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -740,8 +732,6 @@ Partial Class frmMitarbTimas
|
||||
Friend WithEvents txtInfo As TextBox
|
||||
Friend WithEvents lblInfo As Label
|
||||
Friend WithEvents lkl As LinkLabel
|
||||
Friend WithEvents Label8 As Label
|
||||
Friend WithEvents txtPwd As TextBox
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents txtTelNr As TextBox
|
||||
Friend WithEvents cbxEinsteigsDat As CheckBox
|
||||
@@ -758,4 +748,5 @@ Partial Class frmMitarbTimas
|
||||
Private WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents TabControl1 As TabControl
|
||||
Friend WithEvents dgvData As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents Button1 As Button
|
||||
End Class
|
||||
|
||||
@@ -5,6 +5,7 @@ Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Net.Http
|
||||
Imports System.Net.WebRequestMethods
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Security.Policy
|
||||
Imports System.Text
|
||||
Imports System.Text.RegularExpressions
|
||||
@@ -20,6 +21,7 @@ Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmMitarbTimas
|
||||
|
||||
Private avisoEmp As VERAG_PROG_ALLGEMEIN.cMitarbeiter
|
||||
Public mid As Integer = -1
|
||||
Public isUpdate As Boolean = False
|
||||
Dim emp As cTimasEmployee
|
||||
@@ -38,11 +40,8 @@ Public Class frmMitarbTimas
|
||||
|
||||
Private Sub frmMitarbDetails_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
txtPwd.Visible = False
|
||||
cbxEinsteigsDat.Checked = False
|
||||
cbxGebDat.Checked = False
|
||||
|
||||
|
||||
txtGebDat.Format = DateTimePickerFormat.Custom
|
||||
txtGebDat.CustomFormat = "dd.MM.yyyy"
|
||||
datGekuendigtAm.Format = DateTimePickerFormat.Custom
|
||||
@@ -58,9 +57,10 @@ Public Class frmMitarbTimas
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub initMitarbeiter(Optional _isUpdate As Boolean = True)
|
||||
Private Sub initMitarbeiter(mid As Integer, Optional _isUpdate As Boolean = False)
|
||||
timas = New cTimasAPI
|
||||
emp = timas.getEmployee(mid)
|
||||
avisoEmp = New VERAG_PROG_ALLGEMEIN.cMitarbeiter(emp.externid)
|
||||
|
||||
timas.getAllGroups(dtTimas)
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class frmMitarbTimas
|
||||
txtUsername.Text = emp.login
|
||||
txtVname.Text = emp.firstname
|
||||
txtNname.Text = emp.lastname
|
||||
txtPwd.Text = emp.password
|
||||
'txtPwd.Text = emp.password
|
||||
If emp.gender = "male" Then rbtnGeschlechtM.Checked = True
|
||||
If emp.gender = "female" Then rbtnGeschlechtW.Checked = True
|
||||
|
||||
@@ -137,7 +137,7 @@ Public Class frmMitarbTimas
|
||||
Private Sub getMitarbeiter()
|
||||
|
||||
emp.login = txtUsername.Text
|
||||
emp.password = txtPwd.Text
|
||||
'emp.password = txtPwd.Text
|
||||
If rbtnGeschlechtM.Checked Then emp.gender = "male"
|
||||
If rbtnGeschlechtW.Checked Then emp.gender = "female"
|
||||
emp.firstname = txtVname.Text
|
||||
@@ -161,7 +161,6 @@ Public Class frmMitarbTimas
|
||||
'mitarbeiter.mit_TESTonly = cbxTestaccount.Checked
|
||||
If checkMandatoryFields() Then
|
||||
timas.updateEmployee(emp, dgvData)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -169,10 +168,6 @@ Public Class frmMitarbTimas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Label8_Click_1(sender As Object, e As EventArgs)
|
||||
txtPwd.Visible = True
|
||||
Label8.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs)
|
||||
If txtVname.Text = "" And txtNname.Text = "" Then MsgBox("Bitte geben Sie einen Namen ein!") : Exit Sub
|
||||
@@ -208,13 +203,31 @@ Public Class frmMitarbTimas
|
||||
End Sub
|
||||
|
||||
Private Sub lkl_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles lkl.LinkClicked
|
||||
If vbYes = MsgBox("Möchten Sie das Kennwort wirklich zurücksetzen? " & vbNewLine & "Der Benutzer wird beim nächsten Login zur Eingabe aufgefordert.", vbYesNoCancel) Then
|
||||
' txtPwd.Text = "0000"
|
||||
getMitarbeiter()
|
||||
emp.password = "null"
|
||||
If checkMandatoryFields() Then
|
||||
timas.updateEmployee(emp, Nothing)
|
||||
If vbYes = MsgBox("Möchten Sie das Kennwort neu setzen?", vbYesNoCancel) Then
|
||||
If vbYes = MsgBox("Möchten Sie den Kennwort aus AVISO/SQL übernehmen?", vbYesNoCancel) Then
|
||||
If avisoEmp IsNot Nothing AndAlso avisoEmp.mit_pwd <> "" Then
|
||||
emp.password = avisoEmp.mit_pwd
|
||||
If checkMandatoryFields() Then
|
||||
timas.updateEmployee(emp, Nothing)
|
||||
Exit Sub
|
||||
End If
|
||||
Else
|
||||
MsgBox("Mitarbeiter-PW konnte konnten nicht aus AVISO geladen werden!")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim input = InputBox("Neues Passwort:", "Passwort anlegen")
|
||||
If input <> "" Then
|
||||
getMitarbeiter()
|
||||
emp.password = input
|
||||
If checkMandatoryFields() Then
|
||||
timas.updateEmployee(emp, Nothing)
|
||||
End If
|
||||
Else
|
||||
MsgBox("Passwort wurde nicht neu vergeben!")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -312,7 +325,20 @@ Public Class frmMitarbTimas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
|
||||
|
||||
If vbYes = MsgBox("Möchten Sie Daten aus AVISO/SQL übernehmen?", vbYesNo) Then
|
||||
If avisoEmp IsNot Nothing AndAlso avisoEmp.mit_username <> "" Then
|
||||
txtUsername.Text = avisoEmp.mit_username
|
||||
If txtInfo.Text = "" Then
|
||||
txtInfo.Text = avisoEmp.mit_firma & " - " & avisoEmp.mit_abteilung
|
||||
End If
|
||||
cbxAccount.Checked = True
|
||||
getMitarbeiter()
|
||||
Else
|
||||
MsgBox("Mitarbeiterdaten konnten nicht aus AVISO geladen werden!")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user