Merge branch 'master' of http://172.24.11.74:90/scm/git/RecordOrganizer
This commit is contained in:
@@ -543,12 +543,27 @@ Public Class ClassControlCommandsUI
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else ' Update Control
|
Else ' Update Control
|
||||||
If Not IsNothing(CONTROL_VALUE) Then
|
If TypeOf ctrl Is DevExpress.XtraEditors.DateEdit And (IsNothing(CONTROL_VALUE) Or CONTROL_VALUE = String.Empty) Then
|
||||||
Dim sw2 As New SW("UpdateControlValue")
|
|
||||||
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE, CURRENT_ENTITY_ID)
|
Dim sql As String = $"DELETE FROM TBPMO_CONTROL_VALUE WHERE RECORD_ID = {RecordID} AND CONTROL_ID = {CONTROL_ID}"
|
||||||
sw2.Done()
|
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||||
|
If LICENSE_PROXY = True Or clsDatabase.DB_PROXY_INITIALIZED = True Then
|
||||||
|
ClassDatabase.Execute_non_Query(sql, True)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
If Not IsNothing(CONTROL_VALUE) Then
|
||||||
|
Dim sw2 As New SW("UpdateControlValue")
|
||||||
|
UpdateControlValue(CONTROL_ID, RecordID, CONTROL_VALUE, CURRENT_ENTITY_ID)
|
||||||
|
sw2.Done()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
sw.Done()
|
sw.Done()
|
||||||
@@ -624,7 +639,7 @@ Public Class ClassControlCommandsUI
|
|||||||
Case "DateEdit"
|
Case "DateEdit"
|
||||||
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
|
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
|
||||||
|
|
||||||
If IsDBNull(Value) Then
|
If IsDBNull(Value) Or IsNothing(Value) Then
|
||||||
Return ""
|
Return ""
|
||||||
Else
|
Else
|
||||||
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
|
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
Imports Oracle.ManagedDataAccess.Client
|
Imports Oracle.ManagedDataAccess.Client
|
||||||
Imports System.Data.Odbc
|
Imports System.Data.Odbc
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
Public Class ClassDatabase
|
Public Class ClassDatabase
|
||||||
Private Shared connectionString As String
|
Private Shared connectionString As String
|
||||||
|
|
||||||
@@ -16,6 +18,35 @@ Public Class ClassDatabase
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CreateRecord_New(formId As Integer, Optional UseProxy As Boolean = False)
|
||||||
|
Dim SQLconnect As New SqlClient.SqlConnection
|
||||||
|
|
||||||
|
If UseProxy = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||||
|
SQLconnect.ConnectionString = ClassProxy.MyPROXYConnectionString
|
||||||
|
Else
|
||||||
|
SQLconnect.ConnectionString = ClassDatabase.connectionString
|
||||||
|
End If
|
||||||
|
|
||||||
|
Using cmd As New SqlCommand("PRPMO_CREATE_RECORD", SQLconnect)
|
||||||
|
|
||||||
|
cmd.CommandType = CommandType.StoredProcedure
|
||||||
|
cmd.Parameters.AddWithValue("@pFORM_ID", formId)
|
||||||
|
cmd.Parameters.AddWithValue("@pADDED_WHO", Environment.UserName)
|
||||||
|
cmd.Parameters.Add("@pRESULT", SqlDbType.Int)
|
||||||
|
cmd.Parameters("@pRESULT").Direction = ParameterDirection.Output
|
||||||
|
|
||||||
|
SQLconnect.Open()
|
||||||
|
cmd.ExecuteNonQuery()
|
||||||
|
SQLconnect.Close()
|
||||||
|
|
||||||
|
Dim GUID As Integer = cmd.Parameters("@pRESULT").Value
|
||||||
|
|
||||||
|
Return GUID
|
||||||
|
End Using
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Shared Function GetConnectionString(id As Integer)
|
Public Shared Function GetConnectionString(id As Integer)
|
||||||
Dim connectionString As String = ""
|
Dim connectionString As String = ""
|
||||||
Try
|
Try
|
||||||
@@ -32,7 +63,7 @@ Public Class ClassDatabase
|
|||||||
' connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
' connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||||
Case "Oracle"
|
Case "Oracle"
|
||||||
If DTConnection.Rows(0).Item("BEMERKUNG").ToString.Contains("without tnsnames") Then
|
If DTConnection.Rows(0).Item("BEMERKUNG").ToString.Contains("without tnsnames") Then
|
||||||
connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & DTConnection.Rows(0).Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & _
|
connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & DTConnection.Rows(0).Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" &
|
||||||
DTConnection.Rows(0).Item("DATENBANK") & ")));User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
DTConnection.Rows(0).Item("DATENBANK") & ")));User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||||
Else
|
Else
|
||||||
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Persist Security Info=True;User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";Unicode=True"
|
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Persist Security Info=True;User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";Unicode=True"
|
||||||
@@ -226,6 +257,7 @@ Public Class ClassDatabase
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function Execute_non_Query_withConn(ExecuteCMD As String, ConnID As Integer)
|
Public Shared Function Execute_non_Query_withConn(ExecuteCMD As String, ConnID As Integer)
|
||||||
Try
|
Try
|
||||||
Dim sw As New SW("Execute_non_Query_withConn: " & ExecuteCMD)
|
Dim sw As New SW("Execute_non_Query_withConn: " & ExecuteCMD)
|
||||||
|
|||||||
Reference in New Issue
Block a user