cbam importer, sessions, mailsender, etc.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports com.sun.tools.doclets.internal.toolkit.resources
|
||||
Imports java.lang
|
||||
Imports TELOTEC_Worker
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
@@ -147,7 +148,7 @@ Public Class cImporter_DHFToVERAG
|
||||
Dim dtItems = SQL.loadDgvBySql(
|
||||
$"SELECT * FROM zsAnmGdsitem WHERE LizenzNr='{LizenzNr}' AND OperatorID={OperatorID} AND VorgangID='{VorgangID}' AND AnmID={AnmID} ORDER BY GdsItemID",
|
||||
EZOLL_DB)
|
||||
|
||||
Dim hasValidCBAMDocNr_VERAG As Boolean = False
|
||||
For Each r In dtItems.Rows
|
||||
Dim it As New cVERAG_CustomsDeclarations_Item
|
||||
|
||||
@@ -160,7 +161,7 @@ Public Class cImporter_DHFToVERAG
|
||||
it.zaItem_StatisticalValueEUR = ToNullableDecimal(r("StatVal"))
|
||||
|
||||
LoadEZOLL_HSAddCodes(it, LizenzNr, OperatorID, VorgangID, AnmID, r("GdsItemID"))
|
||||
LoadEZOLL_ItemDocuments(it, LizenzNr, OperatorID, VorgangID, AnmID)
|
||||
LoadEZOLL_ItemDocuments(it, LizenzNr, OperatorID, VorgangID, AnmID, hasValidCBAMDocNr_VERAG)
|
||||
|
||||
it.zaItem_MainProcedure = ToStringSafe(r("ProcCd"))
|
||||
it.zaItem_AdditionalProc = ToStringSafe(r("ProcAddCd"))
|
||||
@@ -189,7 +190,7 @@ Public Class cImporter_DHFToVERAG
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshInsert Then
|
||||
ZA.checkfreshCBAMWarning()
|
||||
ZA.checkfreshCBAMWarning(hasValidCBAMDocNr_VERAG)
|
||||
End If
|
||||
|
||||
' SAVE
|
||||
@@ -282,7 +283,8 @@ Public Class cImporter_DHFToVERAG
|
||||
LizenzNr As String,
|
||||
OperatorID As Integer,
|
||||
VorgangID As String,
|
||||
AnmID As Integer)
|
||||
AnmID As Integer,
|
||||
ByRef hasValidCBAMDocNr_VERAG As Boolean)
|
||||
|
||||
Dim sql As String =
|
||||
"SELECT * FROM zsAnmGdsItemDocCerts " &
|
||||
@@ -323,6 +325,11 @@ Public Class cImporter_DHFToVERAG
|
||||
doc.zaDoc_DepreciationUnitmeasurement = ToStringSafe(r("Unit"))
|
||||
doc.zaDoc_DepreciationUnitmeasurementQualifier = ToStringSafe(r("WOUnit"))
|
||||
|
||||
'CBAM-CHECK
|
||||
If doc.zaDoc_Code = "Y128" And doc.zaDoc_Reference = "CBAM-AT-2025-TAX29885328923" Then
|
||||
hasValidCBAMDocNr_VERAG = True
|
||||
End If
|
||||
|
||||
IT.Documents.Add(doc)
|
||||
Next
|
||||
|
||||
|
||||
@@ -214,6 +214,7 @@ Public Class cImporter_DakosyToVERAG
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim hasValidCBAMDocNr_VERAG As Boolean = False
|
||||
' ================================================================
|
||||
' POSITIONEN + POSITIONS-UNTERLAGEN
|
||||
' ================================================================
|
||||
@@ -290,7 +291,10 @@ Public Class cImporter_DakosyToVERAG
|
||||
doc.zaDoc_DepreciationUnitmeasurement = ul.ezaWpUl_AbschreibungsMengeMasseinheit
|
||||
doc.zaDoc_DepreciationUnitmeasurementQualifier = ul.ezaWpUl_AbschreibungsMengeMasseinheitQualifier
|
||||
|
||||
|
||||
'CBAM-CHECK
|
||||
If doc.zaDoc_Code = "Y128" And doc.zaDoc_Reference = "CBAM-AT-2025-TAX29885328923" Then
|
||||
hasValidCBAMDocNr_VERAG = True
|
||||
End If
|
||||
|
||||
item.Documents.Add(doc)
|
||||
Next
|
||||
@@ -333,7 +337,7 @@ Public Class cImporter_DakosyToVERAG
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshInsert Then
|
||||
ZA.checkfreshCBAMWarning()
|
||||
ZA.checkfreshCBAMWarning(hasValidCBAMDocNr_VERAG)
|
||||
End If
|
||||
' ================================================================
|
||||
|
||||
|
||||
@@ -103,6 +103,8 @@ Public Class cImporter_TelotecToVERAG
|
||||
AddParty(ZA, "EXPORTER", tel.ExpTra_TIN, tel.ExpTra_Na, tel.ExpTra_Strt, tel.ExpTra_Pst, tel.ExpTra_Cty, tel.ExpTra_Ctry, tel.ExpTra_UID)
|
||||
AddParty(ZA, "DECLARANT", tel.Declarant_TIN, tel.Declarant_Na, tel.Declarant_Strt, tel.Declarant_Pst, tel.Declarant_Cty, tel.Declarant_Ctry, tel.Declarant_UID)
|
||||
|
||||
Dim hasValidCBAMDocNr_VERAG As Boolean = False
|
||||
|
||||
' ================================================================
|
||||
' ABGABEN (HEADER)
|
||||
' ================================================================
|
||||
@@ -181,6 +183,12 @@ Public Class cImporter_TelotecToVERAG
|
||||
.zaDoc_Date = Doc_Date
|
||||
}
|
||||
it.Documents.Add(dd)
|
||||
|
||||
'CBAM-CHECK
|
||||
If dd.zaDoc_Code = "Y128" And dd.zaDoc_Reference = "CBAM-AT-2025-TAX29885328923" Then
|
||||
hasValidCBAMDocNr_VERAG = True
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
cErrorHandler.ERR(ex.Message, ex.StackTrace, MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
@@ -196,7 +204,7 @@ Public Class cImporter_TelotecToVERAG
|
||||
'CBAM WARNING
|
||||
' ================================================================
|
||||
If freshinsert Then
|
||||
ZA.checkfreshCBAMWarning()
|
||||
ZA.checkfreshCBAMWarning(hasValidCBAMDocNr_VERAG)
|
||||
End If
|
||||
' ================================================================
|
||||
' ================================================================
|
||||
|
||||
@@ -57,7 +57,7 @@ Module Mail
|
||||
|
||||
' PARAM = "MDM_IT_Verguetung"
|
||||
'PARAM = "JAHRESABRECHNUNG AG-ZS"
|
||||
'PARAM = "KANADEVIA_DETAIL"
|
||||
'PARAM = "KANADEVIA_INVOICE_REPORT"
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------
|
||||
@@ -226,7 +226,7 @@ Module Mail
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
Else
|
||||
System.Console.WriteLine("OPTION erkannt: THYSSENKRUPP_AUSWERTUNG _ Erstellt eine monaltiche Auswertung der DAKSOY-Abfertigungen für THYSSENKRUPP.")
|
||||
System.Console.WriteLine("OPTION erkannt: THYSSENKRUPP_AUSWERTUNG _ Erstellt eine monatliche Auswertung der DAKSOY-Abfertigungen für THYSSENKRUPP.")
|
||||
System.Console.WriteLine("Auswertung Details gestartet...")
|
||||
If SendEmail_THYSSENKRUPP_AUSWERTUNG("al@verag.ag", EORI, von, bis) Then 'für Andreas Details
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
@@ -370,6 +370,53 @@ Module Mail
|
||||
|
||||
Next
|
||||
|
||||
Case "KANADEVIA_INVOICE_REPORT"
|
||||
|
||||
Dim von As Date
|
||||
Dim bis As Date
|
||||
|
||||
If Now.Month = 1 Then
|
||||
von = New Date(Now.Year - 1, 1, 1)
|
||||
bis = New Date(Now.Year - 1, 12, 31)
|
||||
Else
|
||||
von = New Date(Now.Year, 1, 1)
|
||||
bis = New Date(Now.Year, Now.Month, 1).AddDays(-1)
|
||||
End If
|
||||
|
||||
Dim mailTo = "Julie.Garton@kanadevia-inova.com; Mark.Stauffer@kanadevia-inova.com;Sevda.Aksoy@kanadevia-inova.com; Iryna.Hauser@kanadevia-inova.com;Cansu.Buldum@kanadevia-inova.com;Koray.Genis@kanadevia-inova.com"
|
||||
Dim mailToBCC = "ml@verag.ag;al@verag.ag;"
|
||||
|
||||
'mailToBCC = "d.breimaier@verag.ag;"
|
||||
'mailTo = "d.breimaier@verag.ag;"
|
||||
|
||||
|
||||
Dim ListOfKdNr As New List(Of Integer)
|
||||
|
||||
|
||||
ListOfKdNr.Add(770931)
|
||||
ListOfKdNr.Add(772819)
|
||||
ListOfKdNr.Add(773157)
|
||||
ListOfKdNr.Add(773143)
|
||||
|
||||
For Each kdNr As Integer In ListOfKdNr
|
||||
|
||||
Dim Adr As New cAdressen(kdNr)
|
||||
|
||||
Dim Body As String = "Please find attached the cost report for the period from " & von.ToShortDateString & " to " & bis.ToShortDateString & " from " & Adr.Name_1 & " (Customer-No.: " & Adr.AdressenNr & ") " &
|
||||
"<br><br>Generated on: " & Now.ToShortDateString & ", um " & Now.ToShortTimeString &
|
||||
"<br><br><br>This is an automatically generated email. Please do not reply to this email." &
|
||||
"<br><br>VERAG SPEDITION AG"
|
||||
|
||||
|
||||
|
||||
Dim RPT As New VERAG_PROG_ALLGEMEIN.cInvoiceReport
|
||||
System.Console.WriteLine("Auswertung " & PARAM & " gestartet...")
|
||||
|
||||
If SendEmail_KANADEVIA(mailTo, RPT.RunReport_VERAG_INVOICE(kdNr, von, bis), von, bis,, mailToBCC, PARAM, Body) Then
|
||||
System.Console.WriteLine("Vorgang erfolgreich abgeschlossen ...")
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports DAKOSY_Worker.AnrechnungReferenzbetraegeNCTSDE
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
Public Class frmMitarbDetails
|
||||
@@ -965,8 +966,19 @@ Public Class frmMitarbDetails
|
||||
If f.DialogResult = DialogResult.OK Then
|
||||
datGekuendigtAm.Value = f.dtp_date.Value
|
||||
|
||||
Dim Anrede As String = ""
|
||||
Select Case mitarbeiter.mit_geschlecht
|
||||
Case "m" : Anrede = "Herr "
|
||||
Case "w" : Anrede = "Frau "
|
||||
End Select
|
||||
|
||||
|
||||
Dim Mailtext As String = "Folgender Mitarbeiter verlässt mit " & datGekuendigtAm.Value.ToShortDateString & " das Unternehmen " & mitarbeiter.mit_firma & ": <br><br> " & Anrede & mitarbeiter.mit_vname & " " & mitarbeiter.mit_nname & " <br><br> Bitte alle zugehörigen Accounts deaktivieren!"
|
||||
|
||||
If mitarbeiter.mit_timasId Is Nothing OrElse IsDBNull(mitarbeiter.mit_timasId) Then
|
||||
Mailtext &= " <br><br> Mitarbeiter besitzt KEINE ZEITERFASSUNG!"
|
||||
End If
|
||||
|
||||
Dim Mailtext As String = "Folgender Mitarbeiter verlässt mit " & datGekuendigtAm.Value.ToShortDateString & " das Unternehmen " & mitarbeiter.mit_firma & ": " & mitarbeiter.mit_vname & " " & mitarbeiter.mit_nname & vbNewLine & "Bitte alle zugehörigen Accounts deaktivieren!"
|
||||
Dim empfaenger = VERAG_PROG_ALLGEMEIN.cMitarbeiter.GetEMailRecipientForEmailNotification("Mitarbeiter-Austritt")
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("support@verag.ag", "Austritt Mitarbeiter " & mitarbeiter.mit_vname & " " & mitarbeiter.mit_nname & " (" & mitarbeiter.mit_firma & ")", Mailtext,, True,, empfaenger)
|
||||
'datGekuendigtAm.Enabled = cbxGekuendigt.Checked
|
||||
|
||||
Reference in New Issue
Block a user