C# Class HermaFx.MvcDemo.AlertsBarExtensions

Allows delivering status information to users thru an status bar similiar to the one provided by ValidationSummary.
Partially inspired by http://completedevelopment.blogspot.com/2010/12/status-message-handling-in-mvc.html
显示文件 Open project: evicertia/HermaFx Class Usage Examples

Public Methods

Method Description
AddErrorMessage ( this @this, string message ) : void
AddInfoMessage ( this @this, string message ) : void
AddSuccessMessage ( this @this, string message ) : void
AddWarningMessage ( this @this, string message ) : void
AlertSummary ( this @this, string validationMessage = null, bool includePropertyErrors = true, object htmlAttributes = null ) : System.Web.Mvc.MvcHtmlString

Status (Info+Success+Alert or Errors if any) summary

Private Methods

Method Description
GetDataFor ( System.Web.Mvc.ViewContext context, BarData bar ) : IList
GetTempDataKeyFor ( BarData bar ) : string
_AddMessage ( TempDataDictionary tempData, BarData bar, string message ) : void
_AddMessages ( TempDataDictionary tempData, BarData bar, IEnumerable messages ) : void
_GetUserErrorMessageOrDefault ( System.Web.Mvc.ModelError error, System.Web.Mvc.ModelState modelState ) : string
_ParseModelState ( ModelStateDictionary modelstate ) : IEnumerable
_RenderStatusBar ( this @this, BarData bar, string message, bool includePropertyErrors, object htmlAttributes ) : System.Web.Mvc.MvcHtmlString

Method Details

AddErrorMessage() public static method

public static AddErrorMessage ( this @this, string message ) : void
@this this
message string
return void

AddInfoMessage() public static method

public static AddInfoMessage ( this @this, string message ) : void
@this this
message string
return void

AddSuccessMessage() public static method

public static AddSuccessMessage ( this @this, string message ) : void
@this this
message string
return void

AddWarningMessage() public static method

public static AddWarningMessage ( this @this, string message ) : void
@this this
message string
return void

AlertSummary() public static method

Status (Info+Success+Alert or Errors if any) summary
public static AlertSummary ( this @this, string validationMessage = null, bool includePropertyErrors = true, object htmlAttributes = null ) : System.Web.Mvc.MvcHtmlString
@this this
validationMessage string
includePropertyErrors bool
htmlAttributes object
return System.Web.Mvc.MvcHtmlString