Positionsanpassung update/insert
This commit is contained in:
@@ -3988,10 +3988,10 @@ Public Class frmConstructor_Main
|
||||
Exit Sub
|
||||
End If
|
||||
If USER_PERSONIFIED_TEST = True Then
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "You are using ADDi in personified mode! Adding files is not allowed!")
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "You are using ADDI in personified mode! Adding files is not allowed!")
|
||||
Exit Sub
|
||||
End If
|
||||
If clsWindream.SESSION_CREATED = False Then
|
||||
If clsWindream.Create_Session = False Then
|
||||
ClassHelper.MSGBOX_Handler("INFO", "Attention", "Check Your windream-connection and restart ADDI afterwards.", "Could not create a windream session!")
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -4250,7 +4250,7 @@ Public Class frmConstructor_Main
|
||||
If ENTITY_LOADED = False = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If ClassControlCommandsUI.UpdateControlValue(FOLL_UP_DATE_CTRL_ID, RECORD_ID, dtpFollowUp.Value) = True Then
|
||||
If ClassControlCommandsUI.UpdateControlValue(FOLL_UP_DATE_CTRL_ID, RECORD_ID, dtpFollowUp.Value, CURRENT_ENTITY_ID) = True Then
|
||||
lblFollowUp_save.Text = "Follow Up saved - " & Now.ToString
|
||||
lblFollowUp_save.Visible = True
|
||||
'UpdRECORD_NEEDS_REFRESH(True)
|
||||
@@ -4264,7 +4264,7 @@ Public Class frmConstructor_Main
|
||||
If ENTITY_LOADED = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
If ClassControlCommandsUI.UpdateControlValue(FOLL_UP_DONE_CTRL_ID, RECORD_ID, chkFollowUp.Checked.ToString) = True Then
|
||||
If ClassControlCommandsUI.UpdateControlValue(FOLL_UP_DONE_CTRL_ID, RECORD_ID, chkFollowUp.Checked.ToString, CURRENT_ENTITY_ID) = True Then
|
||||
lblFollowUp_save.Text = "Follow Up saved - " & Now.ToString
|
||||
lblFollowUp_save.Visible = True
|
||||
' UpdRECORD_NEEDS_REFRESH(True)
|
||||
@@ -4659,15 +4659,16 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
' Wenn cId = 0, existiert noch kein wert für diese controlId/FormId Kombination
|
||||
If cId = 0 Then
|
||||
ClassControlCommandsUI.InsertControlValue(controlid, POS_RECORD_ID, e.Value)
|
||||
ClassControlCommandsUI.InsertControlValue(controlid, POS_RECORD_ID, e.Value, POS_ENTITY)
|
||||
Update_Status_Label(True, "Record was added!", EditState.Insert)
|
||||
Else
|
||||
ClassControlCommandsUI.UpdateControlValue(controlid, POS_RECORD_ID, e.Value)
|
||||
ClassControlCommandsUI.UpdateControlValue(controlid, POS_RECORD_ID, e.Value, POS_ENTITY)
|
||||
Update_Status_Label(True, "Record was updated!", EditState.Update)
|
||||
End If
|
||||
Else
|
||||
Update_Status_Label(False)
|
||||
End If
|
||||
Load_Pos_Data()
|
||||
Catch ex As Exception
|
||||
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in grvwGridPos_CellValueChanged: ", ex.Message)
|
||||
End Try
|
||||
@@ -5722,7 +5723,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
sql = String.Format("SELECT [dbo].[FNPMO_GETOBJECTCAPTION]('{0}','FORMVIEW_TITLE' + CONVERT(VARCHAR(5), FORM_VIEW_ID), {1}) AS 'CAPTION' " &
|
||||
"FROM VWPMO_CONSTRUCTOR_FORMS WHERE FORM_ID = {2}", USER_LANGUAGE, CURRENT_SCREEN_ID, node_tag.ToString)
|
||||
ENTITY_STRING = ClassDatabase.Execute_Scalar(sql)
|
||||
ENTITY_STRING = ClassDatabase.Execute_Scalar(sql, True)
|
||||
sql = String.Format("select count(guid) from TBPMO_CONTROL_ENTITY_LINK where ORIGIN_CTRL_ID in (SELECT GUID FROM TBPMO_CONTROL where FORM_ID = {0}) " &
|
||||
"AND LINKED_CTRL_ID IN (SELECT GUID FROM TBPMO_CONTROL where FORM_ID = {1})", ENTITY_ID, node_tag)
|
||||
Dim count = ClassDatabase.Execute_Scalar(sql, True)
|
||||
@@ -5743,10 +5744,15 @@ Public Class frmConstructor_Main
|
||||
Save_Grid_Layout()
|
||||
|
||||
For Each _RECORD As String In e.Data.GetData(GetType(String()))
|
||||
ClassLogger.Add(String.Format("Relinking entity of record '{0}' to entity '{1}'?", _RECORD, ENTITY_STRING.ToString), False)
|
||||
|
||||
Dim upd = String.Format("UPDATE TBPMO_RECORD SET FORM_ID = {0} where GUID = {1}", node_tag, _RECORD)
|
||||
If ClassDatabase.Execute_non_Query(upd) = True Then
|
||||
If DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED = True Then
|
||||
ClassDatabase.Execute_non_Query(upd, True)
|
||||
Dim del = String.Format("DELETE FROM TBPMO_ENTITY_TABLE{1} WHERE [Record-ID] = {0}", _RECORD, ENTITY_ID)
|
||||
ClassDatabase.Execute_non_Query(del, True)
|
||||
|
||||
End If
|
||||
msg = String.Format("ENTITY WAS CHANGED TO {0}-{1} by User: {2}", ENTITY_STRING, node_tag, USER_USERNAME)
|
||||
ClassHelper.InsertEssential_Log(_RECORD, "RECORD-ID", msg)
|
||||
@@ -5774,6 +5780,13 @@ Public Class frmConstructor_Main
|
||||
msg = String.Format("The record was successfully relinked with entity {0}", ENTITY_STRING.ToString)
|
||||
End If
|
||||
MsgBox(msg, MsgBoxStyle.Information)
|
||||
If DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED = True Then
|
||||
msg = "Sie benutzen einen Proxyserver. Die Daten des neu verlinkten Datensatzes werden Sie erst nach vollständiger Proxysynchronisation einsehen können!"
|
||||
If USER_LANGUAGE <> "de-DE" Then
|
||||
msg = String.Format("You are using a proxy-Server. The new linked record in entity '{0}' will only be displayed after a full synchronisation!", ENTITY_STRING)
|
||||
End If
|
||||
MsgBox(msg, MessageBoxIcon.Information)
|
||||
End If
|
||||
Load_Datafor_Entity()
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user