Пример #1
0
 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;
        }
Пример #3
0
 public StoreException(string header, string content, ViewMessageType type)
 {
     Header  = header;
     Content = content;
     Type    = type;
 }
Пример #4
0
 private static void ShowMessage(string header, string content, ViewMessageType type)
 {
     throw new StoreException(header, content, type);
 }
Пример #5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="type"></param>
 /// <param name="content"></param>
 public ViewMessage(ViewMessageType type, string content)
 {
     Type = type;
     Content = content;
 }
Пример #6
0
 public ViewMessage(string message, ViewMessageType viewMessageType)
 {
     Message = message;
     Type    = viewMessageType;
 }
Пример #7
0
 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;
 }
Пример #8
0
 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;
 }
Пример #10
0
 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;
 }
Пример #11
0
 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;
 }