cbam importer, sessions, mailsender, etc.
This commit is contained in:
63
UID/Dienstplan/usrcntlSessions.Designer.vb
generated
63
UID/Dienstplan/usrcntlSessions.Designer.vb
generated
@@ -39,6 +39,8 @@ Partial Class usrcntlSessions
|
||||
Me.Label74 = New System.Windows.Forms.Label()
|
||||
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
|
||||
Me.dgvSessions = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
|
||||
Me.lbl_letzteAnm = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
CType(Me.dgvSessions, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -58,13 +60,13 @@ Partial Class usrcntlSessions
|
||||
Me.txtSessDatVon._WaehrungZeichen = True
|
||||
Me.txtSessDatVon.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtSessDatVon.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtSessDatVon.Location = New System.Drawing.Point(43, 12)
|
||||
Me.txtSessDatVon.Location = New System.Drawing.Point(43, 18)
|
||||
Me.txtSessDatVon.MaxLength = 10
|
||||
Me.txtSessDatVon.MaxLineLength = -1
|
||||
Me.txtSessDatVon.MaxLines_Warning = ""
|
||||
Me.txtSessDatVon.MaxLines_Warning_Label = Nothing
|
||||
Me.txtSessDatVon.Name = "txtSessDatVon"
|
||||
Me.txtSessDatVon.Size = New System.Drawing.Size(61, 20)
|
||||
Me.txtSessDatVon.Size = New System.Drawing.Size(60, 20)
|
||||
Me.txtSessDatVon.TabIndex = 175
|
||||
'
|
||||
'txtSessDatBis
|
||||
@@ -83,13 +85,13 @@ Partial Class usrcntlSessions
|
||||
Me.txtSessDatBis._WaehrungZeichen = True
|
||||
Me.txtSessDatBis.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtSessDatBis.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtSessDatBis.Location = New System.Drawing.Point(175, 13)
|
||||
Me.txtSessDatBis.Location = New System.Drawing.Point(175, 19)
|
||||
Me.txtSessDatBis.MaxLength = 10
|
||||
Me.txtSessDatBis.MaxLineLength = -1
|
||||
Me.txtSessDatBis.MaxLines_Warning = ""
|
||||
Me.txtSessDatBis.MaxLines_Warning_Label = Nothing
|
||||
Me.txtSessDatBis.Name = "txtSessDatBis"
|
||||
Me.txtSessDatBis.Size = New System.Drawing.Size(61, 20)
|
||||
Me.txtSessDatBis.Size = New System.Drawing.Size(60, 20)
|
||||
Me.txtSessDatBis.TabIndex = 177
|
||||
'
|
||||
'btnAddDay
|
||||
@@ -98,7 +100,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnAddDay.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnAddDay.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnAddDay.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnAddDay.Location = New System.Drawing.Point(399, 10)
|
||||
Me.btnAddDay.Location = New System.Drawing.Point(407, 16)
|
||||
Me.btnAddDay.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnAddDay.Name = "btnAddDay"
|
||||
Me.btnAddDay.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -113,7 +115,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnReduceDay.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnReduceDay.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnReduceDay.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnReduceDay.Location = New System.Drawing.Point(280, 10)
|
||||
Me.btnReduceDay.Location = New System.Drawing.Point(288, 16)
|
||||
Me.btnReduceDay.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnReduceDay.Name = "btnReduceDay"
|
||||
Me.btnReduceDay.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -128,7 +130,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnToday.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnToday.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnToday.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnToday.Location = New System.Drawing.Point(313, 10)
|
||||
Me.btnToday.Location = New System.Drawing.Point(321, 16)
|
||||
Me.btnToday.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnToday.Name = "btnToday"
|
||||
Me.btnToday.Size = New System.Drawing.Size(87, 23)
|
||||
@@ -139,7 +141,7 @@ Partial Class usrcntlSessions
|
||||
'Label73
|
||||
'
|
||||
Me.Label73.AutoSize = True
|
||||
Me.Label73.Location = New System.Drawing.Point(146, 16)
|
||||
Me.Label73.Location = New System.Drawing.Point(149, 22)
|
||||
Me.Label73.Name = "Label73"
|
||||
Me.Label73.Size = New System.Drawing.Size(23, 13)
|
||||
Me.Label73.TabIndex = 179
|
||||
@@ -151,10 +153,10 @@ Partial Class usrcntlSessions
|
||||
Me.btnJahr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnJahr.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnJahr.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnJahr.Location = New System.Drawing.Point(625, 10)
|
||||
Me.btnJahr.Location = New System.Drawing.Point(638, 16)
|
||||
Me.btnJahr.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnJahr.Name = "btnJahr"
|
||||
Me.btnJahr.Size = New System.Drawing.Size(87, 23)
|
||||
Me.btnJahr.Size = New System.Drawing.Size(58, 23)
|
||||
Me.btnJahr.TabIndex = 188
|
||||
Me.btnJahr.Text = "2016"
|
||||
Me.btnJahr.UseVisualStyleBackColor = True
|
||||
@@ -165,7 +167,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnBisJahr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnBisJahr.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnBisJahr.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnBisJahr.Location = New System.Drawing.Point(711, 10)
|
||||
Me.btnBisJahr.Location = New System.Drawing.Point(696, 16)
|
||||
Me.btnBisJahr.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnBisJahr.Name = "btnBisJahr"
|
||||
Me.btnBisJahr.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -180,7 +182,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnVonJahr.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnVonJahr.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnVonJahr.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnVonJahr.Location = New System.Drawing.Point(592, 10)
|
||||
Me.btnVonJahr.Location = New System.Drawing.Point(604, 16)
|
||||
Me.btnVonJahr.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnVonJahr.Name = "btnVonJahr"
|
||||
Me.btnVonJahr.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -195,7 +197,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnMonat.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnMonat.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnMonat.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnMonat.Location = New System.Drawing.Point(469, 10)
|
||||
Me.btnMonat.Location = New System.Drawing.Point(477, 16)
|
||||
Me.btnMonat.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnMonat.Name = "btnMonat"
|
||||
Me.btnMonat.Size = New System.Drawing.Size(87, 23)
|
||||
@@ -209,7 +211,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnBisMonat.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnBisMonat.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnBisMonat.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnBisMonat.Location = New System.Drawing.Point(555, 10)
|
||||
Me.btnBisMonat.Location = New System.Drawing.Point(563, 16)
|
||||
Me.btnBisMonat.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnBisMonat.Name = "btnBisMonat"
|
||||
Me.btnBisMonat.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -224,7 +226,7 @@ Partial Class usrcntlSessions
|
||||
Me.btnVonMonat.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!)
|
||||
Me.btnVonMonat.ForeColor = System.Drawing.Color.Black
|
||||
Me.btnVonMonat.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnVonMonat.Location = New System.Drawing.Point(436, 10)
|
||||
Me.btnVonMonat.Location = New System.Drawing.Point(444, 16)
|
||||
Me.btnVonMonat.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.btnVonMonat.Name = "btnVonMonat"
|
||||
Me.btnVonMonat.Size = New System.Drawing.Size(34, 23)
|
||||
@@ -237,7 +239,7 @@ Partial Class usrcntlSessions
|
||||
'
|
||||
Me.DateTimePicker2.CustomFormat = "''"
|
||||
Me.DateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.DateTimePicker2.Location = New System.Drawing.Point(175, 13)
|
||||
Me.DateTimePicker2.Location = New System.Drawing.Point(175, 19)
|
||||
Me.DateTimePicker2.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.DateTimePicker2.Name = "DateTimePicker2"
|
||||
Me.DateTimePicker2.RightToLeft = System.Windows.Forms.RightToLeft.No
|
||||
@@ -247,7 +249,7 @@ Partial Class usrcntlSessions
|
||||
'Label74
|
||||
'
|
||||
Me.Label74.AutoSize = True
|
||||
Me.Label74.Location = New System.Drawing.Point(14, 16)
|
||||
Me.Label74.Location = New System.Drawing.Point(16, 22)
|
||||
Me.Label74.Name = "Label74"
|
||||
Me.Label74.Size = New System.Drawing.Size(28, 13)
|
||||
Me.Label74.TabIndex = 183
|
||||
@@ -257,7 +259,7 @@ Partial Class usrcntlSessions
|
||||
'
|
||||
Me.DateTimePicker1.CustomFormat = "''"
|
||||
Me.DateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.DateTimePicker1.Location = New System.Drawing.Point(43, 12)
|
||||
Me.DateTimePicker1.Location = New System.Drawing.Point(43, 18)
|
||||
Me.DateTimePicker1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.DateTimePicker1.Name = "DateTimePicker1"
|
||||
Me.DateTimePicker1.RightToLeft = System.Windows.Forms.RightToLeft.No
|
||||
@@ -274,18 +276,37 @@ Partial Class usrcntlSessions
|
||||
Me.dgvSessions.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.dgvSessions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgvSessions.Location = New System.Drawing.Point(3, 39)
|
||||
Me.dgvSessions.Location = New System.Drawing.Point(-9, 42)
|
||||
Me.dgvSessions.Name = "dgvSessions"
|
||||
Me.dgvSessions.RowHeadersVisible = False
|
||||
Me.dgvSessions.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgvSessions.ShowEditingIcon = False
|
||||
Me.dgvSessions.Size = New System.Drawing.Size(744, 706)
|
||||
Me.dgvSessions.Size = New System.Drawing.Size(744, 702)
|
||||
Me.dgvSessions.TabIndex = 174
|
||||
'
|
||||
'lbl_letzteAnm
|
||||
'
|
||||
Me.lbl_letzteAnm.AutoSize = True
|
||||
Me.lbl_letzteAnm.Location = New System.Drawing.Point(114, -2)
|
||||
Me.lbl_letzteAnm.Name = "lbl_letzteAnm"
|
||||
Me.lbl_letzteAnm.Size = New System.Drawing.Size(0, 13)
|
||||
Me.lbl_letzteAnm.TabIndex = 193
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(16, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(91, 13)
|
||||
Me.Label1.TabIndex = 192
|
||||
Me.Label1.Text = "letzte Anmeldung:"
|
||||
'
|
||||
'usrcntlSessions
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.lbl_letzteAnm)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.txtSessDatVon)
|
||||
Me.Controls.Add(Me.txtSessDatBis)
|
||||
Me.Controls.Add(Me.btnAddDay)
|
||||
@@ -327,4 +348,6 @@ Partial Class usrcntlSessions
|
||||
Friend WithEvents Label74 As Label
|
||||
Friend WithEvents DateTimePicker1 As DateTimePicker
|
||||
Friend WithEvents dgvSessions As VERAG_PROG_ALLGEMEIN.MyDatagridview
|
||||
Friend WithEvents lbl_letzteAnm As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
End Class
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Public Class usrcntlSessions
|
||||
Imports GrapeCity
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class usrcntlSessions
|
||||
|
||||
Dim mitarbeiter As VERAG_PROG_ALLGEMEIN.cMitarbeiter
|
||||
|
||||
@@ -131,8 +134,8 @@
|
||||
where " & whereLogin & " and cast([LogOn_datetime] as Date) between '" & von.ToShortDateString & "' and '" & bis.ToShortDateString & "'"
|
||||
|
||||
SQL_String = " select * FROM ( " & SQL_SESSIONS & " UNION ALL " & SQL_SESSION_TS & ") TEMP order by TEMP.sess_login"
|
||||
Else
|
||||
SQL_String = " select * FROM ( " & SQL_SESSIONS & ") TEMP order by TEMP.sess_login"
|
||||
Else
|
||||
SQL_String = " select * FROM ( " & SQL_SESSIONS & ") TEMP order by TEMP.sess_login"
|
||||
End If
|
||||
|
||||
|
||||
@@ -186,6 +189,41 @@
|
||||
|
||||
Private Sub usrcntlSessions_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
If Me.DesignMode Then Exit Sub
|
||||
|
||||
Dim SQL_String As String = ""
|
||||
|
||||
Dim SQL_SESSIONS = "select [sess_login]
|
||||
FROM [ADMIN].[dbo].[tblSessions]
|
||||
where sess_maId = " & mitarbeiter.mit_id
|
||||
|
||||
|
||||
If mitarbeiter.mit_AliasAD_Username IsNot Nothing AndAlso mitarbeiter.mit_AliasAD_Username <> "" AndAlso mitarbeiter.mit_AliasAD_Domain IsNot Nothing AndAlso mitarbeiter.mit_AliasAD_Domain <> "" Then
|
||||
|
||||
Dim whereLogin As String = "([BenutzerAnmeldeName] = '" & mitarbeiter.mit_AliasAD_Domain & "\" & mitarbeiter.mit_AliasAD_Username & "'"
|
||||
|
||||
If mitarbeiter.mit_AliasAD_Username2 IsNot Nothing AndAlso mitarbeiter.mit_AliasAD_Username2 <> "" AndAlso mitarbeiter.mit_AliasAD_Domain2 IsNot Nothing AndAlso mitarbeiter.mit_AliasAD_Domain2 <> "" Then
|
||||
whereLogin &= " OR [BenutzerAnmeldeName] = '" & mitarbeiter.mit_AliasAD_Domain2 & "\" & mitarbeiter.mit_AliasAD_Username2 & "')"
|
||||
Else
|
||||
whereLogin &= ")"
|
||||
End If
|
||||
|
||||
|
||||
Dim SQL_SESSION_TS = "SELECT [LogOn_datetime]
|
||||
FROM [Doku].[dbo].[TbL_LogOnLogOffLog]
|
||||
where " & whereLogin
|
||||
|
||||
SQL_String = " select top(1) * FROM ( " & SQL_SESSIONS & " UNION ALL " & SQL_SESSION_TS & ") TEMP order by TEMP.sess_login desc"
|
||||
Else
|
||||
SQL_String = " select top(1) * FROM ( " & SQL_SESSIONS & ") TEMP order by TEMP.sess_login desc"
|
||||
End If
|
||||
|
||||
Dim aktuellerLogin As String = (New SQL).getValueTxtBySql(SQL_String, "FMZOLL")
|
||||
|
||||
If aktuellerLogin <> "" AndAlso IsDate(aktuellerLogin) Then
|
||||
lbl_letzteAnm.Text = CDate(aktuellerLogin).ToShortDateString
|
||||
|
||||
End If
|
||||
|
||||
initBtns("Tag")
|
||||
initdgvSessions(CDate(DateTimePicker1.Value).Date, CDate(DateTimePicker2.Value).Date)
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user