This project is read-only.

5. Decision (approval or not): Confirm if the user approves the specific process by the method to get variable value (Task).

VB .NET:

  1.         Public Class YesNoCheckRule
  2.             Implements IRule
  3.             Public Function Execute(ByVal variable As System.Collections.Generic.Dictionary(Of String, Object)) As String Implements HSDc.RingleFlow.Api.Rule.IRule.Execute
  4.                 Dim result As String = String.Empty
  5.                 If (Not variable.TryGetValue("submitResult", result)) Then
  6.                     result = "否"
  7.                 End If
  8.                 Return ResolveYesNoValue(result)
  9.             End Function
  10.            Private Function ResolveYesNoValue(ByVal value As String)
  11.                Dim result As String = String.Empty
  12.                Select Case value.ToLower
  13.                    Case "true"
  14.                        result = "是"
  15.                    Case "yes"
  16.                        result = "是"
  17.                    Case "是"
  18.                        result = "是"
  19.                    Case "false"
  20.                        result = "否"
  21.                    Case "no"
  22.                        result = "否"
  23.                    Case "否"
  24.                        result = "否"
  25.                End Select
  26.                Return result
  27.            End Function
  28.        End Class

 

Last edited Jun 25, 2012 at 11:14 AM by cathysung, version 2

Comments

No comments yet.