datelabel.cs

来自「基于DotNet的开源工作流引擎」· CS 代码 · 共 31 行

CS
31
字号
using System;
using NetBpm.Workflow.Delegation;

namespace NetBpm.Workflow.Delegation.Impl.Htmlformatter
{
	
	public class DateLabel:AbstractConfigurable, IHtmlFormatter
	{
		public System.String ObjectToHtml(Object valueObject, String parameterName, System.Web.HttpRequest request)
		{
			System.String html = null;
			
			if (valueObject != null)
			{
				String dateFormat=(String)GetConfiguration()["dateFormat"];
				html = ((System.DateTime) valueObject).ToString(dateFormat) + " (" + dateFormat + ")";
			}
			else
			{
				html = "";
			}
			
			return html;
		}
		
		public Object ParseHttpParameter(String text, System.Web.HttpRequest request)
		{
			return null;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?