MS_12.03.2016
This commit is contained in:
@@ -26,77 +26,77 @@
|
||||
Public Sub SetFormName(name As String)
|
||||
Me.lblFormName.Text = "Name: " & name & " - Form-ID: " & CURRENT_FORM_ID
|
||||
End Sub
|
||||
Public Sub Check_Document_Config(FORM_ID As Integer)
|
||||
Try
|
||||
Dim res = ClassDatabase.Execute_Scalar("SELECT DOCUMENT_VIEW FROM TBPMO_FORM_VIEW WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
'Public Sub Check_Document_Config(FORM_ID As Integer)
|
||||
' Try
|
||||
' Dim res = ClassDatabase.Execute_Scalar("SELECT DOCUMENT_VIEW FROM TBPMO_FORM_VIEW WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
|
||||
If res = True Then
|
||||
chkbxdocview.Checked = True
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT WINDREAM_SEARCH,SEARCH_PATTERN1,SEARCH_PATTERN2,SEARCH_PATTERN3,SEARCH_PATTERN4,SEARCH_PATTERN5 FROM TBPMO_FORM_VIEW WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
If DT.Rows.Count = 1 Then
|
||||
If Not IsDBNull(DT.Rows(0).Item(0)) Then
|
||||
txtWindreamsuche.Text = ClassHelper.CheckDBNull(DT.Rows(0).Item(0), "String")
|
||||
'Form-ID (Entity)
|
||||
'Record -ID
|
||||
Dim result
|
||||
result = ClassHelper.CheckDBNull(DT.Rows(0).Item(1), "String")
|
||||
If result <> "" Then
|
||||
If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
cmbSearchPattern1.SelectedIndex = 1
|
||||
Else
|
||||
cmbSearchPattern1.SelectedIndex = 0
|
||||
End If
|
||||
End If
|
||||
result = ClassHelper.CheckDBNull(DT.Rows(0).Item(2), "String")
|
||||
If result <> "" Then
|
||||
If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
cmbSearchPattern2.SelectedIndex = 1
|
||||
Else
|
||||
cmbSearchPattern2.SelectedIndex = 0
|
||||
End If
|
||||
End If
|
||||
result = ClassHelper.CheckDBNull(DT.Rows(0).Item(3), "String")
|
||||
If result <> "" Then
|
||||
If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
cmbSearchPattern3.SelectedIndex = 1
|
||||
Else
|
||||
cmbSearchPattern3.SelectedIndex = 0
|
||||
End If
|
||||
End If
|
||||
result = ClassHelper.CheckDBNull(DT.Rows(0).Item(4), "String")
|
||||
If result <> "" Then
|
||||
If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
cmbSearchPattern4.SelectedIndex = 1
|
||||
Else
|
||||
cmbSearchPattern4.SelectedIndex = 0
|
||||
End If
|
||||
End If
|
||||
result = ClassHelper.CheckDBNull(DT.Rows(0).Item(5), "String")
|
||||
If result <> "" Then
|
||||
If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
cmbSearchPattern5.SelectedIndex = 1
|
||||
Else
|
||||
cmbSearchPattern5.SelectedIndex = 0
|
||||
End If
|
||||
End If
|
||||
'cmbSearchPattern1.SelectedIndex = cmbSearchPattern1.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(1), "String"))
|
||||
'cmbSearchPattern2.SelectedIndex = cmbSearchPattern2.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(2), "String"))
|
||||
'cmbSearchPattern3.SelectedIndex = cmbSearchPattern3.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(3), "String"))
|
||||
'cmbSearchPattern4.SelectedIndex = cmbSearchPattern4.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(4), "String"))
|
||||
'cmbSearchPattern5.SelectedIndex = cmbSearchPattern5.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(5), "String"))
|
||||
End If
|
||||
End If
|
||||
Me.grpbxDocumentView.Visible = True
|
||||
Else
|
||||
chkbxdocview.Visible = True
|
||||
chkbxdocview.Checked = False
|
||||
Me.grpbxDocumentView.Visible = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Check_Document_Config:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
' If res = True Then
|
||||
' chkbxdocview.Checked = True
|
||||
' Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT WINDREAM_SEARCH,SEARCH_PATTERN1,SEARCH_PATTERN2,SEARCH_PATTERN3,SEARCH_PATTERN4,SEARCH_PATTERN5 FROM TBPMO_FORM_VIEW WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
' If DT.Rows.Count = 1 Then
|
||||
' If Not IsDBNull(DT.Rows(0).Item(0)) Then
|
||||
' txtWindreamsuche.Text = ClassHelper.CheckDBNull(DT.Rows(0).Item(0), "String")
|
||||
' 'Form-ID (Entity)
|
||||
' 'Record -ID
|
||||
' Dim result
|
||||
' result = ClassHelper.CheckDBNull(DT.Rows(0).Item(1), "String")
|
||||
' If result <> "" Then
|
||||
' If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
' cmbSearchPattern1.SelectedIndex = 1
|
||||
' Else
|
||||
' cmbSearchPattern1.SelectedIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
' result = ClassHelper.CheckDBNull(DT.Rows(0).Item(2), "String")
|
||||
' If result <> "" Then
|
||||
' If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
' cmbSearchPattern2.SelectedIndex = 1
|
||||
' Else
|
||||
' cmbSearchPattern2.SelectedIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
' result = ClassHelper.CheckDBNull(DT.Rows(0).Item(3), "String")
|
||||
' If result <> "" Then
|
||||
' If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
' cmbSearchPattern3.SelectedIndex = 1
|
||||
' Else
|
||||
' cmbSearchPattern3.SelectedIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
' result = ClassHelper.CheckDBNull(DT.Rows(0).Item(4), "String")
|
||||
' If result <> "" Then
|
||||
' If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
' cmbSearchPattern4.SelectedIndex = 1
|
||||
' Else
|
||||
' cmbSearchPattern4.SelectedIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
' result = ClassHelper.CheckDBNull(DT.Rows(0).Item(5), "String")
|
||||
' If result <> "" Then
|
||||
' If result.ToString.ToUpper.Contains("RECORD") Then
|
||||
' cmbSearchPattern5.SelectedIndex = 1
|
||||
' Else
|
||||
' cmbSearchPattern5.SelectedIndex = 0
|
||||
' End If
|
||||
' End If
|
||||
' 'cmbSearchPattern1.SelectedIndex = cmbSearchPattern1.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(1), "String"))
|
||||
' 'cmbSearchPattern2.SelectedIndex = cmbSearchPattern2.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(2), "String"))
|
||||
' 'cmbSearchPattern3.SelectedIndex = cmbSearchPattern3.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(3), "String"))
|
||||
' 'cmbSearchPattern4.SelectedIndex = cmbSearchPattern4.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(4), "String"))
|
||||
' 'cmbSearchPattern5.SelectedIndex = cmbSearchPattern5.FindStringExact(ClassHelper.CheckDBNull("@" & DT.Rows(0).Item(5), "String"))
|
||||
' End If
|
||||
' End If
|
||||
' Me.grpbxDocumentView.Visible = True
|
||||
' Else
|
||||
' chkbxdocview.Visible = True
|
||||
' chkbxdocview.Checked = False
|
||||
' Me.grpbxDocumentView.Visible = False
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in Check_Document_Config:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
|
||||
#Region "+++++ Drag Drop Funktionen +++++"
|
||||
@@ -140,6 +140,7 @@
|
||||
CtrlBuilder.AddRadioButton(0, "rb" & random, "Bezeichn. defnieren", False, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, False, 0, 0, True, False, False, Parent)
|
||||
' Aktuelles Control in die Datenbank speichern
|
||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||
|
||||
Case "pb"
|
||||
CtrlBuilder.AddPictureBox(0, "pb" & random, 0, 0, 0, 0, True, False, False, Parent)
|
||||
' Aktuelles Control in die Datenbank speichern
|
||||
@@ -266,7 +267,7 @@
|
||||
Dim width = ClassDatabase.Execute_Scalar("SELECT WIDTH FROM TBPMO_FORM_VIEW WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID)
|
||||
Dim name = ClassDatabase.Execute_Scalar(NAME_SQL)
|
||||
Dim title = ClassDatabase.Execute_Scalar(TITLE_SQL)
|
||||
Check_Document_Config(CURRENT_FORM_ID)
|
||||
' Check_Document_Config(CURRENT_FORM_ID)
|
||||
If Not IsDBNull(Height) Then
|
||||
If Height > 100 Then
|
||||
Me.pnlDesigner.Height = Height
|
||||
@@ -639,9 +640,9 @@
|
||||
|
||||
Dim noerror As Boolean = False
|
||||
Dim sql = "EXECUTE PRPMO_CREATE_SQL " & CURRENT_FORM_ID
|
||||
noerror = ClassDatabase.Execute_non_Query(sql)
|
||||
noerror = ClassDatabase.Execute_non_Query_withConn(sql, 1)
|
||||
sql = "EXECUTE PRPMO_CREATE_TEMP_VIEWS"
|
||||
noerror = ClassDatabase.Execute_non_Query(sql)
|
||||
noerror = ClassDatabase.Execute_non_Query_withConn(sql, 1)
|
||||
Return noerror
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in btnexecute_CreateViewSql:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -656,71 +657,71 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnWindreamsuche_Click(sender As Object, e As EventArgs) Handles btnWindreamsuche.Click
|
||||
If Not Me.txtWindreamsuche.Text = "" Then
|
||||
Me.OFDWindreamsuche.FileName = Me.txtWindreamsuche.Text
|
||||
End If
|
||||
'Private Sub btnWindreamsuche_Click(sender As Object, e As EventArgs)
|
||||
' If Not Me.txtWindreamsuche.Text = "" Then
|
||||
' Me.OFDWindreamsuche.FileName = Me.txtWindreamsuche.Text
|
||||
' End If
|
||||
|
||||
If Me.OFDWindreamsuche.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
Me.txtWindreamsuche.Text = Me.OFDWindreamsuche.FileName
|
||||
End If
|
||||
End Sub
|
||||
Private Sub btnsavedocView_Click(sender As Object, e As EventArgs) Handles btnsavedocView.Click
|
||||
Try
|
||||
Dim SP1, SP2, SP3, SP4, SP5
|
||||
If cmbSearchPattern1.SelectedIndex <> -1 Then
|
||||
SP1 = "@" & cmbSearchPattern1.Text
|
||||
Else
|
||||
SP1 = ""
|
||||
End If
|
||||
If cmbSearchPattern2.SelectedIndex <> -1 Then
|
||||
SP2 = "@" & cmbSearchPattern2.Text
|
||||
Else
|
||||
SP2 = ""
|
||||
End If
|
||||
If cmbSearchPattern3.SelectedIndex <> -1 Then
|
||||
SP3 = "@" & cmbSearchPattern3.Text
|
||||
Else
|
||||
SP3 = ""
|
||||
End If
|
||||
If cmbSearchPattern4.SelectedIndex <> -1 Then
|
||||
SP4 = "@" & cmbSearchPattern4.Text
|
||||
Else
|
||||
SP4 = ""
|
||||
End If
|
||||
If cmbSearchPattern5.SelectedIndex <> -1 Then
|
||||
SP5 = "@" & cmbSearchPattern5.Text
|
||||
Else
|
||||
SP5 = ""
|
||||
End If
|
||||
Dim sql = "UPDATE TBPMO_FORM_VIEW SET WINDREAM_SEARCH = '" & txtWindreamsuche.Text & "',SEARCH_PATTERN1 = '" & SP1 & "',SEARCH_PATTERN2= '" & SP2 & "',SEARCH_PATTERN3= '" & SP3 & _
|
||||
"',SEARCH_PATTERN4 = '" & SP4 & "',SEARCH_PATTERN5 = '" & SP5 & "', CHANGED_WHO = '" & Environment.UserName & "' where FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
tsstatus.Text = "Document-View properties changed - " & Now
|
||||
tsstatus.Visible = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Save DocView-properties:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
tsstatus.Visible = False
|
||||
End Try
|
||||
' If Me.OFDWindreamsuche.ShowDialog = Windows.Forms.DialogResult.OK Then
|
||||
' Me.txtWindreamsuche.Text = Me.OFDWindreamsuche.FileName
|
||||
' End If
|
||||
'End Sub
|
||||
'Private Sub btnsavedocView_Click(sender As Object, e As EventArgs)
|
||||
' Try
|
||||
' Dim SP1, SP2, SP3, SP4, SP5
|
||||
' If cmbSearchPattern1.SelectedIndex <> -1 Then
|
||||
' SP1 = "@" & cmbSearchPattern1.Text
|
||||
' Else
|
||||
' SP1 = ""
|
||||
' End If
|
||||
' If cmbSearchPattern2.SelectedIndex <> -1 Then
|
||||
' SP2 = "@" & cmbSearchPattern2.Text
|
||||
' Else
|
||||
' SP2 = ""
|
||||
' End If
|
||||
' If cmbSearchPattern3.SelectedIndex <> -1 Then
|
||||
' SP3 = "@" & cmbSearchPattern3.Text
|
||||
' Else
|
||||
' SP3 = ""
|
||||
' End If
|
||||
' If cmbSearchPattern4.SelectedIndex <> -1 Then
|
||||
' SP4 = "@" & cmbSearchPattern4.Text
|
||||
' Else
|
||||
' SP4 = ""
|
||||
' End If
|
||||
' If cmbSearchPattern5.SelectedIndex <> -1 Then
|
||||
' SP5 = "@" & cmbSearchPattern5.Text
|
||||
' Else
|
||||
' SP5 = ""
|
||||
' End If
|
||||
' Dim sql = "UPDATE TBPMO_FORM_VIEW SET WINDREAM_SEARCH = '" & txtWindreamsuche.Text & "',SEARCH_PATTERN1 = '" & SP1 & "',SEARCH_PATTERN2= '" & SP2 & "',SEARCH_PATTERN3= '" & SP3 & _
|
||||
' "',SEARCH_PATTERN4 = '" & SP4 & "',SEARCH_PATTERN5 = '" & SP5 & "', CHANGED_WHO = '" & Environment.UserName & "' where FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
' If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||
' tsstatus.Text = "Document-View properties changed - " & Now
|
||||
' tsstatus.Visible = True
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error in Save DocView-properties:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' tsstatus.Visible = False
|
||||
' End Try
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Private Sub chkbxdocview_CheckedChanged(sender As Object, e As EventArgs) Handles chkbxdocview.CheckedChanged
|
||||
If formloaded = True Then
|
||||
Dim sql
|
||||
If chkbxdocview.Checked = True Then
|
||||
sql = "UPDATE TBPMO_FORM_VIEW SET DOCUMENT_VIEW = 1, CHANGED_WHO = '" & Environment.UserName & "' WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
Else
|
||||
sql = "UPDATE TBPMO_FORM_VIEW SET DOCUMENT_VIEW = 0, CHANGED_WHO = '" & Environment.UserName & "' WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
End If
|
||||
If ClassDatabase.Execute_non_Query(sql) = False Then
|
||||
MsgBox("Fehler bei Update Document-View - Check log", MsgBoxStyle.Critical)
|
||||
End If
|
||||
Check_Document_Config(CURRENT_FORM_ID)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
'Private Sub chkbxdocview_CheckedChanged(sender As Object, e As EventArgs)
|
||||
' If formloaded = True Then
|
||||
' Dim sql
|
||||
' If chkbxdocview.Checked = True Then
|
||||
' sql = "UPDATE TBPMO_FORM_VIEW SET DOCUMENT_VIEW = 1, CHANGED_WHO = '" & Environment.UserName & "' WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
' Else
|
||||
' sql = "UPDATE TBPMO_FORM_VIEW SET DOCUMENT_VIEW = 0, CHANGED_WHO = '" & Environment.UserName & "' WHERE FORM_ID = " & CURRENT_FORM_ID & " and SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
' End If
|
||||
' If ClassDatabase.Execute_non_Query(sql) = False Then
|
||||
' MsgBox("Fehler bei Update Document-View - Check log", MsgBoxStyle.Critical)
|
||||
' End If
|
||||
' Check_Document_Config(CURRENT_FORM_ID)
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Private Sub frmLevel_Designer_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
|
||||
Reference in New Issue
Block a user