JJ_11_17_letzte_änderungen

This commit is contained in:
JenneJ 2015-11-17 14:13:52 +01:00
parent 1454f8cd10
commit daee309cd7

View File

@ -1108,7 +1108,7 @@ Public Class frmForm_Constructor_Main
Check_FOLLOWUP_IsConfigured(CURRENT_FORM_ID)
End Select
'Load_Templates()
Load_Templates()
Me.Cursor = Cursors.Default
dataloaded = True
@ -1530,19 +1530,34 @@ Public Class frmForm_Constructor_Main
End Select
'DT_FU_Record = Nothing
'VerknüpfungenToolStripMenuItem.Enabled = True
Update_Record_Label(SELECTED_RECORD_ID)
'If FOLLOW_UPisActive = True Then Refresh_FollowUp_TabHeader()
'Refresh_CreatedChangedRecordByID(SelectedRecordID)
'Anzeige_Selected_Entity()
'Show_act_WFTask()
If FOLLOW_UPisActive = True Then Refresh_FollowUp_TabHeader()
Show_act_WFTask()
Get_RecordCounts_Nodes()
pnlDetails.Enabled = False
'Refresh_TaskOverview()
Refresh_TaskOverview()
End Sub
Private Sub Refresh_FollowUp_TabHeader()
Try
DT_FU_Record = ClassDatabase.Return_Datatable("select * from VWPMO_FOLLOW_UP_EMAIL_ENTITY_RECORD where Record_ID = " & CURRENT_RECORD_ID, "Refresh FollowUp TabHeader")
If IsNothing(DT_FU_Record) Then
TabFollowUp.Text = "Wiedervorlage (Nicht Abrufbar)"
Exit Sub
End If
If DT_FU_Record.Rows.Count = 0 Then
TabFollowUp.Text = "Wiedervorlage (Nicht aktiviert)"
Else
TabFollowUp.Text = "Wiedervorlage (Aktive Profile)"
End If
Catch ex As Exception
MsgBox("Error in Refresh_FollowUp_TabHeader:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Function Update_Record_OnChange() As String
' Record Speichern
@ -2214,7 +2229,7 @@ Public Class frmForm_Constructor_Main
tsslblWorkflowstate.BackColor = ColorTranslator.FromWin32(CInt(Colorstring))
Select Case tsslblWorkflowstate.BackColor
Case Color.Red
tsButtonShowWorkflowTasks.ForeColor = Color.White
tsslblWorkflowstate.ForeColor = Color.White
End Select
End If
@ -2356,6 +2371,55 @@ Public Class frmForm_Constructor_Main
End Sub
Sub Load_Templates()
Try
Dim sql As String = "SELECT * FROM VWPMO_TEMPLATE_ENTITY WHERE ENTITY_ID = " & CURRENT_FORM_ID & " ORDER BY TEMPLATE_NAME"
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql, "Load_Templates")
If Not IsNothing(DT) Then
If DT.Rows.Count > 0 Then
OfficeVorlagenToolStripMenuItem.Enabled = True
OfficeVorlagenToolStripMenuItem.DropDownItems.Clear()
For Each row As DataRow In DT.Rows
Dim item As ToolStripMenuItem = OfficeVorlagenToolStripMenuItem
Dim newItem As ToolStripMenuItem = New ToolStripMenuItem(row.Item("TEMPLATE_NAME").ToString, Nothing, AddressOf TemplateItem_Click)
newItem.Tag = row.Item("TEMPLATE_ID")
item.DropDownItems.Add(newItem) ' subitem.DropDownItems.Add(newItem)
Next
Else
OfficeVorlagenToolStripMenuItem.Enabled = False
End If
End If
Catch ex As Exception
MsgBox("Error in Load_Templates:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try
End Sub
Private Sub TemplateItem_Click(sender As Object, e As EventArgs)
Dim item As ToolStripMenuItem = DirectCast(sender, ToolStripMenuItem)
Dim TemplateID As Integer = Integer.Parse(item.Tag)
If CURRENT_RECORD_ID > 0 Then
Dim SOLLENTITY_ID = ClassDatabase.Execute_Scalar("SELECT ENTITY_ID FROM VWPMO_TEMPLATE_ENTITY WHERE TEMPLATE_ID = " & TemplateID)
Dim REC_ENTITY_ID = ClassDatabase.Execute_Scalar("SELECT FORM_ID FROM TBPMO_RECORD WHERE GUID = " & CURRENT_RECORD_ID)
If Not IsNothing(SOLLENTITY_ID) Then
If CInt(SOLLENTITY_ID) = REC_ENTITY_ID Then
Cursor = Cursors.WaitCursor
If ClassOfficeTemplate.Open_Word_Template(TemplateID, CURRENT_RECORD_ID) = True Then
RUN_WD_SEARCH(WD_Suche, "RECORD")
Update_Status_Label(True, "Vorlagen-Datei erfolgreich nach windream importiert!")
End If
Cursor = Cursors.Default
Else
MsgBox("Bitte wählen Sie nochmal einen Datensatz aus!", MsgBoxStyle.Exclamation)
End If
End If
Else
MsgBox("Bitte wählen Sie zuerst einen Datensatz aus.", MsgBoxStyle.Exclamation)
End If
End Sub
Sub Load_Level1()
Try
Dim sql As String = "SELECT * from VWPMO_CONSTRUCTOR_FORMS WHERE PARENT_ID = 0 AND CONSTRUCT_ID = " & CONSTRUCTORID & " ORDER BY SEQUENCE"