bugs fix
This commit is contained in:
parent
599e9a8865
commit
84f9f63407
44 changed files with 560 additions and 92 deletions
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using WebsitePanel.WebDavPortal.Models.Common;
|
||||
using WebsitePanel.WebDavPortal.Models.Common.Enums;
|
||||
|
||||
namespace WebsitePanel.WebDavPortal.Controllers
|
||||
{
|
||||
public class BaseController : Controller
|
||||
{
|
||||
public const string MessagesKey = "messagesKey";
|
||||
|
||||
public void AddMessage(MessageType type, string value)
|
||||
{
|
||||
var messages = TempData[MessagesKey] as List<Message>;
|
||||
|
||||
if (messages == null)
|
||||
{
|
||||
messages = new List<Message>();
|
||||
}
|
||||
|
||||
messages.Add(new Message
|
||||
{
|
||||
Type = type,
|
||||
Value = value
|
||||
});
|
||||
|
||||
TempData[MessagesKey] = messages;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue