BootstrapAdmin/Bootstrap.Admin/Controllers/HomeController.cs

67 lines
1.8 KiB
C#
Raw Normal View History

2016-10-21 16:35:26 +08:00
using Bootstrap.Admin.Models;
using System.Web.Mvc;
using System.Web.Security;
2016-10-20 17:55:29 +08:00
namespace Bootstrap.Admin.Controllers
{
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
2016-10-20 17:55:29 +08:00
public class HomeController : Controller
{
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
/// <returns></returns>
2016-10-20 17:55:29 +08:00
public ActionResult Index()
{
2016-10-21 16:35:26 +08:00
var v = new HeaderBarModel();
return View(v);
2016-10-20 17:55:29 +08:00
}
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
/// <returns></returns>
2016-10-20 17:55:29 +08:00
public ActionResult Rules()
{
2016-10-21 16:35:26 +08:00
var v = new HeaderBarModel();
v.BreadcrumbName = "规则设置";
return View(v);
2016-10-20 17:55:29 +08:00
}
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
/// <returns></returns>
2016-10-20 17:55:29 +08:00
public ActionResult Terminals()
{
2016-10-21 16:35:26 +08:00
var v = new HeaderBarModel();
v.BreadcrumbName = "输入口设置";
return View(v);
2016-10-20 17:55:29 +08:00
}
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
/// <param name="username"></param>
/// <param name="password"></param>
/// <param name="remember"></param>
/// <returns></returns>
[AllowAnonymous]
public ActionResult Login(string username, string password, string remember)
2016-10-20 17:55:29 +08:00
{
2016-10-21 16:35:26 +08:00
if (username == "Argo")
{
FormsAuthentication.RedirectFromLoginPage(username, false);
}
2016-10-20 17:55:29 +08:00
return View();
}
2016-10-21 16:35:26 +08:00
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Logout()
{
FormsAuthentication.SignOut();
return RedirectToAction("Login");
}
2016-10-20 17:55:29 +08:00
}
}