123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- 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
- {
- /// <summary>
- /// 审核状态控件,下拉列出该类表单的各个审核环节
- /// </summary>
- /// <param name="htmlHelper"></param>
- /// <param name="tableName">数据表名,用于决定具体的流程配置</param>
- /// <param name="dropdownListOptions">下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用</param>
- /// <param name="htmlAttributes">自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary<string, string> {
- /// { "style", "width: 100%;" }, { "name", "ddlUsers" }
- /// }
- /// </param>
- /// <returns></returns>
- public static MvcHtmlString ApproveStatusDropDownList(this HtmlHelper htmlHelper,
- string tableName,
- DropdownListOptions dropdownListOptions = null,
- System.Collections.Generic.IDictionary<string, string> 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);
- }
- /// <summary>
- /// 审核状态控件,下拉列出该类表单的各个审核环节
- /// </summary>
- /// <param name="htmlHelper"></param>
- /// <param name="tableName">数据表名,用于决定具体的流程配置</param>
- /// <param name="dropdownListOptions">下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用</param>
- /// <param name="htmlAttributes">自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary<string, string> {
- /// { "style", "width: 100%;" }, { "name", "ddlUsers" }
- /// }
- /// </param>
- /// <returns></returns>
- public static MvcHtmlString ApproveStatusNotStartEndDropDownList(this HtmlHelper htmlHelper,
- string tableName,
- DropdownListOptions dropdownListOptions = null,
- System.Collections.Generic.IDictionary<string, string> 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);
- }
- /// <summary>
- /// 审核状态控件,下拉列出该类表单的各个审核环节
- /// </summary>
- /// <param name="htmlHelper"></param>
- /// <param name="tableName">数据表名,用于决定具体的流程配置</param>
- /// <param name="dropdownListOptions">下拉菜单配置项,除数据源外,其他的下拉菜单配置项皆可用</param>
- /// <param name="htmlAttributes">自定义Html属性扩展,用Dictionary的方式定义,例如:new Dictionary<string, string> {
- /// { "style", "width: 100%;" }, { "name", "ddlUsers" }
- /// }
- /// </param>
- /// <returns></returns>
- public static MvcHtmlString ApproveStatusNotStartDropDownList(this HtmlHelper htmlHelper,
- string tableName,
- DropdownListOptions dropdownListOptions = null,
- System.Collections.Generic.IDictionary<string, string> 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);
- }
- }
- }
|