This commit is contained in:
2024-02-26 12:42:59 +01:00
22 changed files with 2305 additions and 516 deletions

View File

@@ -252,7 +252,7 @@ Public Class cFakturierung
End Function End Function
Shared Sub setGesamtBetraege(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, Optional Steuersatz_Proz As Object = Nothing) Shared Sub setGesamtBetraege(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, Optional Steuersatz_Proz As Object = Nothing, Optional useNettogesatbetrag As Boolean = False)
Dim steuerPflichtigerBetrag As Double = 0 Dim steuerPflichtigerBetrag As Double = 0
Dim steuerFreierBetrag As Double = 0 Dim steuerFreierBetrag As Double = 0
Dim Abfertigungskosten As Double = 0 Dim Abfertigungskosten As Double = 0
@@ -287,7 +287,7 @@ Public Class cFakturierung
Dim steuerBetrag As Double = 0 Dim steuerBetrag As Double = 0
If RECHNUNG.Steuersatz_Proz <> 0 Then If RECHNUNG.Steuersatz_Proz <> 0 Then
steuerBetrag = steuerPflichtigerBetrag * RECHNUNG.Steuersatz_Proz steuerBetrag = steuerPflichtigerBetrag * RECHNUNG.Steuersatz_Proz
RECHNUNG.SteuerpflichtigerGesamtbetrag = steuerPflichtigerBetrag + steuerBetrag RECHNUNG.SteuerpflichtigerGesamtbetrag = steuerPflichtigerBetrag + IIf(Not useNettogesatbetrag, steuerBetrag, 0) '+ steuerBetrag
RECHNUNG.SteuerfreierGesamtbetrag = steuerFreierBetrag RECHNUNG.SteuerfreierGesamtbetrag = steuerFreierBetrag
Else Else
RECHNUNG.SteuerpflichtigerGesamtbetrag = 0 RECHNUNG.SteuerpflichtigerGesamtbetrag = 0
@@ -1759,7 +1759,7 @@ Public Class cFakturierung
Return getSignature(RECHNUNG.RechnungsLandKz, RECHNUNG.Firma_ID) Return getSignature(RECHNUNG.RechnungsLandKz, RECHNUNG.Firma_ID)
End Function End Function
Shared Function getSignature(Optional landKz = "", Optional firma = -1, Optional individuell = False, Optional displayFirmenmane = True, Optional special = "", Optional additionalLine = "") As String Shared Function getSignature(Optional landKz = "", Optional firma = -1, Optional individuell = False, Optional displayFirmenmane = True, Optional special = "", Optional additionalLine = "", Optional departmentmailadress = True) As String
getSignature = "" getSignature = ""
firma = getFirmaNr(firma) firma = getFirmaNr(firma)
@@ -1804,8 +1804,8 @@ Public Class cFakturierung
getSignature &= "<div style=""font-size:12px"">A 4975 Suben, Autobahngrenze 15 <br><b>T</b> +43 7711 31630 | <b>F</b> +43 7711 31630-1 | <b>@</b> " & If(individuell, emailindividuell, "info@imex-group.at") & " | www.imex-group.at | FN 410356s</div>" getSignature &= "<div style=""font-size:12px"">A 4975 Suben, Autobahngrenze 15 <br><b>T</b> +43 7711 31630 | <b>F</b> +43 7711 31630-1 | <b>@</b> " & If(individuell, emailindividuell, "info@imex-group.at") & " | www.imex-group.at | FN 410356s</div>"
If additionalLine <> "" Then getSignature &= vbNewLine & additionalLine & vbNewLine If additionalLine <> "" Then getSignature &= vbNewLine & additionalLine & vbNewLine
Case 24 'AMBAR Case 24 'AMBAR
Dim defaultMail = getDefaultMail("AMBAR") Dim defaultMail = getDefaultMail("AMBAR", departmentmailadress)
getSignature &= "<img width=""250"" height=""70"" src=""" & imgsrc & "ambar_simple.png""/>" getSignature &= "<img width=""250"" height=""70"" src=""" & imgsrc & "ambar_boarder.png""/>"
If displayFirmenmane Then getSignature &= "<br><b>AMBAR Logistic Services GmbH</b><br>" If displayFirmenmane Then getSignature &= "<br><b>AMBAR Logistic Services GmbH</b><br>"
getSignature &= "<div style=""font-size:12px"">D 83435 Bad Reichenhall, Reichenhallerstrasse 62<br><b>T</b> +49 8651 99624911 | <b>F</b> +49 8651 9962493 | <b>@</b> " & If(individuell, emailindividuell, defaultMail) & " | www.ambarlog.com | DE309105428</div>" getSignature &= "<div style=""font-size:12px"">D 83435 Bad Reichenhall, Reichenhallerstrasse 62<br><b>T</b> +49 8651 99624911 | <b>F</b> +49 8651 9962493 | <b>@</b> " & If(individuell, emailindividuell, defaultMail) & " | www.ambarlog.com | DE309105428</div>"
If additionalLine <> "" Then getSignature &= vbNewLine & additionalLine & vbNewLine If additionalLine <> "" Then getSignature &= vbNewLine & additionalLine & vbNewLine
@@ -1877,15 +1877,17 @@ Public Class cFakturierung
End Select End Select
End Function End Function
Shared Function getDefaultMail(firma) Shared Function getDefaultMail(firma, Optional useDepartmentmailadress = True) As String
Dim defaultMail = "" Dim defaultMail = ""
Select Case firma Select Case firma
Case "AMBAR" Case "AMBAR"
defaultMail = "import@ambarlog.de" defaultMail = "import@ambarlog.de"
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "BH" Then defaultMail = "buchhaltung@ambarlog.de" If useDepartmentmailadress Then
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "EXPORT" Then defaultMail = "office@ambarlog.de" If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "BH" Then defaultMail = "buchhaltung@ambarlog.de"
If VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG = "EXPORT" Then defaultMail = "office@ambarlog.de"
End If
End Select End Select
Return defaultMail
End Function End Function
Shared Function Abrechnugsdaten_AKTUALISIEREN(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, Optional RechnungsDatum As Object = Nothing) As Boolean Shared Function Abrechnugsdaten_AKTUALISIEREN(ByRef RECHNUNG As VERAG_PROG_ALLGEMEIN.cRechnungsausgang, Optional RechnungsDatum As Object = Nothing) As Boolean

View File

@@ -739,7 +739,7 @@ Public Class frmFaktEmail
For Each r In SR_DT.Rows For Each r In SR_DT.Rows
Dim SPEDBUCH As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(r("FilialenNr"), r("AbfertigungsNr"), r("SpeditionsbuchUnterNr")) Dim SPEDBUCH As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch(r("FilialenNr"), r("AbfertigungsNr"), r("SpeditionsbuchUnterNr"))
initRowSpedbuch(SPEDBUCH) initRowSpedbuch(SPEDBUCH)
If SPEDBUCH.AbfertigungsNr = 26 Or SPEDBUCH.AbfertigungsNr = 28 Then If (SPEDBUCH.AbfertigungsNr = 26 Or SPEDBUCH.AbfertigungsNr = 28) AndAlso (SPEDBUCH.FilialenNr = 4805 Or SPEDBUCH.FilialenNr = 4811) Then
isFiskal = True isFiskal = True
End If End If
Next Next

View File

@@ -94,7 +94,7 @@
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<AssemblyOriginatorKeyFile>SDL_1_TemporaryKey.pfx</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>AL20210908.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Accessibility" /> <Reference Include="Accessibility" />
@@ -102,8 +102,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\BouncyCastle.Crypto.dll</HintPath> <HintPath>C:\Program Files (x86)\GrapeCity\ActiveReports 15\Tools\BouncyCastle.Crypto.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.95.4.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>F:\PROGRAMMIERUNG\dll\closedxml\ClosedXML.dll</HintPath>
</Reference> </Reference>
<Reference Include="com.esendex.sdk, Version=3.8.0.0, Culture=neutral, PublicKeyToken=9dceac28a20578e2, processorArchitecture=MSIL"> <Reference Include="com.esendex.sdk, Version=3.8.0.0, Culture=neutral, PublicKeyToken=9dceac28a20578e2, processorArchitecture=MSIL">
<HintPath>..\..\..\AVISO\Aviso\packages\esendex-dotnet-sdk.3.8.0\lib\net35\com.esendex.sdk.dll</HintPath> <HintPath>..\..\..\AVISO\Aviso\packages\esendex-dotnet-sdk.3.8.0\lib\net35\com.esendex.sdk.dll</HintPath>
@@ -115,15 +116,16 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\SharpSSH\DiffieHellman.dll</HintPath> <HintPath>..\..\..\dll\SharpSSH\DiffieHellman.dll</HintPath>
</Reference> </Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.7.2.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL"> <Reference Include="documentformat.openxml%281%29, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\AVISO\Aviso\packages\DocumentFormat.OpenXml.2.7.2\lib\net46\DocumentFormat.OpenXml.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>F:\PROGRAMMIERUNG\dll\documentformat.openxml(1).dll</HintPath>
</Reference> </Reference>
<Reference Include="ExcelNumberFormat, Version=1.0.10.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL"> <Reference Include="ExcelNumberFormat, Version=1.0.10.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\..\..\AVISO\Aviso\packages\ExcelNumberFormat.1.0.10\lib\net20\ExcelNumberFormat.dll</HintPath> <HintPath>..\..\..\AVISO\Aviso\packages\ExcelNumberFormat.1.0.10\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference> </Reference>
<Reference Include="Ghostscript.NET, Version=1.2.1.0, Culture=neutral, PublicKeyToken=f85051de34525b59, processorArchitecture=MSIL"> <Reference Include="Ghostscript.NET, Version=1.2.1.0, Culture=neutral, PublicKeyToken=f85051de34525b59, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Ghostscript.NET.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Ghostscript.NET.dll</HintPath>
</Reference> </Reference>
<Reference Include="Gma.QrCodeNet.Encoding"> <Reference Include="Gma.QrCodeNet.Encoding">
<HintPath>..\..\..\..\RKSV DE\Gma.QrCodeNet.Encoding.dll</HintPath> <HintPath>..\..\..\..\RKSV DE\Gma.QrCodeNet.Encoding.dll</HintPath>
@@ -3199,7 +3201,6 @@
<EmbeddedResource Include="mdm\SDLLeistungenDetails\usrCntlSDLLeistungVERAGCardNEU.resx"> <EmbeddedResource Include="mdm\SDLLeistungenDetails\usrCntlSDLLeistungVERAGCardNEU.resx">
<DependentUpon>usrCntlSDLLeistungVERAGCardNEU.vb</DependentUpon> <DependentUpon>usrCntlSDLLeistungVERAGCardNEU.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="OriginalArchiv_ATR\frmATR.resx"> <EmbeddedResource Include="OriginalArchiv_ATR\frmATR.resx">
<DependentUpon>frmATR.vb</DependentUpon> <DependentUpon>frmATR.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -4297,6 +4298,7 @@
<None Include="AL20210908.pfx" /> <None Include="AL20210908.pfx" />
<None Include="andreas.cer" /> <None Include="andreas.cer" />
<None Include="ClassDiagram1.cd" /> <None Include="ClassDiagram1.cd" />
<None Include="PrivateCodeSignaturDaniel20240131.pfx" />
<None Include="Resources\FA_Graz_EV-Veranlagung_Muster.xlsx"> <None Include="Resources\FA_Graz_EV-Veranlagung_Muster.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
@@ -4309,8 +4311,6 @@
</None> </None>
<None Include="Resources\SR_EVOLOG.xlsx" /> <None Include="Resources\SR_EVOLOG.xlsx" />
<None Include="Resources\SR_TransFerry360.xlsx" /> <None Include="Resources\SR_TransFerry360.xlsx" />
<None Include="SDL_1_TemporaryKey.pfx" />
<None Include="Test.pfx" />
<None Include="Web References\eu.europa.ec1\eoriValidationResult.datasource"> <None Include="Web References\eu.europa.ec1\eoriValidationResult.datasource">
<DependentUpon>Reference.map</DependentUpon> <DependentUpon>Reference.map</DependentUpon>
</None> </None>
@@ -4471,7 +4471,6 @@
<None Include="Resources\MDM_Schreiben\Uebernahmebestätigung\ÜBERNAHMEBESTÄTIGUNG.dotx"> <None Include="Resources\MDM_Schreiben\Uebernahmebestätigung\ÜBERNAHMEBESTÄTIGUNG.dotx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Include="SDL_TemporaryKey.pfx" />
<None Include="seriendruck\Vorlagen\Erstattungsschreiben\Erstattungsschreiben DE.dotx"> <None Include="seriendruck\Vorlagen\Erstattungsschreiben\Erstattungsschreiben DE.dotx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>

File diff suppressed because it is too large Load Diff

View File

@@ -691,4 +691,70 @@ Public Class usrCntlBH
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
End Sub End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
If txtStichtag.Text <> "" AndAlso Not IsNumeric(txtStichtag.Text) Then MsgBox("Stichtag nicht korrekt!") : Exit Sub
Dim SQLStichtag = ""
If txtStichtag.Text <> "" Then
Try : DateTime.ParseExact(txtStichtag._value, "dd.MM.yyyy", culture)
Catch ex As Exception : MsgBox("Stichtag nicht korrekt!") : Exit Sub : End Try
SQLStichtag = " And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis <= '" & txtStichtag._value & "')"
End If
Dim sqlStr = "SELECT tblUStVAntrag.UStVAn_KuNr as Kunde, Adressen.Ordnungsbegriff as Bezeichnung, sum(tblUStVAntrag.UStVAn_3470) as Betrag
FROM tblUStVAntrag
INNER JOIN Adressen ON tblUStVAntrag.UStVAn_KuNr = Adressen.AdressenNr
WHERE tblUStVAntrag.UStVAn_3470 Is Not Null" & SQLStichtag & " Group by tblUStVAntrag.UStVAn_KuNr, Adressen.Ordnungsbegriff"
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
cProgramFunctions.genExcelFromDT_NEW(dt, {"C1:C" & (dt.Rows.Count + 1)})
Me.Cursor = Cursors.Default
End Sub
Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click, Button11.Click
If txtStichtag.Text <> "" AndAlso Not IsNumeric(txtStichtag.Text) Then MsgBox("Stichtag nicht korrekt!") : Exit Sub
Dim SQLStichtag = ""
Dim SQLKdNr = ""
If sender Is Button10 Then
SQLKdNr = " and [UStVAn_KuNr] Not Between 150000 And 155999"
Else
SQLKdNr = " and [UStVAn_KuNr] Between 150000 And 155999"
End If
If txtStichtag.Text <> "" Then
Try : DateTime.ParseExact(txtStichtag._value, "dd.MM.yyyy", culture)
Catch ex As Exception : MsgBox("Stichtag nicht korrekt!") : Exit Sub : End Try
SQLStichtag = " And (UStVAn_ReDatVon <='" & txtStichtag._value & "' and tblUStVAntrag.UStVAn_ReDatBis <= '" & txtStichtag._value & "')"
End If
Dim sqlStr = "SELECT
tblUStVAntrag.UStVAn_KuNr as Kunde, Adressen.Ordnungsbegriff as Kundenbezeichnung,
sum(tblUStVAntrag.UStVAn_VZBetrag) as VZges,
sum(isnull([UStVEr_USteuerbetragEUR],0)) AS Erstattungsbetrag,
case when (sum([UStVAn_VZBetrag])-sum(isnull([UStVAn_RZBetragVZ],0))-sum(isnull([UStVEr_USteuerbetragEUR],0)))>0
then sum((([UStVAn_VZBetrag]-isnull([UStVAn_RZBetragVZ],0))-isnull([UStVEr_USteuerbetragEUR],0)))
else 0 End AS VZBetragAktuell
FROM tblUStVAntrag
INNER JOIN [tblUStVErstattung] ON [tblUStVErstattung].[UStVAn_ID] = tblUStVAntrag .[UStVAn_ID]
INNER JOIN Adressen ON tblUStVAntrag.UStVAn_KuNr = Adressen.AdressenNr
WHERE tblUStVAntrag.UStVAn_VZBetrag Is Not Null" & SQLStichtag & SQLKdNr & " Group by tblUStVAntrag.UStVAn_KuNr, Adressen.Ordnungsbegriff"
Dim dt = SQL.loadDgvBySql(sqlStr, "FMZOLL")
cProgramFunctions.genExcelFromDT_NEW(dt, {"C1:C" & (dt.Rows.Count + 1), "D1:D" & (dt.Rows.Count + 1), "E1:E" & (dt.Rows.Count + 1)})
Me.Cursor = Cursors.Default
End Sub
End Class End Class

View File

@@ -85,7 +85,9 @@ Public Class usrCntlKundenBesonderheiten
End Sub End Sub
Private Sub initDGV(Optional kdnrTmp = -1, Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "") Private Sub initDGV(Optional kdnrTmp = -1, Optional simpleView = False, Optional preferedKategorie = "", Optional preferedKategorieOtherIN = "")
dgvBesonderheiten.Columns.Clear() If dgvBesonderheiten.Columns IsNot Nothing Then
dgvBesonderheiten.Columns.Clear()
End If
If kdnrTmp > 0 Then Me.kdNr = kdnrTmp If kdnrTmp > 0 Then Me.kdNr = kdnrTmp
If kdNr <= 0 Then Exit Sub If kdNr <= 0 Then Exit Sub

View File

@@ -1789,34 +1789,37 @@ Public Class usrCntlKundenuebersicht
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If ADRESSE.UstIdNr Is Nothing Then Exit Sub
If ADRESSE.UstIdKz Is Nothing Then Exit Sub
If ADRESSE.UstIdKz = "" Then Exit Sub
If ADRESSE.UstIdNr = "" Then Exit Sub
sender.BackgroundImage = My.Resources.wait checkUIDNr(sender)
' Button5.Visible = False
'If ADRESSE.UstIdNr Is Nothing Then Exit Sub
'If ADRESSE.UstIdKz Is Nothing Then Exit Sub
'If ADRESSE.UstIdKz = "" Then Exit Sub
'If ADRESSE.UstIdNr = "" Then Exit Sub
'sender.BackgroundImage = My.Resources.wait
'' Button5.Visible = False
Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService 'Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService
FO.initValues() 'FO.initValues()
If FO.Call_Web_Service_MethodUID_Login_NEU2020() = 0 Then 'If FO.Call_Web_Service_MethodUID_Login_NEU2020() = 0 Then
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(ADRESSE.AdressenNr,, , , 2) ' Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(ADRESSE.AdressenNr,, , , 2)
If UID_TMP IsNot Nothing Then ' If UID_TMP IsNot Nothing Then
If UID_TMP.uid_valid Then ' If UID_TMP.uid_valid Then
setKD(kdNr) ' setKD(kdNr)
sender.BackgroundImage = My.Resources.ok ' sender.BackgroundImage = My.Resources.ok
Else ' Else
sender.BackgroundImage = My.Resources.del ' sender.BackgroundImage = My.Resources.del
End If ' End If
Else ' Else
sender.BackgroundImage = My.Resources.fragezeichen ' sender.BackgroundImage = My.Resources.fragezeichen
End If ' End If
FO.Call_Web_Service_MethodUID_Logout_NEU2020() ' FO.Call_Web_Service_MethodUID_Logout_NEU2020()
End If 'End If
'' If cProgramFunctions.validUID(ADRESSE.UstIdKz, ADRESSE.UstIdNr) Then '' If cProgramFunctions.validUID(ADRESSE.UstIdKz, ADRESSE.UstIdNr) Then
'Dim UID = VERAG_PROG_ALLGEMEIN.cUIDPruefung.doUIDPruefung(ADRESSE.AdressenNr, True) 'Dim UID = VERAG_PROG_ALLGEMEIN.cUIDPruefung.doUIDPruefung(ADRESSE.AdressenNr, True)
@@ -2764,7 +2767,7 @@ Public Class usrCntlKundenuebersicht
Dim a As MsgBoxResult = MsgBox("Seit der letzen Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo) Dim a As MsgBoxResult = MsgBox("Seit der letzen Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo)
If a = vbYes Then If a = vbYes Then
setCreditsafereportEntry(cs, company) setCreditsafereportEntry(cs, company, True) 'doppelte Abfragen mitprotokollieren
End If End If
@@ -2792,7 +2795,7 @@ Public Class usrCntlKundenuebersicht
End Sub End Sub
Private Sub setCreditSafeEntry(company As cCreditSafeAPI.Company, PDF As Byte(), krn As Integer) Private Sub setCreditSafeEntry(company As cCreditSafeAPI.Company, PDF As Byte(), krn As Integer, Optional forcedRequest As Boolean = False)
If company.csFailure <> "" Then If company.csFailure <> "" Then
MsgBox(company.csFailure) MsgBox(company.csFailure)
@@ -2816,6 +2819,7 @@ Public Class usrCntlKundenuebersicht
cBonitaetsauskunft.ba_CreditSaveBonitaetsScore = Nothing cBonitaetsauskunft.ba_CreditSaveBonitaetsScore = Nothing
cBonitaetsauskunft.ba_CreditSaveBonitaetsIndex = Nothing cBonitaetsauskunft.ba_CreditSaveBonitaetsIndex = Nothing
cBonitaetsauskunft.ba_CreditSaveRisikoklasse = Nothing cBonitaetsauskunft.ba_CreditSaveRisikoklasse = Nothing
cBonitaetsauskunft.ba_forcedRequest = forcedRequest
cBonitaetsauskunft.ba_KundenNr = (kdNr) cBonitaetsauskunft.ba_KundenNr = (kdNr)
cBonitaetsauskunft.ba_Datum = Now() cBonitaetsauskunft.ba_Datum = Now()
@@ -2848,6 +2852,7 @@ Public Class usrCntlKundenuebersicht
cBonitaetsauskunft.ba_Hoechstkredit = 0 cBonitaetsauskunft.ba_Hoechstkredit = 0
End If End If
cBonitaetsauskunft.ba_UID = company.vatNo
cBonitaetsauskunft.ba_Bankverbindung = company.csBank cBonitaetsauskunft.ba_Bankverbindung = company.csBank
cBonitaetsauskunft.ba_Zahlungsweise = "" cBonitaetsauskunft.ba_Zahlungsweise = ""
cBonitaetsauskunft.ba_GFName = company.csCEO cBonitaetsauskunft.ba_GFName = company.csCEO
@@ -2973,7 +2978,7 @@ Public Class usrCntlKundenuebersicht
genUIDEORIList(kdNr, "EORI") genUIDEORIList(kdNr, "EORI")
End Sub End Sub
Private Sub setCreditsafereportEntry(cs As cCreditSafeAPI, company As cCreditSafeAPI.Company) Private Sub setCreditsafereportEntry(cs As cCreditSafeAPI, company As cCreditSafeAPI.Company, Optional forecedReqest As Boolean = False)
Dim pdfObject As Byte() = Nothing Dim pdfObject As Byte() = Nothing
@@ -2989,9 +2994,29 @@ Public Class usrCntlKundenuebersicht
setCreditSafeEntry(company, Nothing, kdNr) setCreditSafeEntry(company, Nothing, kdNr)
MsgBox("Fehler beim Erstellen des PDF-Dokuments" & vbNewLine & failureDesc) MsgBox("Fehler beim Erstellen des PDF-Dokuments" & vbNewLine & failureDesc)
Else Else
setCreditSafeEntry(company, pdfObject, kdNr) setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest)
End If End If
If company.vatNo <> "" AndAlso checkNullStr(ADRESSE.UstIdKz) = "" AndAlso checkNullStr(ADRESSE.UstIdNr) = "" Then
'set and check uid nr
Dim countryKz = company.vatNo.Substring(0, 2)
ADRESSE.UstIdKz = countryKz
ADRESSE.UstIdNr = company.vatNo.Replace(countryKz, "").Replace(" ", "")
ADRESSE.SAVE()
Dim validUID As Boolean = False
checkUIDNr(, validUID)
If Not validUID Then
ADRESSE.UstIdKz = ""
ADRESSE.UstIdNr = ""
ADRESSE.SAVE()
End If
End If
End Sub End Sub
@@ -3019,4 +3044,38 @@ Public Class usrCntlKundenuebersicht
Dim webAddress As String = "https://wiki.verag.ag/software/aviso/howtos/Creditsafe" Dim webAddress As String = "https://wiki.verag.ag/software/aviso/howtos/Creditsafe"
Process.Start(webAddress) Process.Start(webAddress)
End Sub End Sub
Private Sub checkUIDNr(Optional sender As Object = Nothing, Optional ByRef validUID As Boolean = False)
If ADRESSE.UstIdNr Is Nothing Then Exit Sub
If ADRESSE.UstIdKz Is Nothing Then Exit Sub
If ADRESSE.UstIdKz = "" Then Exit Sub
If ADRESSE.UstIdNr = "" Then Exit Sub
If sender IsNot Nothing Then sender.BackgroundImage = My.Resources.wait
' Button5.Visible = False
Dim FO As New VERAG_PROG_ALLGEMEIN.cFinanzOnlineWebService
FO.initValues()
If FO.Call_Web_Service_MethodUID_Login_NEU2020() = 0 Then
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(ADRESSE.AdressenNr,, , , 2)
If UID_TMP IsNot Nothing Then
If UID_TMP.uid_valid Then
setKD(kdNr)
If sender IsNot Nothing Then sender.BackgroundImage = My.Resources.ok
validUID = True
Else
If sender IsNot Nothing Then sender.BackgroundImage = My.Resources.del
End If
Else
If sender IsNot Nothing Then sender.BackgroundImage = My.Resources.fragezeichen
End If
FO.Call_Web_Service_MethodUID_Logout_NEU2020()
End If
End Sub
End Class End Class

View File

@@ -415,9 +415,12 @@ Public Class usrCntlOfferte
Private Sub btnStandardLaden_Click(sender As Object, e As EventArgs) Handles btnStandardLaden.Click Private Sub btnStandardLaden_Click(sender As Object, e As EventArgs) Handles btnStandardLaden.Click
Dim KUNDE As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr) Dim KUNDE As New VERAG_PROG_ALLGEMEIN.cKunde(kdNr)
Dim FIRMA_TMP = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KUNDE.FilialenNr) Dim FIRMA_TMP = VERAG_PROG_ALLGEMEIN.cAllgemein.getFirmaFromFiliale(KUNDE.FilialenNr)
If Not vbYes = MsgBox("Möchten Sie die Standardofferte für den Kunden " & KUNDE.KundenNr & " laden?" & vbNewLine & "Aktuelle Offerteneinstellungen werden gelöscht.", vbYesNo) Then Exit Sub
edit = True edit = True
handleEditMode(edit) handleEditMode(edit)
@@ -431,7 +434,6 @@ Public Class usrCntlOfferte
currentOffert.LOAD_POSITIONEN() currentOffert.LOAD_POSITIONEN()
If currentOffert.POSITIONEN.Count = 0 Then ' If currentOffert.POSITIONEN.Count = 0 Then '
currentOffert.RESET_STANDARTOFFERTEN_FIRMA(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, FIRMA_TMP) currentOffert.RESET_STANDARTOFFERTEN_FIRMA(VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME, FIRMA_TMP)
End If End If
dgvOfferteNew.GetOrder() dgvOfferteNew.GetOrder()

View File

@@ -2106,9 +2106,9 @@ Public Class frmMDMDatenverarbetiung
RG.Buchungsjahr = cRKSV.getGJ(RG.RechnungsDatum) RG.Buchungsjahr = cRKSV.getGJ(RG.RechnungsDatum)
Dim sqlstr As String = "SELECT '135' as leistungsNr, [contractPartner] as ProductCode, sum([netAmount]) as netamount ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as amountInclVAT FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount <> 0 Group by [contractPartner] Dim sqlstr As String = "SELECT '135' as leistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as netamount ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as amountInclVAT FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount <> 0 group by Kreditkarten.AdressenNr
UNION UNION
SELECT '153' as leistungsNr, [contractPartner] as ProductCode, sum([netAmount]) as netamount ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as amountInclVAT FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount = 0 Group by [contractPartner]" SELECT '153' as leistungsNr, 'MAUT AT lt. Auslage' as ProductCode, sum([netAmount]) as netamount ,sum([VATamount]) as Vatamount ,sum([totalAmount]) as amountInclVAT FROM Kreditkarten INNER JOIN tblAsfinagMaut ON Kreditkarten.KartenNr = tblAsfinagMaut.cardnumber Where Kreditkarten.AdressenNr= '" & KD.KundenNr & "' and tblAsfinagMaut.VATamount = 0 group by Kreditkarten.AdressenNr"
Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL") Dim dt As DataTable = SQL.loadDgvBySql_Param(sqlstr, "FMZOLL")
@@ -2122,10 +2122,6 @@ Public Class frmMDMDatenverarbetiung
allPlosePos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag) 'kann generisch verwendet werden allPlosePos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag) 'kann generisch verwendet werden
'Rückvergütung Consortio !!
'If r("plp_LeistungsNr") = "190" Then '(PRODUCTCODE=301; VERAG-LEISTUNGSNR=190!!
' rabattPlosePos(RG, OFFERTE, LeistungsNr, NettoBetrag, BruttoBetrag)
'End If
Next Next
@@ -2134,7 +2130,8 @@ Public Class frmMDMDatenverarbetiung
RG.Steuersatz_Proz = dtSt.Rows(0)(0) RG.Steuersatz_Proz = dtSt.Rows(0)(0)
End If End If
cFakturierung.setGesamtBetraege(RG) Dim useNettogesamtbetrag As Boolean = True
cFakturierung.setGesamtBetraege(RG,, useNettogesamtbetrag)
RG.Text = (cFakturierung.przRechnungstextTXT(RG, SPEDBUCH) & vbNewLine & cFakturierung.przRechnungstextZZ(RG)).Trim RG.Text = (cFakturierung.przRechnungstextTXT(RG, SPEDBUCH) & vbNewLine & cFakturierung.przRechnungstextZZ(RG)).Trim
@@ -2238,7 +2235,6 @@ Public Class frmMDMDatenverarbetiung
If POS.Steuerpflichtig Then If POS.Steuerpflichtig Then
POS.SteuerpflichtigerBetrag = NettoBetrag POS.SteuerpflichtigerBetrag = NettoBetrag
POS.Preis = NettoBetrag POS.Preis = NettoBetrag
Else Else
POS.SteuerfreierBetrag = BruttoBetrag POS.SteuerfreierBetrag = BruttoBetrag
@@ -2795,7 +2791,7 @@ Public Class frmMDMDatenverarbetiung
Return False Return False
End If End If
For Each row As DataRow In dt.Rows For Each row As DataRow In dt.Rows
Dim maut As New cAsfinagMaut() Dim maut As New VERAG_PROG_ALLGEMEIN.cAsfinagMaut()
maut.cardnumber = row.Item("CardNumber") maut.cardnumber = row.Item("CardNumber")
maut.licenceplate = IIf(Not IsDBNull(row.Item("vehicleLicensePlate")), row.Item("vehicleLicensePlate"), row.Item("InfoField")) maut.licenceplate = IIf(Not IsDBNull(row.Item("vehicleLicensePlate")), row.Item("vehicleLicensePlate"), row.Item("InfoField"))
maut.turnoverdate = row.Item("DeliveryDate") maut.turnoverdate = row.Item("DeliveryDate")

View File

@@ -32,6 +32,9 @@ Public Class cBonitaetsauskunft
Property ba_datenarchivId As Object = Nothing Property ba_datenarchivId As Object = Nothing
Property ba_Geschaeftszweck As Object = Nothing Property ba_Geschaeftszweck As Object = Nothing
Property ba_GSName As Object = Nothing Property ba_GSName As Object = Nothing
Property ba_UID As String = ""
Property ba_forcedRequest As Boolean = False
Dim SQL As New SQL Dim SQL As New SQL
@@ -75,6 +78,8 @@ Public Class cBonitaetsauskunft
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_datenarchivId", ba_datenarchivId)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_datenarchivId", ba_datenarchivId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_Geschaeftszweck", ba_Geschaeftszweck)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_Geschaeftszweck", ba_Geschaeftszweck))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_GSName", ba_GSName)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_GSName", ba_GSName))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_UID", ba_UID))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ba_forcedRequest", ba_forcedRequest))
Return list Return list
End Function End Function

View File

@@ -50,22 +50,24 @@ Public Class cFeiertage
End Get End Get
End Property End Property
Public Function GetFirstyDayInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer) As DateTime Public Function GetFirstyDayYInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer, Optional irgnoreDay As Boolean = False) As DateTime
' Create a start date for the 1st day of the month ' Create a start date for the 1st day of the month
Dim startDate As DateTime = New DateTime(year, month, 1) Dim startDate As DateTime = New DateTime(year, month, 1)
While startDate.DayOfWeek <> day If Not irgnoreDay Then
startDate = startDate.AddDays(1)
End While
While startDate.DayOfWeek <> day
startDate = startDate.AddDays(1)
End While
End If
Return startDate Return startDate
End Function End Function
Public Function GetLastyDayInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer) As DateTime Public Function GetLastyDayYInxMonth(ByVal day As DayOfWeek, ByVal month As Integer, ByVal year As Integer, Optional irgnoreDay As Boolean = False) As DateTime
' Create a start date for the last weekday of the month ' Create a start date for the last weekday of the month
Dim startDate As DateTime Dim startDate As DateTime
@@ -77,9 +79,14 @@ Public Class cFeiertage
startDate = startDate.AddDays(-1) startDate = startDate.AddDays(-1)
End If End If
While (startDate.DayOfWeek <> day) If irgnoreDay Then
startDate = startDate.AddDays(-1) startDate = startDate.AddDays(-1)
End While Else
While (startDate.DayOfWeek <> day)
startDate = startDate.AddDays(-1)
End While
End If
Return startDate Return startDate
@@ -268,9 +275,9 @@ Public Class cFeiertage
Case "GB" Case "GB"
If datum = Karfreitag Then Return True If datum = Karfreitag Then Return True
If datum = GetFirstyDayInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Early May Bank Holiday Erster Montag im Mai If datum = GetFirstyDayYInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Early May Bank Holiday Erster Montag im Mai
If datum = GetLastyDayInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Spring Bank Holiday Letzter Montag im Mai If datum = GetLastyDayYInxMonth(DayOfWeek.Monday, 5, _Year) Then Return True 'Spring Bank Holiday Letzter Montag im Mai
If datum = GetLastyDayInxMonth(DayOfWeek.Monday, 8, _Year) Then Return True 'Summer Bank Holiday Letzter Montag im August If datum = GetLastyDayYInxMonth(DayOfWeek.Monday, 8, _Year) Then Return True 'Summer Bank Holiday Letzter Montag im August
Return False Return False
Case Else Case Else

View File

@@ -22,6 +22,7 @@ Public Class cMitarbeiter
Property mit_durchwahl As String = "" Property mit_durchwahl As String = ""
Property mit_telefonnr As String = "" Property mit_telefonnr As String = ""
Property mit_email As String = "" Property mit_email As String = ""
Property mit_emailprivat As String = ""
Property mit_mobiltel As String = "" Property mit_mobiltel As String = ""
Property mit_allowAnruf As Boolean Property mit_allowAnruf As Boolean
Property mit_info As String = "" Property mit_info As String = ""
@@ -202,6 +203,7 @@ Public Class cMitarbeiter
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Sprachkentnisse", mit_Sprachkentnisse)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_Sprachkentnisse", mit_Sprachkentnisse))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_homeoffice", mit_homeoffice)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_homeoffice", mit_homeoffice))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_timasNichtStempeln", mit_timasNichtStempeln)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_timasNichtStempeln", mit_timasNichtStempeln))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("mit_emailprivat", mit_emailprivat))
Return list Return list
@@ -401,6 +403,7 @@ Public Class cMitarbeiter
If Not dr.Item("mit_Sprachkentnisse") Is DBNull.Value Then Me.mit_Sprachkentnisse = dr.Item("mit_Sprachkentnisse") If Not dr.Item("mit_Sprachkentnisse") Is DBNull.Value Then Me.mit_Sprachkentnisse = dr.Item("mit_Sprachkentnisse")
Me.mit_homeoffice = dr.Item("mit_homeoffice") Me.mit_homeoffice = dr.Item("mit_homeoffice")
Me.mit_timasNichtStempeln = dr.Item("mit_timasNichtStempeln") Me.mit_timasNichtStempeln = dr.Item("mit_timasNichtStempeln")
If Not dr.Item("mit_emailprivat") Is DBNull.Value Then Me.mit_emailprivat = dr.Item("mit_emailprivat")
Catch ex As Exception Catch ex As Exception

View File

@@ -0,0 +1,146 @@

Imports System.Data.SqlClient
Imports System.Reflection
Public Class cUeberstunden
Property uest_id As Integer
Property uest_maId As Object = Nothing
Property uest_timasId As Object = Nothing
Property uest_100 As Object = Nothing
Property uest_50 As Object = Nothing
Property uest_0 As Object = Nothing
Property uest_date As Date = Nothing
Property uest_created As Object = Nothing
Property uest_lastChanged As Object = Nothing
Property uest_deleted As Boolean
Property uest_systemuser As Object = Nothing
Property uest_maxUE As Object = Nothing
Property uest_ignoreLimit As Boolean
Public hasEntry = False
Dim SQL As New SQL
Sub New(uest_maId, uest_date)
Me.uest_maId = uest_maId
Me.uest_date = uest_date
LOAD()
End Sub
Sub New(uest_maId, uest_date, uest_created)
Me.uest_maId = uest_maId
Me.uest_date = uest_date
Me.uest_created = uest_created
End Sub
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_id", uest_id,, True, True))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_maId", uest_maId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_timasId", uest_timasId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_100", uest_100))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_50", uest_50))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_0", uest_0))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_date", uest_date))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_created", uest_created))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_lastChanged", uest_lastChanged))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_deleted", uest_deleted))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_systemuser", uest_systemuser))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_ignoreLimit", uest_ignoreLimit))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("uest_maxUE", uest_maxUE))
Return list
End Function
Public Function SAVE() As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblUeberstunden WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0) " &
" BEGIN " & getUpdateCmd() & " END " &
" Else " &
" BEGIN " & getInsertCmd() & " END " &
" commit tran "
Return SQL.doSQLVarList(sqlstr, "ADMIN", , list)
End Function
Public Sub LOAD()
Try
hasEntry = False
Using conn As SqlConnection = SQL.GetNewOpenConnectionADMIN()
Using cmd As New SqlCommand("SELECT TOP(1) * FROM tblUeberstunden WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0 order by uest_created desc", conn)
cmd.Parameters.AddWithValue("@uest_maId", uest_maId)
cmd.Parameters.AddWithValue("@uest_date", uest_date)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each li In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
If dr.Item(li.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(li.Text))
End If
Next
hasEntry = True
End If
dr.Close()
End Using
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Public Function getUpdateCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
Return (" UPDATE [tblUeberstunden] SET " & str & " WHERE uest_maId=@uest_maId AND uest_date=@uest_date AND uest_deleted = 0 ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
Public Function getInsertCmd() As String
Try
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
Dim str As String = ""
Dim values As String = ""
For Each i In list
If Not i.isPrimaryParam Then
str &= "[" & i.Text & "],"
values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
End If
Next
str = str.Substring(0, str.Length - 1) 'wg. ','
values = values.Substring(0, values.Length - 1) 'wg. ','
Return (" INSERT INTO tblUeberstunden (" & str & ") VALUES(" & values & ") ")
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ""
End Function
End Class

View File

@@ -1409,7 +1409,10 @@ Public Class cFormularManager
Using webClient As New Net.WebClient() Using webClient As New Net.WebClient()
Dim data() As Byte = webClient.DownloadData(URL) Dim data() As Byte = webClient.DownloadData(URL)
Using stream As New MemoryStream(data) Using stream As New MemoryStream(data)
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument(stream)
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument
doc.LoadFromStream(stream)
If doc IsNot Nothing Then If doc IsNot Nothing Then
doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4 doc.PageSettings.Size = Spire.Pdf.PdfPageSize.A4
doc.SaveToFile(targetPath) doc.SaveToFile(targetPath)
@@ -1422,7 +1425,7 @@ Public Class cFormularManager
Return targetPath Return targetPath
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try End Try
Return "" Return ""
End Function End Function

View File

@@ -28,8 +28,10 @@ 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.Panel2 = New System.Windows.Forms.Panel() Me.Panel2 = New System.Windows.Forms.Panel()
Me.lblStatusZE = New System.Windows.Forms.Label() Me.lblStatusZE = New System.Windows.Forms.Label()
Me.Label13 = New System.Windows.Forms.Label() Me.Label13 = New System.Windows.Forms.Label()
@@ -81,7 +83,6 @@ 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()
@@ -154,6 +155,32 @@ 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
@@ -169,6 +196,7 @@ Partial Class frmMitarbeitersuche
' '
Me.pnl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink Me.pnl.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer)) Me.pnl.BackColor = System.Drawing.Color.FromArgb(CType(CType(250, Byte), Integer), CType(CType(254, Byte), Integer), CType(CType(255, Byte), Integer))
Me.pnl.Controls.Add(Me.Button3)
Me.pnl.Controls.Add(Me.Panel2) Me.pnl.Controls.Add(Me.Panel2)
Me.pnl.Controls.Add(Me.pnlZeiten) Me.pnl.Controls.Add(Me.pnlZeiten)
Me.pnl.Controls.Add(Me.lblMAId) Me.pnl.Controls.Add(Me.lblMAId)
@@ -199,6 +227,21 @@ Partial Class frmMitarbeitersuche
Me.pnl.Size = New System.Drawing.Size(774, 480) Me.pnl.Size = New System.Drawing.Size(774, 480)
Me.pnl.TabIndex = 24 Me.pnl.TabIndex = 24
' '
'Button3
'
Me.Button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.zeiterfassung_s
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.Location = New System.Drawing.Point(647, 138)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(125, 40)
Me.Button3.TabIndex = 129
Me.Button3.Text = "ÜS auszahlen"
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button3.UseVisualStyleBackColor = True
Me.Button3.Visible = False
'
'Panel2 'Panel2
' '
Me.Panel2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.Panel2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
@@ -415,7 +458,7 @@ Partial Class frmMitarbeitersuche
Me.btnSettings.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.btnSettings.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSettings.Location = New System.Drawing.Point(646, 95) Me.btnSettings.Location = New System.Drawing.Point(646, 95)
Me.btnSettings.Name = "btnSettings" Me.btnSettings.Name = "btnSettings"
Me.btnSettings.Size = New System.Drawing.Size(125, 61) Me.btnSettings.Size = New System.Drawing.Size(125, 40)
Me.btnSettings.TabIndex = 29 Me.btnSettings.TabIndex = 29
Me.btnSettings.Text = "Einstellungen" Me.btnSettings.Text = "Einstellungen"
Me.btnSettings.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.btnSettings.TextAlign = System.Drawing.ContentAlignment.MiddleRight
@@ -592,7 +635,7 @@ Partial Class frmMitarbeitersuche
Me.lblHandyNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold) Me.lblHandyNr.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.lblHandyNr.Location = New System.Drawing.Point(360, 164) Me.lblHandyNr.Location = New System.Drawing.Point(360, 164)
Me.lblHandyNr.Name = "lblHandyNr" Me.lblHandyNr.Name = "lblHandyNr"
Me.lblHandyNr.Size = New System.Drawing.Size(411, 25) Me.lblHandyNr.Size = New System.Drawing.Size(281, 25)
Me.lblHandyNr.TabIndex = 22 Me.lblHandyNr.TabIndex = 22
Me.lblHandyNr.Text = "+43 7711 / 2777 0" Me.lblHandyNr.Text = "+43 7711 / 2777 0"
Me.lblHandyNr.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.lblHandyNr.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
@@ -613,7 +656,7 @@ Partial Class frmMitarbeitersuche
Me.lblTelefon.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold) Me.lblTelefon.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.lblTelefon.Location = New System.Drawing.Point(360, 138) Me.lblTelefon.Location = New System.Drawing.Point(360, 138)
Me.lblTelefon.Name = "lblTelefon" Me.lblTelefon.Name = "lblTelefon"
Me.lblTelefon.Size = New System.Drawing.Size(411, 25) Me.lblTelefon.Size = New System.Drawing.Size(281, 25)
Me.lblTelefon.TabIndex = 16 Me.lblTelefon.TabIndex = 16
Me.lblTelefon.Text = "+43 7711 / 2777 0" Me.lblTelefon.Text = "+43 7711 / 2777 0"
Me.lblTelefon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.lblTelefon.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
@@ -772,32 +815,6 @@ 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!)
@@ -894,4 +911,5 @@ Partial Class frmMitarbeitersuche
Friend WithEvents Button2 As Windows.Forms.Button Friend WithEvents Button2 As Windows.Forms.Button
Friend WithEvents PictureBox5 As Windows.Forms.PictureBox Friend WithEvents PictureBox5 As Windows.Forms.PictureBox
Friend WithEvents btnAkten As Windows.Forms.Button Friend WithEvents btnAkten As Windows.Forms.Button
Friend WithEvents Button3 As Windows.Forms.Button
End Class End Class

View File

@@ -72,6 +72,7 @@ Public Class frmMitarbeitersuche
lblTimasSaldo.Visible = False lblTimasSaldo.Visible = False
Panel1.Visible = False Panel1.Visible = False
btnSettings.Visible = False btnSettings.Visible = False
Button3.Visible = False
' Dim MA As cMitarbeiter = Nothing ' Dim MA As cMitarbeiter = Nothing
If sbMitarbeiter._value <> "" Then If sbMitarbeiter._value <> "" Then
MA = New cMitarbeiter(sbMitarbeiter._value) MA = New cMitarbeiter(sbMitarbeiter._value)
@@ -190,6 +191,8 @@ Public Class frmMitarbeitersuche
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ZE_AKTENGANG", "SDL") Then btnAkten.Visible = True If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ZE_AKTENGANG", "SDL") Then btnAkten.Visible = True
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("Überstunden_auszahlen", "SDL") Then Button3.Visible = True = True
End If End If
End Sub End Sub
@@ -423,7 +426,7 @@ Public Class frmMitarbeitersuche
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, isServiceRunning) timas.getTimeSaldo(MA.mit_timasId, lblTimasSaldo.Text, "dailyBalanceYesterday", isServiceRunning)
If Not isServiceRunning Then If Not isServiceRunning Then
'Abfrage konnte nicht durchgeführt werden. 'Abfrage konnte nicht durchgeführt werden.
MsgBox("Abfragefehler am Timas-Server!") MsgBox("Abfragefehler am Timas-Server!")
@@ -484,4 +487,9 @@ Public Class frmMitarbeitersuche
Process.Start(webAddress) Process.Start(webAddress)
End Sub End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If sbMitarbeiter._value = "" Then Exit Sub
Dim f As New frmUeberstundenauszahlen(sbMitarbeiter._value)
f.ShowDialog(Me)
End Sub
End Class End Class

View File

@@ -0,0 +1,450 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class frmUeberstundenauszahlen
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.dtpMonat = New System.Windows.Forms.DateTimePicker()
Me.lblMonat = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.txt100 = New System.Windows.Forms.TextBox()
Me.txt50 = New System.Windows.Forms.TextBox()
Me.txtMehr = New System.Windows.Forms.TextBox()
Me.txtAusz = New System.Windows.Forms.TextBox()
Me.lblMA = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.txt100x2 = New System.Windows.Forms.TextBox()
Me.txt50x15 = New System.Windows.Forms.TextBox()
Me.txtAusz100 = New System.Windows.Forms.TextBox()
Me.txtAusz50 = New System.Windows.Forms.TextBox()
Me.CheckVatTestService1 = New VERAG_PROG_ALLGEMEIN.eu.europa.ec.checkVatTestService()
Me.cbxabwDatum = New System.Windows.Forms.CheckBox()
Me.lblBis = New System.Windows.Forms.Label()
Me.dtpBis = New System.Windows.Forms.DateTimePicker()
Me.txtSummeAuszb = New System.Windows.Forms.TextBox()
Me.txtberAusz50 = New System.Windows.Forms.TextBox()
Me.txtberAusz100 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.txtlfdSaldo = New System.Windows.Forms.TextBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.picDel = New System.Windows.Forms.PictureBox()
Me.txtAusz50vonSaldo = New System.Windows.Forms.TextBox()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Label8 = New System.Windows.Forms.Label()
Me.txt50x1 = New System.Windows.Forms.TextBox()
Me.dgvUeberstunden = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.cbxoverwrite = New System.Windows.Forms.CheckBox()
CType(Me.picDel, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel1.SuspendLayout()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'dtpMonat
'
Me.dtpMonat.CustomFormat = "yyyy/MM"
Me.dtpMonat.Format = System.Windows.Forms.DateTimePickerFormat.Custom
Me.dtpMonat.Location = New System.Drawing.Point(15, 41)
Me.dtpMonat.Name = "dtpMonat"
Me.dtpMonat.Size = New System.Drawing.Size(81, 20)
Me.dtpMonat.TabIndex = 0
'
'lblMonat
'
Me.lblMonat.AutoSize = True
Me.lblMonat.Location = New System.Drawing.Point(12, 25)
Me.lblMonat.Name = "lblMonat"
Me.lblMonat.Size = New System.Drawing.Size(37, 13)
Me.lblMonat.TabIndex = 1
Me.lblMonat.Text = "Monat"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(13, 11)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(196, 13)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Überstunden 100% (So/Nacht/Feiertag)"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(12, 131)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(138, 13)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Mehrarbeit (autom. ausbez.)"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(13, 53)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(113, 13)
Me.Label4.TabIndex = 4
Me.Label4.Text = "Überstunden 50% (Sa)"
'
'txt100
'
Me.txt100.Location = New System.Drawing.Point(16, 27)
Me.txt100.Name = "txt100"
Me.txt100.ReadOnly = True
Me.txt100.Size = New System.Drawing.Size(47, 20)
Me.txt100.TabIndex = 5
Me.txt100.Text = "0"
'
'txt50
'
Me.txt50.Location = New System.Drawing.Point(16, 69)
Me.txt50.Name = "txt50"
Me.txt50.ReadOnly = True
Me.txt50.Size = New System.Drawing.Size(47, 20)
Me.txt50.TabIndex = 6
Me.txt50.Text = "0"
'
'txtMehr
'
Me.txtMehr.Location = New System.Drawing.Point(15, 147)
Me.txtMehr.Name = "txtMehr"
Me.txtMehr.ReadOnly = True
Me.txtMehr.Size = New System.Drawing.Size(47, 20)
Me.txtMehr.TabIndex = 7
Me.txtMehr.Text = "0"
'
'txtAusz
'
Me.txtAusz.Location = New System.Drawing.Point(192, 196)
Me.txtAusz.Name = "txtAusz"
Me.txtAusz.Size = New System.Drawing.Size(54, 20)
Me.txtAusz.TabIndex = 9
Me.txtAusz.Text = "0"
'
'lblMA
'
Me.lblMA.AutoSize = True
Me.lblMA.Location = New System.Drawing.Point(238, 6)
Me.lblMA.Name = "lblMA"
Me.lblMA.Size = New System.Drawing.Size(56, 13)
Me.lblMA.TabIndex = 10
Me.lblMA.Text = "Mitarbeiter"
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(238, 26)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(65, 13)
Me.Label7.TabIndex = 11
Me.Label7.Text = "Mustermann"
'
'Button1
'
Me.Button1.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Button1.Location = New System.Drawing.Point(321, 170)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(87, 30)
Me.Button1.TabIndex = 12
Me.Button1.Text = "Auszahlen"
Me.Button1.UseVisualStyleBackColor = True
'
'txt100x2
'
Me.txt100x2.Location = New System.Drawing.Point(112, 27)
Me.txt100x2.Name = "txt100x2"
Me.txt100x2.ReadOnly = True
Me.txt100x2.Size = New System.Drawing.Size(49, 20)
Me.txt100x2.TabIndex = 14
Me.txt100x2.Text = "0"
'
'txt50x15
'
Me.txt50x15.Location = New System.Drawing.Point(112, 69)
Me.txt50x15.Name = "txt50x15"
Me.txt50x15.ReadOnly = True
Me.txt50x15.Size = New System.Drawing.Size(49, 20)
Me.txt50x15.TabIndex = 15
Me.txt50x15.Text = "0"
'
'txtAusz100
'
Me.txtAusz100.Location = New System.Drawing.Point(197, 27)
Me.txtAusz100.Name = "txtAusz100"
Me.txtAusz100.ReadOnly = True
Me.txtAusz100.Size = New System.Drawing.Size(54, 20)
Me.txtAusz100.TabIndex = 16
Me.txtAusz100.Text = "0"
'
'txtAusz50
'
Me.txtAusz50.Location = New System.Drawing.Point(197, 69)
Me.txtAusz50.Name = "txtAusz50"
Me.txtAusz50.ReadOnly = True
Me.txtAusz50.Size = New System.Drawing.Size(54, 20)
Me.txtAusz50.TabIndex = 17
Me.txtAusz50.Text = "0"
'
'CheckVatTestService1
'
Me.CheckVatTestService1.Credentials = Nothing
Me.CheckVatTestService1.Url = "http://ec.europa.eu/taxation_customs/vies/services/checkVatTestService"
Me.CheckVatTestService1.UseDefaultCredentials = False
'
'cbxabwDatum
'
Me.cbxabwDatum.AutoSize = True
Me.cbxabwDatum.Location = New System.Drawing.Point(15, 5)
Me.cbxabwDatum.Name = "cbxabwDatum"
Me.cbxabwDatum.Size = New System.Drawing.Size(129, 17)
Me.cbxabwDatum.TabIndex = 18
Me.cbxabwDatum.Text = "abweichendes Datum"
Me.cbxabwDatum.UseVisualStyleBackColor = True
'
'lblBis
'
Me.lblBis.AutoSize = True
Me.lblBis.Location = New System.Drawing.Point(134, 25)
Me.lblBis.Name = "lblBis"
Me.lblBis.Size = New System.Drawing.Size(20, 13)
Me.lblBis.TabIndex = 20
Me.lblBis.Text = "bis"
Me.lblBis.Visible = False
'
'dtpBis
'
Me.dtpBis.CustomFormat = "yyyy/MM/dd"
Me.dtpBis.Format = System.Windows.Forms.DateTimePickerFormat.Custom
Me.dtpBis.Location = New System.Drawing.Point(137, 41)
Me.dtpBis.Name = "dtpBis"
Me.dtpBis.Size = New System.Drawing.Size(81, 20)
Me.dtpBis.TabIndex = 19
Me.dtpBis.Visible = False
'
'txtSummeAuszb
'
Me.txtSummeAuszb.Location = New System.Drawing.Point(110, 196)
Me.txtSummeAuszb.Name = "txtSummeAuszb"
Me.txtSummeAuszb.ReadOnly = True
Me.txtSummeAuszb.Size = New System.Drawing.Size(49, 20)
Me.txtSummeAuszb.TabIndex = 21
Me.txtSummeAuszb.Text = "0"
'
'txtberAusz50
'
Me.txtberAusz50.Location = New System.Drawing.Point(291, 69)
Me.txtberAusz50.Name = "txtberAusz50"
Me.txtberAusz50.ReadOnly = True
Me.txtberAusz50.Size = New System.Drawing.Size(54, 20)
Me.txtberAusz50.TabIndex = 24
Me.txtberAusz50.Text = "0"
'
'txtberAusz100
'
Me.txtberAusz100.Location = New System.Drawing.Point(291, 27)
Me.txtberAusz100.Name = "txtberAusz100"
Me.txtberAusz100.ReadOnly = True
Me.txtberAusz100.Size = New System.Drawing.Size(54, 20)
Me.txtberAusz100.TabIndex = 23
Me.txtberAusz100.Text = "0"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(289, 11)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(92, 13)
Me.Label1.TabIndex = 25
Me.Label1.Text = "bereits ausgezahlt"
'
'txtlfdSaldo
'
Me.txtlfdSaldo.Location = New System.Drawing.Point(17, 108)
Me.txtlfdSaldo.Name = "txtlfdSaldo"
Me.txtlfdSaldo.ReadOnly = True
Me.txtlfdSaldo.Size = New System.Drawing.Size(49, 20)
Me.txtlfdSaldo.TabIndex = 26
Me.txtlfdSaldo.Text = "0"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(18, 92)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(48, 13)
Me.Label6.TabIndex = 27
Me.Label6.Text = "lfd Saldo"
'
'picDel
'
Me.picDel.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.del
Me.picDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.picDel.Location = New System.Drawing.Point(387, 11)
Me.picDel.Name = "picDel"
Me.picDel.Size = New System.Drawing.Size(21, 16)
Me.picDel.TabIndex = 28
Me.picDel.TabStop = False
'
'txtAusz50vonSaldo
'
Me.txtAusz50vonSaldo.Location = New System.Drawing.Point(197, 108)
Me.txtAusz50vonSaldo.Name = "txtAusz50vonSaldo"
Me.txtAusz50vonSaldo.ReadOnly = True
Me.txtAusz50vonSaldo.Size = New System.Drawing.Size(49, 20)
Me.txtAusz50vonSaldo.TabIndex = 29
Me.txtAusz50vonSaldo.Text = "0"
'
'Panel1
'
Me.Panel1.Controls.Add(Me.cbxoverwrite)
Me.Panel1.Controls.Add(Me.Label8)
Me.Panel1.Controls.Add(Me.txt50x1)
Me.Panel1.Controls.Add(Me.Label2)
Me.Panel1.Controls.Add(Me.txtAusz50vonSaldo)
Me.Panel1.Controls.Add(Me.Label3)
Me.Panel1.Controls.Add(Me.picDel)
Me.Panel1.Controls.Add(Me.Label4)
Me.Panel1.Controls.Add(Me.Label6)
Me.Panel1.Controls.Add(Me.txt100)
Me.Panel1.Controls.Add(Me.txtlfdSaldo)
Me.Panel1.Controls.Add(Me.txt50)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Controls.Add(Me.txtMehr)
Me.Panel1.Controls.Add(Me.txtberAusz50)
Me.Panel1.Controls.Add(Me.txtberAusz100)
Me.Panel1.Controls.Add(Me.txtAusz)
Me.Panel1.Controls.Add(Me.txtSummeAuszb)
Me.Panel1.Controls.Add(Me.Button1)
Me.Panel1.Controls.Add(Me.txt100x2)
Me.Panel1.Controls.Add(Me.txt50x15)
Me.Panel1.Controls.Add(Me.txtAusz100)
Me.Panel1.Controls.Add(Me.txtAusz50)
Me.Panel1.Location = New System.Drawing.Point(15, 67)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(421, 235)
Me.Panel1.TabIndex = 30
'
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(194, 179)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(56, 13)
Me.Label8.TabIndex = 33
Me.Label8.Text = "Auszahlen"
'
'txt50x1
'
Me.txt50x1.Location = New System.Drawing.Point(112, 108)
Me.txt50x1.Name = "txt50x1"
Me.txt50x1.ReadOnly = True
Me.txt50x1.Size = New System.Drawing.Size(49, 20)
Me.txt50x1.TabIndex = 32
Me.txt50x1.Text = "0"
'
'dgvUeberstunden
'
Me.dgvUeberstunden.AKTUALISIERUNGS_INTERVALL = -1
Me.dgvUeberstunden.AllowUserToAddRows = False
Me.dgvUeberstunden.AllowUserToDeleteRows = False
Me.dgvUeberstunden.BackgroundColor = System.Drawing.Color.White
Me.dgvUeberstunden.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvUeberstunden.Location = New System.Drawing.Point(381, 12)
Me.dgvUeberstunden.Name = "dgvUeberstunden"
Me.dgvUeberstunden.ReadOnly = True
Me.dgvUeberstunden.Size = New System.Drawing.Size(32, 20)
Me.dgvUeberstunden.TabIndex = 13
Me.dgvUeberstunden.Visible = False
'
'cbxoverwrite
'
Me.cbxoverwrite.AutoSize = True
Me.cbxoverwrite.Checked = True
Me.cbxoverwrite.CheckState = System.Windows.Forms.CheckState.Checked
Me.cbxoverwrite.Location = New System.Drawing.Point(59, 179)
Me.cbxoverwrite.Name = "cbxoverwrite"
Me.cbxoverwrite.Size = New System.Drawing.Size(102, 17)
Me.cbxoverwrite.TabIndex = 31
Me.cbxoverwrite.Text = "max. auszahlbar"
Me.cbxoverwrite.UseVisualStyleBackColor = True
'
'frmUeberstundenauszahlen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(463, 337)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.lblBis)
Me.Controls.Add(Me.dtpBis)
Me.Controls.Add(Me.cbxabwDatum)
Me.Controls.Add(Me.dgvUeberstunden)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.lblMA)
Me.Controls.Add(Me.lblMonat)
Me.Controls.Add(Me.dtpMonat)
Me.Name = "frmUeberstundenauszahlen"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Überstunden auszahlen"
CType(Me.picDel, System.ComponentModel.ISupportInitialize).EndInit()
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
CType(Me.dgvUeberstunden, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents dtpMonat As Windows.Forms.DateTimePicker
Friend WithEvents lblMonat As Windows.Forms.Label
Friend WithEvents Label2 As Windows.Forms.Label
Friend WithEvents Label3 As Windows.Forms.Label
Friend WithEvents Label4 As Windows.Forms.Label
Friend WithEvents txt100 As Windows.Forms.TextBox
Friend WithEvents txt50 As Windows.Forms.TextBox
Friend WithEvents txtMehr As Windows.Forms.TextBox
Friend WithEvents txtAusz As Windows.Forms.TextBox
Friend WithEvents lblMA As Windows.Forms.Label
Friend WithEvents Label7 As Windows.Forms.Label
Friend WithEvents Button1 As Windows.Forms.Button
Friend WithEvents dgvUeberstunden As MyDatagridview
Friend WithEvents txt100x2 As Windows.Forms.TextBox
Friend WithEvents txt50x15 As Windows.Forms.TextBox
Friend WithEvents txtAusz100 As Windows.Forms.TextBox
Friend WithEvents txtAusz50 As Windows.Forms.TextBox
Friend WithEvents CheckVatTestService1 As eu.europa.ec.checkVatTestService
Friend WithEvents cbxabwDatum As Windows.Forms.CheckBox
Friend WithEvents lblBis As Windows.Forms.Label
Friend WithEvents dtpBis As Windows.Forms.DateTimePicker
Friend WithEvents txtSummeAuszb As Windows.Forms.TextBox
Friend WithEvents txtberAusz50 As Windows.Forms.TextBox
Friend WithEvents txtberAusz100 As Windows.Forms.TextBox
Friend WithEvents Label1 As Windows.Forms.Label
Friend WithEvents txtlfdSaldo As Windows.Forms.TextBox
Friend WithEvents Label6 As Windows.Forms.Label
Friend WithEvents picDel As Windows.Forms.PictureBox
Friend WithEvents txtAusz50vonSaldo As Windows.Forms.TextBox
Friend WithEvents Panel1 As Windows.Forms.Panel
Friend WithEvents txt50x1 As Windows.Forms.TextBox
Friend WithEvents Label8 As Windows.Forms.Label
Friend WithEvents cbxoverwrite As Windows.Forms.CheckBox
End Class

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="CheckVatTestService1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,450 @@
Imports System.Runtime.InteropServices.ComTypes
Imports System.Threading
Imports System.Windows.Forms
Imports Microsoft.Office.Interop.Outlook
Imports Therefore.API
Public Class frmUeberstundenauszahlen
Dim MA As cMitarbeiter = Nothing
Dim timas As cTimasAPI = New cTimasAPI
Dim dt As New DataTable
Dim timeaccountdt As New DataTable
Dim dtResult As New DataTable
Dim tag As cFeiertage
Dim auszahlugsdatum As New Date
Dim maxUberstundenpruefung As Boolean = True
Dim stunden100ausz, stunden50ausz, stunden100auszbere, stunden50auszbere, stunden100bereitsausbezahl, stunden50bereitsausbezahlt, mehrabeit, stundenlfdSaldo, stundenlfdSaldobere As Double
Sub New(mit_id)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
MA = New cMitarbeiter(mit_id)
tag = New cFeiertage(DateTime.Parse(dtpMonat.Value).Year)
Label7.Text = MA.mit_vname & " " & MA.mit_nname
timas.getTimeaccountList(dt)
Dim dv = New DataView(dt)
dv.RowFilter = "info like '%zuschlag%' Or name = 'Mehrarbeit' Or name like 'Überstunden%' Or info like 'Auszahlungskonto%' Or name like '%01-Lfd Saldo%'"
timeaccountdt = dv.ToTable
getUeberstunden(False)
End Sub
Private Sub cbxoverwrite_CheckedChanged(sender As Object, e As EventArgs) Handles cbxoverwrite.CheckedChanged
If Not cbxoverwrite.Checked Then
maxUberstundenpruefung = False 'Limit für max. auszahlbar deaktivieren!
Else
If Not maxUberstundenpruefung Then
maxUberstundenpruefung = True
getUeberstunden(cbxabwDatum.Checked)
End If
End If
End Sub
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles dtpMonat.ValueChanged, dtpBis.ValueChanged
getUeberstunden(cbxabwDatum.Checked)
End Sub
Private Sub getUeberstunden(abwDatum As Boolean)
Dim startdate, enddate As Date
If timeaccountdt IsNot Nothing Then
If abwDatum Then
startdate = (dtpMonat.Value)
enddate = (dtpBis.Value)
auszahlugsdatum = enddate
Else
startdate = tag.GetFirstyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
enddate = tag.GetLastyDayYInxMonth(DateTime.Parse(dtpMonat.Value).DayOfWeek, DateTime.Parse(dtpMonat.Value).Month, DateTime.Parse(dtpMonat.Value).Year, True)
auszahlugsdatum = enddate
End If
timas.getTimeAccounts(startdate, enddate, MA.mit_timasId, timeaccountdt, dtResult)
If dtResult.Rows.Count < 1 Then
MsgBox("Für den gewählten Zeitraum konnten keine Stunden ermittelt werden!")
Panel1.Enabled = False
Exit Sub
Else
Panel1.Enabled = True
End If
Dim dt = calcUeberstunden(timeaccountdt, dtResult)
fillFields(dt)
dgvUeberstunden.DataSource = dt
End If
End Sub
Private Function calcUeberstunden(dtAccouts As DataTable, dtSumUeberstunden As DataTable) As DataTable
Dim dtmerged As DataTable
If dtAccouts IsNot Nothing AndAlso dtSumUeberstunden IsNot Nothing Then
dtmerged = dtAccouts.Clone
dtmerged.Merge(dtSumUeberstunden, False, MissingSchemaAction.Add)
If (dtmerged.Columns.Contains("accountType")) Then
dtmerged.Columns.Remove("accountType")
dtmerged.AcceptChanges()
End If
If (dtmerged.Columns.Contains("info")) Then
dtmerged.Columns.Remove("info")
dtmerged.AcceptChanges()
End If
If (dtmerged.Columns.Contains("number")) Then
dtmerged.Columns.Remove("number")
dtmerged.AcceptChanges()
End If
If (dtmerged.Columns.Contains("date")) Then
dtmerged.Columns.Remove("date")
dtmerged.AcceptChanges()
End If
Dim groups = dtmerged.AsEnumerable().
GroupBy(Function(row) New With {
Key .Id = row.Field(Of Integer)("accountid"),
Key .Multi = row.Field(Of String)("multiplier")
})
Dim tableResult = dtmerged.Clone()
For Each grp In groups
tableResult.Rows.Add(grp.Key.Id, grp.Key.Multi,
grp.Sum(Function(row)
Dim value = 0
If Not IsDBNull(row.Item("value")) Then value = row.Item("value")
Return value
End Function))
Next
End If
Return dtmerged
End Function
Public Sub fillFields(dt As DataTable)
'69 10-Na 22-06
'70 11-Sa 00-24 ===> 50%
'72 13-So 00-24
'73 14-FtN 00-24
'1209 Mehrarbeit
'1235 Überstunden 100% gesamt ===> 100%
picDel.Visible = False
For Each c As Control In Panel1.Controls
If TypeOf c Is TextBox Then
c.Text = "0"
End If
Next
stunden50bereitsausbezahlt = 0
stunden100bereitsausbezahl = 0
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Dim calc As Double = 0
For Each r As DataRow In dt.Rows
If Not IsDBNull(r.Item("value")) Then
If r.Item("accountid") = "1209" Then
calc = CDbl(txtMehr.Text)
calc += r.Item("value") * (r.Item("multiplier") & "1")
txtMehr.Text = calc
mehrabeit = calc
End If
If r.Item("accountid") = "1235" Then
calc = CDbl(txt100.Text)
calc += r.Item("value") * (r.Item("multiplier") & "1")
txt100.Text = calc
stunden100ausz = calc
End If
If r.Item("accountid") = "70" Then
calc = CDbl(txt50.Text)
calc += r.Item("value") * (r.Item("multiplier") & "1")
txt50.Text = calc
stunden50ausz = calc
End If
If r.Item("accountid") = "1550" Then
calc = CDbl(txtberAusz100.Text)
calc += r.Item("value") * (r.Item("multiplier") & "1")
txtberAusz100.Text = calc
stunden100bereitsausbezahl = calc
End If
If r.Item("accountid") = "1551" Then
calc = CDbl(txtberAusz50.Text)
calc += r.Item("value") * (r.Item("multiplier") & "1")
txtberAusz50.Text = calc
stunden50bereitsausbezahlt = calc
End If
'Berechnung von lfd Saldo im Zeitraum -> deaktiviert, es soll immer der aktuelle Saldo gezogen werden, egal in welchem Monat ich bin (22.02.2024)
'If r.Item("accountid") = "65" Then
' calc = CDbl(txtlfdSaldo.Text)
' calc += r.Item("value") * (r.Item("multiplier") & "1")
' txtlfdSaldo.Text = calc
'End If
End If
Next
If (stunden100bereitsausbezahl + stunden50bereitsausbezahlt) > 0 Then
picDel.Visible = True
Button1.Enabled = False
txtAusz.Enabled = False
Else
Button1.Enabled = True
txtAusz.Enabled = True
End If
stunden100auszbere = stunden100ausz * 2
stunden50auszbere = stunden50ausz * 1.5
txt100x2.Text = stunden100auszbere
txt50x15.Text = stunden50auszbere
'If CDbl(txtlfdSaldo.Text) < 0 Or auszahlugsdatum.Month = Today.Month AndAlso auszahlugsdatum.Year = Today.Year Then
'wenn berechneter Saldo negativ, dann ist im Regelfall das aktuelle MOnat noch nicht abgeschlossen!, daher anstatt den berechneten Saldo in overallBalance laden!
txtlfdSaldo.Text = timas.getTimeSaldo(MA.mit_timasId, "", "overallBalance")
'End If
stundenlfdSaldo = CDbl(txtlfdSaldo.Text)
stundenlfdSaldobere = stundenlfdSaldo
stundenlfdSaldobere -= stunden100auszbere
stundenlfdSaldobere -= stunden50auszbere
stundenlfdSaldobere = Math.Round(stundenlfdSaldobere, 2)
If stundenlfdSaldo <= 0 Then Button1.Enabled = False
txtSummeAuszb.Text = stundenlfdSaldo
End If
End Sub
Private Sub txtAusz_TextChanged(sender As Object, e As EventArgs) Handles txtAusz.TextChanged
If txtAusz.Text <> "" AndAlso IsNumeric(txtAusz.Text) Then
Dim summeAusz = CDbl(txtAusz.Text)
If summeAusz <= 0 Then
txtAusz50vonSaldo.Text = "0"
txtAusz50.Text = "0"
txtAusz100.Text = "0"
txtAusz.Text = "0"
Button1.Enabled = False
Exit Sub
End If
txt100x2.Text = stunden100auszbere
txt50x15.Text = stunden50auszbere
txt50x1.Text = stundenlfdSaldobere
If stundenlfdSaldo >= summeAusz Then 'Prüfung, damit nicht zuviele ÜS ausbezahlt werden können!
Button1.Enabled = True
Else
If maxUberstundenpruefung Then
Button1.Enabled = False
Else
Button1.Enabled = True
End If
End If
If summeAusz >= stunden100auszbere Then
txtAusz100.Text = stunden100auszbere
Else
txtAusz100.Text = summeAusz
End If
summeAusz = Math.Round(summeAusz - stunden100auszbere, 2)
If summeAusz >= stunden50auszbere Then
txtAusz50.Text = stunden50auszbere
summeAusz = Math.Round(summeAusz - stunden50auszbere, 2)
ElseIf summeAusz < 0 Then
txtAusz50.Text = "0"
Else
txtAusz50.Text = summeAusz
summeAusz = Math.Round(summeAusz - stunden50auszbere, 2)
End If
If summeAusz >= stundenlfdSaldo Then
txtAusz50vonSaldo.Text = stundenlfdSaldo
summeAusz = Math.Round(summeAusz - stundenlfdSaldo, 2)
ElseIf summeAusz < 0 Then
txtAusz50vonSaldo.Text = "0"
Else
txtAusz50vonSaldo.Text = summeAusz
summeAusz = Math.Round(summeAusz - stundenlfdSaldo, 2)
End If
End If
End Sub
Private Sub cbxabwDatum_CheckedChanged(sender As Object, e As EventArgs) Handles cbxabwDatum.CheckedChanged
If cbxabwDatum.Checked Then
lblBis.Visible = True
dtpBis.Visible = True
lblMonat.Text = "bis"
dtpMonat.CustomFormat = "yyyy/MM/dd"
Else
lblBis.Visible = False
dtpBis.Visible = False
lblMonat.Text = "Monat"
dtpMonat.CustomFormat = "yyyy/MM"
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim sum100, sum50, sum0, gesamt As Double
sum100 = RoundOfDigits(CDbl(txtAusz100.Text) * 0.5, 2) 'Übergabe in ZE-System als heruntergerechnete 100%ige bzw. 50%ige ÜS!
sum50 = RoundOfDigits(CDbl(txtAusz50.Text) * 100 / 150, 2)
sum0 = CDbl(txtAusz50vonSaldo.Text)
gesamt = CDbl(txtAusz.Text)
Dim aksAuszahlung As MsgBoxResult = MsgBox("Überstunden für " & MA.mit_vname & " " & MA.mit_nname & " mit " & auszahlugsdatum.ToShortDateString() & " auszahlen?" & vbNewLine & sum100 & "x 100% ÜS :" & txtAusz100.Text & vbNewLine & sum50 & "x 50% ÜS: " & CDbl(txtAusz50.Text) + CDbl(txtAusz50vonSaldo.Text) & vbNewLine & "ÜS gesamt: " & gesamt, vbYesNo)
If aksAuszahlung = vbYes Then
Dim dtsetEntries As New DataTable
dtsetEntries.Columns.Add("accountid", GetType(Integer))
dtsetEntries.Columns.Add("value", GetType(String))
If sum100 >= 0 Then
Dim row = dtsetEntries.NewRow
row.Item("accountid") = 1550
row.Item("value") = sum100.ToString.Replace(",", ".")
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
End If
If sum50 >= 0 Then
Dim row = dtsetEntries.NewRow
row.Item("accountid") = 1551
row.Item("value") = sum50.ToString.Replace(",", ".")
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
End If
If sum0 >= 0 Then
Dim row = dtsetEntries.NewRow
row.Item("accountid") = 1551
row.Item("value") = sum0.ToString.Replace(",", ".")
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
End If
If gesamt >= 0 Then 'vom ldf Saldo, ev. über API Möglich monatliche Korrektur direkt zu befüllen, dann muss dieser If Zweig überarbeitet werden!!!!!!!!!!!!!!
Dim row = dtsetEntries.NewRow
row.Item("accountid") = 993
row.Item("value") = gesamt.ToString.Replace(",", ".")
dtsetEntries.Rows.InsertAt(row, dtsetEntries.Rows.Count)
End If
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToShortDateString, Now())
ues.uest_timasId = MA.mit_timasId
ues.uest_100 = sum100
ues.uest_50 = sum50
ues.uest_0 = sum0
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
ues.uest_ignoreLimit = Not maxUberstundenpruefung
ues.uest_maxUE = CDbl(txtSummeAuszb.Text)
Dim info As String = ""
If timas.setTimeAccountEntries(MA, dtsetEntries, auszahlugsdatum, info) AndAlso ues.SAVE() Then
MsgBox("Erfolgreich in Timas eingetragen")
Else
MsgBox(info)
End If
End If
End Sub
Private Sub picDel_Click(sender As Object, e As EventArgs) Handles picDel.Click
Dim aksAuszahlung As MsgBoxResult = MsgBox("Ausbezahlte Überstunden für " & MA.mit_vname & " " & MA.mit_nname & " mit " & auszahlugsdatum.ToShortDateString() & " zurücksetzen?" & vbNewLine & "100% ÜS: " & txtberAusz100.Text & vbNewLine & "50% ÜS: " & txtberAusz50.Text & vbNewLine & "ÜS gesamt: " & CDbl(txtberAusz100.Text) + CDbl(txtberAusz50.Text), vbYesNo)
If aksAuszahlung = vbYes Then
Dim dtdeleteEntries As New DataTable
dtdeleteEntries.Columns.Add("accountid", GetType(Integer))
Dim rowNew = dtdeleteEntries.NewRow
rowNew.Item("accountid") = 993
dtdeleteEntries.Rows.InsertAt(rowNew, dtdeleteEntries.Rows.Count)
If txtAusz100.Text <> "" AndAlso IsNumeric(txtAusz100.Text) Then
Dim row = dtdeleteEntries.NewRow
row.Item("accountid") = 1550
dtdeleteEntries.Rows.InsertAt(row, dtdeleteEntries.Rows.Count)
End If
If txtAusz50.Text <> "" AndAlso IsNumeric(txtAusz50.Text) Then
Dim row = dtdeleteEntries.NewRow
row.Item("accountid") = 1551
dtdeleteEntries.Rows.InsertAt(row, dtdeleteEntries.Rows.Count)
End If
If timas.deleteTimeAccounts(auszahlugsdatum, auszahlugsdatum, MA.mit_timasId, dtdeleteEntries) Then
Dim ues As New cUeberstunden(MA.mit_id, auszahlugsdatum.ToShortDateString)
ues.uest_deleted = True
ues.uest_lastChanged = Now()
ues.uest_systemuser = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
ues.SAVE()
MsgBox("Erfolgreich aus Timas zurückgesetzt!")
picDel.Visible = False
Thread.Sleep(1000) 'warten bis Eintrag in Timas-DB
getUeberstunden(cbxabwDatum.Checked)
End If
End If
End Sub
Public Function RoundOfDigits(ByVal Value As Decimal, ByVal Digits As Integer) As Decimal
If Digits < 0 Then Return Math.Round(Value * CDec(Math.Pow(10, Digits)), 0, MidpointRounding.AwayFromZero) / CDec(Math.Pow(10, Digits))
Return Math.Round(Value, Digits)
End Function
End Class

View File

@@ -370,6 +370,7 @@ Public Class cCreditSafeAPI
company.csDFoundingDate = dateTime.GetAsTimestamp(getAsLocal) company.csDFoundingDate = dateTime.GetAsTimestamp(getAsLocal)
Debug.WriteLine(dateTime) Debug.WriteLine(dateTime)
company.vatNo = basicInfoObj.StringOf("vatRegistrationNumber")
Dim principalActivityObj As Chilkat.JsonObject = basicInfoObj.ObjectOf("principalActivity") Dim principalActivityObj As Chilkat.JsonObject = basicInfoObj.ObjectOf("principalActivity")
If (basicInfoObj.LastMethodSuccess = True) And company.csBusinessPurpose = "" Then If (basicInfoObj.LastMethodSuccess = True) And company.csBusinessPurpose = "" Then
@@ -608,9 +609,7 @@ Public Class cCreditSafeAPI
Public Property csBusinessPurpose As String Public Property csBusinessPurpose As String
Public Property csShareholder As String Public Property csShareholder As String
Public Property csCEO As String Public Property csCEO As String
Public Property csTurnover As String Public Property csTurnover As String
Public Property language As String Public Property language As String
Public Property csBank As String Public Property csBank As String

View File

@@ -4,6 +4,7 @@ Imports System.Runtime.Remoting
Imports System.Text Imports System.Text
Imports System.Threading Imports System.Threading
Imports System.Windows.Forms Imports System.Windows.Forms
Imports Microsoft.Office.Interop.Outlook
Public Class cTimasAPI Public Class cTimasAPI
@@ -49,18 +50,19 @@ Public Class cTimasAPI
End Function End Function
Public Sub getTimeSaldo(maid As Integer, ByRef info As String, ByRef Optional isEndpointRunning As Boolean = True) Public Function getTimeSaldo(maid As Integer, ByRef info As String, kindofbalance As String, ByRef Optional isEndpointRunning As Boolean = True) As Double
Try Try
Dim returnText As String = "" Dim returnText As String = ""
Dim failureText As String = "" Dim failureText As String = ""
Dim timesaldo As Double = -1
If maid < 1 Then If maid < 1 Then
Exit Sub Return timesaldo
End If End If
If Not checkConnectionTImas(failureText) Then If Not checkConnectionTImas(failureText) Then
Exit Sub Return timesaldo
End If End If
@@ -72,13 +74,13 @@ Public Class cTimasAPI
Debug.WriteLine(rest.LastErrorText) Debug.WriteLine(rest.LastErrorText)
isEndpointRunning = rest.LastMethodSuccess isEndpointRunning = rest.LastMethodSuccess
rest.IdleTimeoutMs = 30000 'defualt rest.IdleTimeoutMs = 30000 'defualt
Exit Sub Return timesaldo
End If End If
If (rest.ResponseStatusCode <> 200) Then If (rest.ResponseStatusCode <> 200) Then
Debug.WriteLine(rest.ResponseHeader) Debug.WriteLine(rest.ResponseHeader)
'lblTimas.Text = rest.ResponseStatusCode & " " & rest.ResponseStatusText 'lblTimas.Text = rest.ResponseStatusCode & " " & rest.ResponseStatusText
Exit Sub Return timesaldo
End If End If
Debug.WriteLine(responseJson) Debug.WriteLine(responseJson)
@@ -97,27 +99,30 @@ Public Class cTimasAPI
'"monthlyBalance": -328380, '"monthlyBalance": -328380,
'"actualTimeOfDay": 4260, '"actualTimeOfDay": 4260,
If kindofbalance = "" Then
Dim saldo = json.StringOf("dailyBalanceYesterday") 'Tagessaldo (gestern) in Sekunden info = "kindOfBalance nicht definiert! "
Return timesaldo
If saldo IsNot Nothing Then Else
Dim saldoAsDouble = CDbl(saldo) Dim saldo = json.StringOf(kindofbalance) 'Tagessaldo (gestern) in Sekunden
saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2) If saldo IsNot Nothing Then
Dim infoBuilder As New StringBuilder Dim saldoAsDouble = CDbl(saldo)
'infoBuilder.Append("Vortag ") saldoAsDouble = Math.Round(saldoAsDouble / 3600, 2)
infoBuilder.Append(saldoAsDouble) Dim infoBuilder As New StringBuilder
infoBuilder.Append(" h") 'infoBuilder.Append("Vortag ")
info = infoBuilder.ToString() infoBuilder.Append(saldoAsDouble)
infoBuilder.Append(" h")
info = infoBuilder.ToString()
timesaldo = saldoAsDouble
Return timesaldo
End If
Return timesaldo
End If End If
Catch ex As WebException Catch ex As WebException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try End Try
End Sub End Function
Public Function getTimeEntries(ByVal maid As Integer, ByRef dtZeiten As DataTable, Optional ByRef entryExistingToday As Boolean = True, Optional ByRef requestDone As Boolean = False, Optional ByRef isEndpointRunning As Boolean = True) As Boolean Public Function getTimeEntries(ByVal maid As Integer, ByRef dtZeiten As DataTable, Optional ByRef entryExistingToday As Boolean = True, Optional ByRef requestDone As Boolean = False, Optional ByRef isEndpointRunning As Boolean = True) As Boolean
Try Try
@@ -186,7 +191,7 @@ Public Class cTimasAPI
Dim timeEntry As Chilkat.JsonObject = jsonArray.ObjectAt(j) Dim timeEntry As Chilkat.JsonObject = jsonArray.ObjectAt(j)
If IsDate(timeEntry.StringOf("stamp")) Then If IsDate(timeEntry.StringOf("stamp")) Then
If CDate(timeEntry.StringOf("stamp")) >= CDate(Today()) Then If CDate(timeEntry.StringOf("stamp")) >= CDate(Today()) Or CDate(timeEntry.StringOf("stamp")) >= CDate(Today().AddDays(-1)) AndAlso CDate(timeEntry.StringOf("stamp")).Hour >= 16 Then 'entweder heute keine Stempelung oder gestern > 16 Uhr (wegen Nachtschicht!)
Dim R As DataRow = dt.NewRow Dim R As DataRow = dt.NewRow
@@ -256,7 +261,7 @@ Public Class cTimasAPI
success = json.UpdateString("importSign", "Import from Aviso") success = json.UpdateString("importSign", "Import from Aviso")
success = json.UpdateString("login", mitarbeiter.mit_username) success = json.UpdateString("login", mitarbeiter.mit_username)
success = json.UpdateBool("loginActive", 1) success = json.UpdateBool("loginActive", 1)
success = json.UpdateString("email", mitarbeiter.mit_email) success = json.UpdateString("email", IIf(mitarbeiter.mit_emailprivat <> "", mitarbeiter.mit_emailprivat, mitarbeiter.mit_email))
success = json.UpdateString("street", mitarbeiter.mit_strasse) success = json.UpdateString("street", mitarbeiter.mit_strasse)
success = json.UpdateString("city", mitarbeiter.mit_ort) success = json.UpdateString("city", mitarbeiter.mit_ort)
success = json.UpdateString("zipcode", mitarbeiter.mit_plz) success = json.UpdateString("zipcode", mitarbeiter.mit_plz)
@@ -902,7 +907,7 @@ Public Class cTimasAPI
If dt IsNot Nothing AndAlso Not dt.Columns.Contains("Id") Then If dt IsNot Nothing AndAlso Not dt.Columns.Contains("Id") Then
dt.Columns.Add("Id", GetType(Integer)) dt.Columns.Add("Id", GetType(Integer))
'dt.Columns.Add("externid", GetType(String)) 'dt.Columns.Add("Login", GetType(String))
dt.Columns.Add("Personal-Nr (Lohn)", GetType(String)) dt.Columns.Add("Personal-Nr (Lohn)", GetType(String))
dt.Columns.Add("Vorname", GetType(String)) dt.Columns.Add("Vorname", GetType(String))
dt.Columns.Add("Nachname", GetType(String)) dt.Columns.Add("Nachname", GetType(String))
@@ -910,24 +915,22 @@ Public Class cTimasAPI
dt.Columns.Add("Ausweis-Nr", GetType(Integer)) dt.Columns.Add("Ausweis-Nr", GetType(Integer))
dt.Columns.Add("Info", GetType(String)) dt.Columns.Add("Info", GetType(String))
End If End If
dt.Clear() dt.Clear()
Dim j As Integer = 0 Dim j As Integer = 0
While j < num While j < num
Dim employee As Chilkat.JsonObject = jsonArray.ObjectAt(j) Dim employee As Chilkat.JsonObject = jsonArray.ObjectAt(j)
Dim R As DataRow = dt.NewRow
Dim R As DataRow = dt.NewRow R("Id") = employee.IntOf("id")
R("Id") = employee.IntOf("id") 'R("Login") = employee.StringOf("login")
'("externid") = employee.StringOf("externid") R("Personal-Nr (Lohn)") = employee.StringOf("pnr1")
R("Personal-Nr (Lohn)") = employee.StringOf("pnr1") R("Vorname") = employee.StringOf("firstname")
R("Vorname") = employee.StringOf("firstname") R("Nachname") = employee.StringOf("lastname")
R("Nachname") = employee.StringOf("lastname") R("Geschlecht") = employee.StringOf("gender")
R("Geschlecht") = employee.StringOf("gender") R("Ausweis-Nr") = employee.IntOf("card")
R("Ausweis-Nr") = employee.IntOf("card") R("Info") = employee.StringOf("info")
R("Info") = employee.StringOf("info") dt.Rows.Add(R)
dt.Rows.Add(R)
j = j + 1 j = j + 1
End While End While
@@ -937,6 +940,274 @@ Public Class cTimasAPI
End Try End Try
End Function End Function
Public Sub getTimeAccounts(ByRef from As Date, ByRef toDate As Date, ByRef employeeNr As Integer, ByRef accountsdt As DataTable, ByRef dt As DataTable)
Try
Dim failureText As String = ""
If Not checkConnectionTImas(failureText) Then
Exit Sub
End If
Dim success As Boolean
rest.ClearAllQueryParams()
rest.AddQueryParam("from", from.Date.ToString("yyyy-MM-dd"))
rest.AddQueryParam("to", toDate.Date.ToString("yyyy-MM-dd"))
Dim id As String = ""
For Each row As DataRow In accountsdt.Rows
id &= row("accountid") & ","
Next
rest.AddQueryParam("accounts", id)
rest.AddQueryParam("employees", employeeNr)
Dim sbResponseBody As String
sbResponseBody = rest.FullRequestNoBody("GET", API_STRING & "/rest/web-api/accounts/values")
If (rest.LastMethodSuccess <> True) Then
Debug.WriteLine(rest.LastErrorText)
Exit Sub
End If
If (rest.ResponseStatusCode <> 200) Then
Debug.WriteLine(rest.ResponseStatusCode & " " & rest.ResponseStatusText & sbResponseBody.ToString)
End If
Debug.WriteLine(sbResponseBody)
Dim jsonArray As New Chilkat.JsonArray
success = jsonArray.Load(sbResponseBody)
If (success <> True) Then
Debug.WriteLine(jsonArray.LastErrorText)
Exit Sub
End If
Dim num As Integer = jsonArray.Size
If num = -1 Then
Exit Sub
End If
If dt IsNot Nothing And Not dt.Columns.Contains("accountid") Then
dt.Columns.Add("accountid", GetType(Integer))
dt.Columns.Add("date", GetType(String))
dt.Columns.Add("value", GetType(Double))
dt.Columns.Add("multiplier", GetType(String))
Else
dt.Clear()
End If
Dim j As Integer = 0
While j < num
Dim accounts As Chilkat.JsonObject = jsonArray.ObjectAt(j)
If accounts.StringOf("value") <> "" Then
Dim R As DataRow = dt.NewRow
R("accountid") = accounts.IntOf("accountid")
R("date") = accounts.StringOf("date")
Dim timeToDouble = accounts.StringOf("value").Replace("-", "")
Dim ts As TimeSpan = New TimeSpan(Integer.Parse(timeToDouble.Split(":"c)(0)), Integer.Parse(timeToDouble.Split(":"c)(1)), 0)
R("value") = Math.Round(ts.TotalHours, 2)
R("multiplier") = IIf(accounts.StringOf("value").Contains("-"), "-", "+")
dt.Rows.Add(R)
End If
j = j + 1
End While
dt.DefaultView.Sort = " accountid asc, date asc"
dt = dt.DefaultView.ToTable()
Catch ex As WebException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Public Function getTimeaccountList(ByRef dt As DataTable) As String
Dim failureText As String = ""
Try
If Not checkConnectionTImas(failureText) Then
Return failureText
End If
Dim responseJson As String = rest.FullRequestNoBody("GET", "/rest/web-api/accounts/")
If (rest.LastMethodSuccess <> True) Then
Debug.WriteLine(rest.LastErrorText)
Return rest.LastErrorText
End If
If (rest.ResponseStatusCode <> 200) Then
Debug.WriteLine(rest.ResponseHeader)
failureText = rest.ResponseStatusCode & " " & rest.ResponseStatusText
Return rest.ResponseStatusCode & " " & rest.ResponseStatusText
End If
Debug.WriteLine(responseJson)
Dim jsonArray As New Chilkat.JsonArray
Dim success As Boolean = jsonArray.Load(responseJson)
If (success <> True) Then
Debug.WriteLine(jsonArray.LastErrorText)
Return jsonArray.LastErrorText
End If
Dim num As Integer = jsonArray.Size
If num = -1 Then
Return "Array Failure"
End If
If dt IsNot Nothing AndAlso Not dt.Columns.Contains("accountid") Then
dt.Columns.Add("accountid", GetType(Integer))
dt.Columns.Add("name", GetType(String))
dt.Columns.Add("accountType", GetType(String))
dt.Columns.Add("info", GetType(String))
dt.Columns.Add("number", GetType(Integer))
End If
dt.Clear()
Dim j As Integer = 0
While j < num
Dim R As DataRow = dt.NewRow
R("accountid") = jsonArray.ObjectAt(j).IntOf("id")
R("name") = jsonArray.ObjectAt(j).StringOf("name")
R("accountType") = jsonArray.ObjectAt(j).StringOf("accountType")
R("info") = jsonArray.ObjectAt(j).StringOf("info")
R("number") = jsonArray.ObjectAt(j).IntOf("number")
dt.Rows.Add(R)
j = j + 1
End While
Catch ex As WebException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Function
Public Function setTimeAccountEntries(ByVal mitarbeiter As cMitarbeiter, ByVal accountEntrys As DataTable, ByVal accountdate As Date, ByRef info As String)
Dim failureText As String = ""
Dim timeEntryCreated As Boolean = False
If Not checkConnectionTImas(failureText) Then
Return timeEntryCreated
End If
If Not mitarbeiter.mit_timasId > 0 Then
info = "Mitarbeiter besitzt keine Timas-Zuordnung"
Return timeEntryCreated
End If
Dim jsonArr As New Chilkat.JsonArray
For Each ae As DataRow In accountEntrys.Rows
jsonArr.AddObjectAt(-1)
Dim Json As Chilkat.JsonObject = jsonArr.ObjectAt(jsonArr.Size - 1)
Json.UpdateInt("accountid", ae.Item("accountid"))
json.UpdateInt("employeeid", mitarbeiter.mit_timasId)
json.UpdateString("date", accountdate.ToString("yyyy-MM-dd"))
json.UpdateString("value", ae.Item("value"))
Next
Dim sbRequestBody As New Chilkat.StringBuilder
jsonArr.EmitSb(sbRequestBody)
Dim sbResponseBody As New Chilkat.StringBuilder
Dim success = rest.FullRequestSb("POST", "/rest/web-api/accounts/values", sbRequestBody, sbResponseBody)
If (success <> True) Then
Debug.WriteLine(rest.LastErrorText)
Return timeEntryCreated
End If
If (rest.LastMethodSuccess <> True) Then
Debug.WriteLine(rest.LastErrorText)
info = rest.LastErrorText
Return timeEntryCreated
End If
If (rest.ResponseStatusCode <> 200) Then
Debug.WriteLine(rest.ResponseHeader)
info = rest.ResponseStatusCode & " " & rest.ResponseStatusText
If sbResponseBody.GetAsString <> "" Then
info &= vbNewLine & sbResponseBody.GetAsString
End If
Return timeEntryCreated
Else
timeEntryCreated = True
End If
Return timeEntryCreated
End Function
Public Function deleteTimeAccounts(ByRef from As Date, ByRef toDate As Date, ByRef employeeNr As Integer, ByRef accountsdt As DataTable) As Boolean
Dim timeEntryDeleted As Boolean = False
Try
Dim failureText As String = ""
If Not checkConnectionTImas(failureText) Then
Return timeEntryDeleted
End If
Dim success As Boolean
rest.ClearAllQueryParams()
rest.AddQueryParam("from", from.Date.ToString("yyyy-MM-dd"))
rest.AddQueryParam("to", toDate.Date.ToString("yyyy-MM-dd"))
Dim id As String = ""
For Each row As DataRow In accountsdt.Rows
id &= row("accountid") & ","
Next
rest.AddQueryParam("accounts", id)
rest.AddQueryParam("employees", employeeNr)
Dim sbResponseBody As String
sbResponseBody = rest.FullRequestNoBody("DELETE", API_STRING & "/rest/web-api/accounts/values")
If (rest.LastMethodSuccess <> True) Then
Debug.WriteLine(rest.LastErrorText)
Return timeEntryDeleted
End If
If (rest.ResponseStatusCode <> 200) Then
Debug.WriteLine(rest.ResponseStatusCode & " " & rest.ResponseStatusText & sbResponseBody.ToString)
Return timeEntryDeleted
Else
timeEntryDeleted = True
End If
Return timeEntryDeleted
Catch ex As WebException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Function
End Class End Class
@@ -988,6 +1259,4 @@ Public Class cTimasGruppe
Me.empID = empId Me.empID = empId
End Sub End Sub
End Class End Class

View File

@@ -16,7 +16,7 @@
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<DefineDebug>true</DefineDebug> <DefineDebug>true</DefineDebug>
@@ -73,67 +73,70 @@
<AssemblyOriginatorKeyFile>ProgAllg.pfx</AssemblyOriginatorKeyFile> <AssemblyOriginatorKeyFile>ProgAllg.pfx</AssemblyOriginatorKeyFile>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ChilkatDotNet47, Version=9.5.0.88, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64"> <Reference Include="ChilkatDotNet47, Version=9.5.0.96, Culture=neutral, PublicKeyToken=eb5fc1fc52ef09bd, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\ChillKat64\neu 2023\chilkatdotnet47-9.5.0-x64\ChilkatDotNet47.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\ChillKat64\neu 2023\chilkatdotnet47-9.5.0-x64\ChilkatDotNet47.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <Reference Include="ClosedXML, Version=0.68.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\AVISO\Aviso\packages\ClosedXML.0.95.4\lib\net46\ClosedXML.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\closedxml\Neuer Ordner\ClosedXML.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dynamsoft.Forms.Viewer, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL"> <Reference Include="Dynamsoft.Forms.Viewer, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.Forms.Viewer.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.Forms.Viewer.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dynamsoft.ImageCore, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL"> <Reference Include="Dynamsoft.ImageCore, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.ImageCore.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.ImageCore.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dynamsoft.PDF, Version=7.0.0.320, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL"> <Reference Include="Dynamsoft.PDF, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.PDF.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.PDF.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dynamsoft.Twain, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL"> <Reference Include="Dynamsoft.Twain, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.Twain.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.Twain.dll</HintPath>
</Reference> </Reference>
<Reference Include="Dynamsoft.WPF.Viewer, Version=8.0.0.510, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL"> <Reference Include="Dynamsoft.WPF.Viewer, Version=8.3.3.726, Culture=neutral, PublicKeyToken=298ad97013b423eb, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Dynamsoft\8.3.3\Dynamsoft.WPF.Viewer.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Dynamsoft\8.3.3\Dynamsoft.WPF.Viewer.dll</HintPath>
</Reference> </Reference>
<Reference Include="Ghostscript.NET"> <Reference Include="Ghostscript.NET, Version=1.2.1.0, Culture=neutral, PublicKeyToken=f85051de34525b59, processorArchitecture=MSIL">
<HintPath>..\..\..\dll\Ghostscript.NET.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>F:\PROGRAMMIERUNG\dll\Ghostscript.NET.dll</HintPath>
</Reference>
<Reference Include="Interop.Therefore.API">
<HintPath>F:\PROGRAMMIERUNG\dll\Interop.Therefore.API.dll</HintPath>
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference> </Reference>
<Reference Include="itextsharp, Version=5.5.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL"> <Reference Include="itextsharp, Version=5.5.5.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\itextsharp.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\itextsharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="McDull.Windows.Forms"> <Reference Include="McDull.Windows.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\dll\McDull.Windows.Forms.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>F:\PROGRAMMIERUNG\dll\McDull.Windows.Forms.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Office.Interop.Outlook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> <Reference Include="Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
<HintPath>F:\PROGRAMMIERUNG\dll\Microsoft.Office.Interop.Outlook.dll</HintPath>
</Reference> </Reference>
<Reference Include="NetSpell.SpellChecker"> <Reference Include="NetSpell.SpellChecker, Version=2.1.7.41329, Culture=neutral, PublicKeyToken=318b389f0db66e46">
<HintPath>..\..\..\dll\NetSpell.SpellChecker.DLL</HintPath> <SpecificVersion>False</SpecificVersion>
</Reference> <HintPath>F:\PROGRAMMIERUNG\dll\NetSpell.SpellChecker.DLL</HintPath>
<Reference Include="NumericBox">
<HintPath>..\..\..\dll\NumericBox.dll</HintPath>
</Reference>
<Reference Include="RichTextBoxEx">
<HintPath>..\..\..\dll\RichTextBoxEx.dll</HintPath>
</Reference> </Reference>
<Reference Include="Spire.License, Version=1.4.0.46, Culture=neutral, PublicKeyToken=b1144360237c8b3f, processorArchitecture=MSIL"> <Reference Include="Spire.License, Version=1.4.0.46, Culture=neutral, PublicKeyToken=b1144360237c8b3f, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.License.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.License.dll</HintPath>
</Reference> </Reference>
<Reference Include="Spire.Pdf, Version=8.1.4.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL"> <Reference Include="Spire.Pdf, Version=8.10.2.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.Pdf.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.Pdf.dll</HintPath>
</Reference> </Reference>
<Reference Include="Spire.PdfViewer.Forms, Version=7.1.4.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL"> <Reference Include="Spire.PdfViewer.Forms, Version=7.10.3.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\dll\Spire.PDF\2023\Spire.PdfViewer.Forms.dll</HintPath> <HintPath>F:\PROGRAMMIERUNG\dll\Spire.PDF\2023\Spire.PdfViewer.Forms.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
@@ -372,12 +375,19 @@
<Compile Include="Classes\cOffene_Posten_DVO.vb" /> <Compile Include="Classes\cOffene_Posten_DVO.vb" />
<Compile Include="Classes\cOriginalATR.vb" /> <Compile Include="Classes\cOriginalATR.vb" />
<Compile Include="Classes\cParkzeiten.vb" /> <Compile Include="Classes\cParkzeiten.vb" />
<Compile Include="Classes\cUeberstunden.vb" />
<Compile Include="frmErrorMeldung.Designer.vb"> <Compile Include="frmErrorMeldung.Designer.vb">
<DependentUpon>frmErrorMeldung.vb</DependentUpon> <DependentUpon>frmErrorMeldung.vb</DependentUpon>
</Compile> </Compile>
<Compile Include="frmErrorMeldung.vb"> <Compile Include="frmErrorMeldung.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.Designer.vb">
<DependentUpon>frmUeberstundenauszahlen.vb</DependentUpon>
</Compile>
<Compile Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\Resources.Designer.vb"> <Compile Include="My Project\Resources.Designer.vb">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@@ -765,6 +775,9 @@
<EmbeddedResource Include="Mitarbeiterverzeichnis\frmMitarbeitersuche.resx"> <EmbeddedResource Include="Mitarbeiterverzeichnis\frmMitarbeitersuche.resx">
<DependentUpon>frmMitarbeitersuche.vb</DependentUpon> <DependentUpon>frmMitarbeitersuche.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Mitarbeiterverzeichnis\frmUeberstundenauszahlen.resx">
<DependentUpon>frmUeberstundenauszahlen.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\Resources.resx"> <EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
@@ -1207,17 +1220,6 @@
<ItemGroup> <ItemGroup>
<None Include="Resources\aviso.ico" /> <None Include="Resources\aviso.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<COMReference Include="Therefore.API">
<Guid>{37687F89-8603-4E42-A5F4-4FBAB011D5F3}</Guid>
<VersionMajor>3</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\docAllgemein.png" /> <None Include="Resources\docAllgemein.png" />
</ItemGroup> </ItemGroup>