Find control Name

This commit is contained in:
Jonathan Jenne
2019-08-07 16:05:53 +02:00
parent 43d3ba5ef2
commit aa84e977b9
22 changed files with 2556 additions and 179 deletions

View File

@@ -156,6 +156,31 @@ Public Class ctrlApplicationAssignment
End Try
End Function
Public Function Control_CreateAssignment(ProfileId As Integer, WindowId As Integer)
Dim oForm As New frmControlCapture()
Dim oResult = oForm.ShowDialog()
If oResult = DialogResult.OK Then
Try
Dim oControlTitle As String = GetSQLFriendlyString(oForm.ControlName)
Dim oProcessName As String = oForm.ProcessName
If oControlTitle <> "" Then
Dim insert = String.Format("INSERT INTO TBCW_PROF_REL_CONTROL (PROFILE_ID, DESCRIPTION, PROCESS_NAME, REGEX, ADDED_WHO) VALUES ({0}, '{1}', '{2}','^{3}$','{4}')", ProfileId, oProcessName, oProcessName, oControlTitle, Environment.UserName)
If Database.ExecuteNonQuery(insert) = False Then
Return False
End If
End If
Window_Load()
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End If
End Function
Private Sub GridViewProcessProfile_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles GridViewProcessProfile.FocusedRowChanged
If e.FocusedRowHandle < 0 Then
Exit Sub
@@ -177,8 +202,5 @@ Public Class ctrlApplicationAssignment
End Function
Public Class RegexEdit
Inherits BaseEdit
End Class
End Class