10.01.2016

This commit is contained in:
SchreiberM
2017-01-11 10:53:58 +01:00
parent 26812ffeb7
commit 03ae19ae3e
25 changed files with 666 additions and 390 deletions

View File

@@ -28,6 +28,17 @@ Public Class ClassHelper
End If
End If
End Function
Public Shared Function Convert_to_Database_Date(input As String)
Try
Dim dt As Date = CDate(input)
Dim result = dt.ToString("yyyy-MM-dd", Nothing)
Return result
Catch ex As Exception
ClassLogger.Add("Unexpected Error while converting value '" & input & "' to date(Convert_to_Database_Date)....." & ex.Message, False)
Return input
End Try
End Function
Public Shared Function Get_TempFilename()
'Eine tempfile generieren
Dim tempFilename = My.Computer.FileSystem.GetTempFileName()
@@ -216,13 +227,14 @@ Public Class ClassHelper
Try
Dim DeleteRecordSQL = String.Format("EXEC [dbo].[PRPMO_DELETE_RECORD] {0}, '{1}'", SELECTED_RECORD_ID, USER_USERNAME)
Dim result As Boolean = ClassDatabase.Execute_non_Query_withConn(DeleteRecordSQL, 1)
If result = False Then
Dim msg = "Der Datensatz '" & SELECTED_RECORD_ID & "' konnte nicht gelöscht werden. Überprüfen Sie das log"
If USER_LANGUAGE <> "de-DE" Then
msg = "The record '" & SELECTED_RECORD_ID & "' could not be deleted. Check the log"
End If
MsgBox(msg, MsgBoxStyle.Exclamation)
Else
ClassProxy.PRPROXY_RECORD_DEL(SELECTED_RECORD_ID, CURRENT_ENTITY_ID)
End If
Return result
@@ -231,19 +243,17 @@ Public Class ClassHelper
Return False
End Try
End Function
Public Shared Sub MSGBOX_Handler(type As String, Caption As String, lbl1 As String, txt1 As String, Optional lbl2 As String = "", Optional txt2 As String = "")
MSG_TYPE = type
MSG_TITLE = Caption
If lbl2 = String.Empty Then
MSG_LABLE2 = String.Empty
MSG_ERROR2 = String.Empty
Else
MSG_LABLE2 = lbl2
MSG_ERROR2 = txt2
Public Shared Sub MSGBOX_Handler(type As String, Caption As String, info1 As String, Optional info2 As String = "")
Dim msg = info1
If info2 <> "" Then
msg &= vbNewLine & vbNewLine & info2
End If
If type = "ERROR" Then
MessageBox.Show(Caption, msg, MessageBoxButtons.OK, MessageBoxIcon.Error)
ClassLogger.Add(msg, True)
ElseIf type = "INFO" Then
MessageBox.Show(Caption, msg, MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
MSG_LABLE1 = lbl1
MSG_ERROR1 = txt1
frmMessageBox.ShowDialog()
End Sub
End Class