evaluationinput.cs
来自「工作流的基本资料(文档资料」· CS 代码 · 共 49 行
CS
49 行
using System;
using NetBpm.Workflow.Delegation;
using NetBpm.Workflow.Definition.Attr;
namespace NetBpm.Workflow.Delegation.Impl.Htmlformatter
{
public class EvaluationInput:AbstractConfigurable, IHtmlFormatter
{
public String ObjectToHtml(System.Object valueObject, System.String parameterName, System.Web.HttpRequest request)
{
System.Text.StringBuilder htmlBuffer = new System.Text.StringBuilder();
htmlBuffer.Append("<table border=0 cellspacing=0 cellpadding=0><tr><td nowrap style=\"background-color:transparent;\">");
htmlBuffer.Append("<input type=radio name=\"");
htmlBuffer.Append(parameterName);
htmlBuffer.Append("\" value=\"");
htmlBuffer.Append(Evaluation.APPROVE);
htmlBuffer.Append("\">");
htmlBuffer.Append(" approve");
htmlBuffer.Append("</td></tr><tr><td nowrap style=\"background-color:transparent;\">");
htmlBuffer.Append("<input type=radio name=\"");
htmlBuffer.Append(parameterName);
htmlBuffer.Append("\" value=\"");
htmlBuffer.Append(Evaluation.DISAPPROVE);
htmlBuffer.Append("\">");
htmlBuffer.Append(" disapprove");
htmlBuffer.Append("</td></tr></table>");
return htmlBuffer.ToString();
}
public Object ParseHttpParameter(System.String text, System.Web.HttpRequest request)
{
System.Object evaluationResult = null;
try
{
evaluationResult = Evaluation.ParseEvaluation(text);
}
catch (System.ArgumentException e)
{
throw new System.FormatException("couldn't parse the Evaluation from value " + text +" exception message: "+e.Message);
}
return evaluationResult;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?