jj 15.02.16 Id beim einfügen des controls nachtragen
This commit is contained in:
parent
8016ae977e
commit
1819157b56
@ -82,6 +82,7 @@
|
||||
SQL = "SELECT MAX(GUID) FROM TBPMO_CONTROL"
|
||||
Dim GUID = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
|
||||
Return InsertControlScreen(GUID, control, CURRENT_FORM_ID)
|
||||
Else
|
||||
Throw New Exception()
|
||||
@ -94,7 +95,7 @@
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function InsertControlScreen(guid As Integer, control As Control, CURRENT_FORM_ID As Integer)
|
||||
Public Shared Function InsertControlScreen(guid As Integer, ByRef control As Control, CURRENT_FORM_ID As Integer)
|
||||
Try
|
||||
Dim CurrentType As String = control.GetType.ToString
|
||||
Dim SQL As String
|
||||
@ -124,6 +125,11 @@
|
||||
SQL = "INSERT TBPMO_CONTROL_SCREEN (CONTROL_ID, SCREEN_ID, CONTROL_TEXT, X_LOC, Y_LOC, HEIGHT, WIDTH) VALUES (" & guid & ", 1, '" & CONTROL_TEXT & "', " & X_LOC & ", " & Y_LOC & ", " & HEIGHT & ", " & WIDTH & ")"
|
||||
|
||||
If ClassDatabase.Execute_non_Query(SQL, True) Then
|
||||
' Die Guid in die Metadaten des Controls zurückschreiben
|
||||
Dim metadata = DirectCast(control.Tag, ClassControlMetadata)
|
||||
metadata.Id = guid
|
||||
control.Tag = metadata
|
||||
|
||||
SQL = "SELECT MAX(GUID) FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & guid & " AND SCREEN_ID = " & CURRENT_SCREEN_ID
|
||||
Dim ctrl_screen_Id = ClassDatabase.Execute_Scalar(SQL, True)
|
||||
SQL = String.Format("INSERT INTO TBPMO_CONTROL_LANGUAGE (LANGUAGE_TYPE,CONTROL_SCREEN_ID,CAPTION,ADDED_WHO) VALUES ('{0}',{1},'{2}','{3}')", USER_LANGUAGE, ctrl_screen_Id, CONTROL_TEXT, Environment.UserName)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user