Find control Name
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user