using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Autofac;
using Bowin.Web.Controls.Mvc;
using EMIS.Utility;
using EMIS.CommonLogic.SystemServices;
using EMIS.ViewModel.SystemView;
namespace EMIS.Web.Controls
{
public static class ApproveStatusExtensions
{
///
/// 审核状态控件,下拉列出该类表单的各个审核环节
///
///
/// 数据表名,用于决定具体的流程配置
/// 下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用
/// 自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary {
/// { "style", "width: 100%;" }, { "name", "ddlUsers" }
/// }
///
///
public static MvcHtmlString ApproveStatusDropDownList(this HtmlHelper htmlHelper,
string tableName,
DropdownListOptions dropdownListOptions = null,
System.Collections.Generic.IDictionary htmlAttributes = null)
{
if (dropdownListOptions == null)
dropdownListOptions = new DropdownListOptions();
dropdownListOptions.ItemSourceUrl = UrlHelper.GenerateContentUrl("~/Common/ApproveStatusDropDown?tableName="
+ tableName, htmlHelper.ViewContext.HttpContext);
if (dropdownListOptions.SelectedValue == null)
{
dropdownListOptions.SelectedValue = DropdownList.PLEASE_SELECT.ToString();
}
return htmlHelper.DropdownList(dropdownListOptions, htmlAttributes);
}
///
/// 审核状态控件,下拉列出该类表单的各个审核环节
///
///
/// 数据表名,用于决定具体的流程配置
/// 下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用
/// 自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary {
/// { "style", "width: 100%;" }, { "name", "ddlUsers" }
/// }
///
///
public static MvcHtmlString ApproveStatusNotStartEndDropDownList(this HtmlHelper htmlHelper,
string tableName,
DropdownListOptions dropdownListOptions = null,
System.Collections.Generic.IDictionary htmlAttributes = null)
{
if (dropdownListOptions == null)
dropdownListOptions = new DropdownListOptions();
dropdownListOptions.ItemSourceUrl = UrlHelper.GenerateContentUrl("~/Common/ApproveStatusNotStartEndDropDown?tableName="
+ tableName, htmlHelper.ViewContext.HttpContext);
if (dropdownListOptions.SelectedValue == null)
{
dropdownListOptions.SelectedValue = DropdownList.PLEASE_SELECT.ToString();
}
return htmlHelper.DropdownList(dropdownListOptions, htmlAttributes);
}
///
/// 审核状态控件,下拉列出该类表单的各个审核环节
///
///
/// 数据表名,用于决定具体的流程配置
/// 下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用
/// 自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary {
/// { "style", "width: 100%;" }, { "name", "ddlUsers" }
/// }
///
///
public static MvcHtmlString ApproveStatusNotStartDropDownList(this HtmlHelper htmlHelper,
string tableName,
DropdownListOptions dropdownListOptions = null,
System.Collections.Generic.IDictionary htmlAttributes = null)
{
if (dropdownListOptions == null)
dropdownListOptions = new DropdownListOptions();
dropdownListOptions.ItemSourceUrl = UrlHelper.GenerateContentUrl("~/Common/ApproveStatusNotStartDropDown?tableName="
+ tableName, htmlHelper.ViewContext.HttpContext);
if (dropdownListOptions.SelectedValue == null)
{
dropdownListOptions.SelectedValue = DropdownList.PLEASE_SELECT.ToString();
}
return htmlHelper.DropdownList(dropdownListOptions, htmlAttributes);
}
}
}