public ViewMessageModel(ViewMessageType type, string title, string message, string returnUrl = "/") { Type = type; Title = title; Message = message; ReturnUrl = returnUrl; }
public ViewMessageModel(ViewMessageType type, string title, string message, bool showLoginLink = false, bool showSupportLink = false, string returnUrl = "/", bool showContinueLink = false, string continueLink = "/", string continueLinkText = "Continue") { Type = type; Title = title; Message = message; ShowLoginLink = showLoginLink; ShowSupportLink = showSupportLink; ReturnUrl = returnUrl; ContinueLink = continueLink; ContinueLinkText = continueLinkText; ShowContinueLink = showContinueLink; }
public StoreException(string header, string content, ViewMessageType type) { Header = header; Content = content; Type = type; }
private static void ShowMessage(string header, string content, ViewMessageType type) { throw new StoreException(header, content, type); }
/// <summary> /// 构造函数 /// </summary> /// <param name="type"></param> /// <param name="content"></param> public ViewMessage(ViewMessageType type, string content) { Type = type; Content = content; }
public ViewMessage(string message, ViewMessageType viewMessageType) { Message = message; Type = viewMessageType; }
private void FlashMessage(ViewMessageType type, string message, params object[] args) { if (string.IsNullOrEmpty(message)) return; if (_flashMsgs == null) _flashMsgs = new List<ViewMessage>(); _flashMsgs.Add(new ViewMessage(type, string.Format(message, args))); TempData[Const.ViewMessageList] = _flashMsgs; }
public ViewMessageModel(string text, ViewMessageType type) { MessageType = type; Text = text; }
public static FormsAuthenticationResult WithMessage(this FormsAuthenticationResult result, Controller from, string text, ViewMessageType type) { from.TempData[FoundryController.VIEW_MESSAGE_KEY] = new ViewMessageModel(text, type); return result; }
public static ViewResult WithMessage(this ViewResult result, Controller from, string text, ViewMessageType type) { from.ViewData[FoundryController.VIEW_MESSAGE_KEY] = new ViewMessageModel(text, type); return result; }
public static RedirectToRouteResult WithMessage(this RedirectToRouteResult result, Controller from, string text, ViewMessageType type) { from.TempData[FoundryController.VIEW_MESSAGE_KEY] = new ViewMessageModel(text, type); return result; }