Untitled
vbnet
posted: Jan, 23rd 2012 | jump to bottom
Imports System Imports System.Collections.Generic Imports System.Data Imports System.Data.SqlClient Imports System.Text Imports System.Workflow.ComponentModel Imports Laserfiche.Workflow.Activities Imports Laserfiche.Custom.Activities Imports Laserfiche.Workflow.ComponentModel Imports LFSO83Lib Namespace RenameEntry Public Class RenameEntryActivity Inherits LaserficheActivity83 Private privateName As String Public Property publicName As String Get Return privateName End Get Set(ByVal value As String) privateName = value End Set End Property Private privateConvertToUpperCase Public Property publicConvertToUpperCase As Boolean Get Return privateConvertToUpperCase End Get Set(ByVal value As Boolean) privateConvertToUpperCase = value End Set End Property ''' <summary> ''' Called when the activity is run by the workflow server. Implement the logic of your activity in this method. ''' Access methods for setting tokens, getting token values, and other functions from the base class or the execution ''' context parameter. ''' </summary> Protected Overrides Function OnExecuteCode(ByVal context As Laserfiche.Workflow.ComponentModel.LaserficheExecutionContext83) As System.Workflow.ComponentModel.ActivityExecutionStatus Dim database As ILFDatabase = context.Connection.Repository Dim NewName As String = Me.ResolveTokensInText(context.Context, publicName) If publicConvertToUpperCase = True Then NewName = NewName.ToUpper End If Dim Entry As ILFEntry = context.Entry Entry.Name = NewName Return MyBase.OnExecuteCode(context) End Function End Class End Namespace
37 views




