diff --git a/Bootstrap.Admin/Controllers/ExceptionsController.cs b/Bootstrap.Admin/Controllers/ExceptionsController.cs
index 8ffe2f1e..6576a99c 100644
--- a/Bootstrap.Admin/Controllers/ExceptionsController.cs
+++ b/Bootstrap.Admin/Controllers/ExceptionsController.cs
@@ -15,7 +15,7 @@ namespace Bootstrap.Admin.Controllers
///
/// 显示所有异常
///
- ///
+ ///
///
[HttpGet]
public QueryData Get([FromUri]QueryExceptionOption value)
diff --git a/Bootstrap.Admin/Controllers/GroupsController.cs b/Bootstrap.Admin/Controllers/GroupsController.cs
index 4cfea49c..12f70173 100644
--- a/Bootstrap.Admin/Controllers/GroupsController.cs
+++ b/Bootstrap.Admin/Controllers/GroupsController.cs
@@ -39,11 +39,11 @@ namespace Bootstrap.Admin.Controllers
{
return GroupHelper.SaveGroup(value);
}
- ///
- ///
- ///
- ///
- [HttpDelete]
+ ///
+ ///
+ ///
+ ///
+ [HttpDelete]
public bool Delete([FromBody]string value)
{
return GroupHelper.DeleteGroup(value);
diff --git a/Bootstrap.Admin/Controllers/HomeController.cs b/Bootstrap.Admin/Controllers/HomeController.cs
index 6cbcf029..844c8b21 100644
--- a/Bootstrap.Admin/Controllers/HomeController.cs
+++ b/Bootstrap.Admin/Controllers/HomeController.cs
@@ -61,7 +61,7 @@ namespace Bootstrap.Admin.Controllers
{
if (string.IsNullOrEmpty(p.UserName) || string.IsNullOrEmpty(p.Password) || string.IsNullOrEmpty(p.DisplayName) || string.IsNullOrEmpty(p.Description)) return View();
p.UserStatus = 1;
- return UserHelper.SaveUser(p) ? (ActionResult)base.Redirect("~/Content/html/RegResult.html") : View();
+ return UserHelper.SaveUser(p) ? (ActionResult)Redirect("~/Content/html/RegResult.html") : View();
}
///
///
diff --git a/Bootstrap.Admin/Controllers/LoginController.cs b/Bootstrap.Admin/Controllers/LoginController.cs
index 59db2c19..742b4749 100644
--- a/Bootstrap.Admin/Controllers/LoginController.cs
+++ b/Bootstrap.Admin/Controllers/LoginController.cs
@@ -4,6 +4,7 @@ using Longbow.Caching;
using Longbow.Security.Principal;
using Newtonsoft.Json.Linq;
using System;
+using System.Globalization;
using System.Linq;
using System.Web.Http;
using System.Web.Security;
@@ -24,8 +25,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
- ///
+ ///
///
[AllowAnonymous]
[HttpPost]
@@ -36,7 +36,7 @@ namespace Bootstrap.Admin.Controllers
string password = user.password;
if (LgbPrincipal.Authenticate(userName, password) || BootstrapUser.Authenticate(userName, password))
{
- var interval = int.Parse(Math.Round(FormsAuthentication.Timeout.TotalSeconds).ToString());
+ var interval = int.Parse(Math.Round(FormsAuthentication.Timeout.TotalSeconds).ToString(CultureInfo.InvariantCulture));
var token = CacheManager.AddOrUpdate(string.Format("WebApi-{0}", userName), interval, k => new LoginInfo() { UserName = userName, Token = Guid.NewGuid().ToString() }, (k, info) => info, "WebApi 数据缓存");
CacheManager.AddOrUpdate(token.Token, interval, k => token, (k, info) => info, "Token 数据缓存");
return token;
diff --git a/Bootstrap.Admin/Controllers/MenusController.cs b/Bootstrap.Admin/Controllers/MenusController.cs
index 8cc392aa..fcea8035 100644
--- a/Bootstrap.Admin/Controllers/MenusController.cs
+++ b/Bootstrap.Admin/Controllers/MenusController.cs
@@ -32,7 +32,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
+ ///
[HttpDelete]
public bool Delete([FromBody]string value)
{
diff --git a/Bootstrap.Admin/Controllers/MessagesController.cs b/Bootstrap.Admin/Controllers/MessagesController.cs
index b3536fc1..8ebbf96b 100644
--- a/Bootstrap.Admin/Controllers/MessagesController.cs
+++ b/Bootstrap.Admin/Controllers/MessagesController.cs
@@ -12,7 +12,7 @@ namespace Bootstrap.Admin.Controllers
///
/// 根据Id返回不同的消息列表
///
- ///
+ ///
///
[HttpGet]
public IEnumerable Get(string id)
@@ -20,13 +20,17 @@ namespace Bootstrap.Admin.Controllers
var ret = new List();
switch (id)
{
- case "inbox": ret = MessageHelper.Inbox(User.Identity.Name).ToList();
+ case "inbox":
+ ret = MessageHelper.Inbox(User.Identity.Name).ToList();
break;
- case "sendmail": ret = MessageHelper.SendMail(User.Identity.Name).ToList();
+ case "sendmail":
+ ret = MessageHelper.SendMail(User.Identity.Name).ToList();
break;
- case "mark": ret = MessageHelper.Mark(User.Identity.Name).ToList();
+ case "mark":
+ ret = MessageHelper.Mark(User.Identity.Name).ToList();
break;
- case "trash": ret = MessageHelper.Trash(User.Identity.Name).ToList();
+ case "trash":
+ ret = MessageHelper.Trash(User.Identity.Name).ToList();
break;
}
return ret;
@@ -35,16 +39,17 @@ namespace Bootstrap.Admin.Controllers
///
/// 返回各个消息列表的文件个数
///
- ///
///
[HttpGet]
public MessageCountModel Get()
{
- MessageCountModel mcm = new MessageCountModel();
- mcm.inboxCount = MessageHelper.Inbox(User.Identity.Name).Count();
- mcm.sendmailCount = MessageHelper.SendMail(User.Identity.Name).Count();
- mcm.markCount = MessageHelper.Mark(User.Identity.Name).Count();
- mcm.trashCount = MessageHelper.Trash(User.Identity.Name).Count();
+ var mcm = new MessageCountModel
+ {
+ InboxCount = MessageHelper.Inbox(User.Identity.Name).Count(),
+ SendmailCount = MessageHelper.SendMail(User.Identity.Name).Count(),
+ MarkCount = MessageHelper.Mark(User.Identity.Name).Count(),
+ TrashCount = MessageHelper.Trash(User.Identity.Name).Count()
+ };
return mcm;
}
}
diff --git a/Bootstrap.Admin/Controllers/RolesController.cs b/Bootstrap.Admin/Controllers/RolesController.cs
index 63e635fc..446ab19c 100644
--- a/Bootstrap.Admin/Controllers/RolesController.cs
+++ b/Bootstrap.Admin/Controllers/RolesController.cs
@@ -21,10 +21,12 @@ namespace Bootstrap.Admin.Controllers
{
return value.RetrieveData();
}
+
///
///
///
///
+ ///
///
[HttpPost]
public IEnumerable Post(int id, [FromBody]JObject value)
@@ -47,9 +49,10 @@ namespace Bootstrap.Admin.Controllers
}
return ret;
}
+
/// 根据GroupID获取
///
- ///
+ ///
///
[HttpPut]
public bool Put(int id, [FromBody]JObject value)
@@ -85,7 +88,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
+ ///
[HttpDelete]
public bool Delete([FromBody]string value)
{
diff --git a/Bootstrap.Admin/Controllers/TasksController.cs b/Bootstrap.Admin/Controllers/TasksController.cs
index fafd8b05..3ba459fe 100644
--- a/Bootstrap.Admin/Controllers/TasksController.cs
+++ b/Bootstrap.Admin/Controllers/TasksController.cs
@@ -4,8 +4,15 @@ using System.Web.Http;
namespace Bootstrap.Admin.Controllers
{
+ ///
+ ///
+ ///
public class TasksController : ApiController
{
+ ///
+ ///
+ ///
+ ///
[HttpGet]
public IEnumerable Get()
{
diff --git a/Bootstrap.Admin/Controllers/UsersController.cs b/Bootstrap.Admin/Controllers/UsersController.cs
index 2df7c950..a4be923d 100644
--- a/Bootstrap.Admin/Controllers/UsersController.cs
+++ b/Bootstrap.Admin/Controllers/UsersController.cs
@@ -49,7 +49,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
+ ///
///
///
[HttpPost]
@@ -73,7 +73,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
+ ///
///
[HttpGet]
public User Get(string userName)
@@ -133,7 +133,7 @@ namespace Bootstrap.Admin.Controllers
///
///
///
- ///
+ ///
[HttpDelete]
public bool Delete([FromBody]string value)
{
diff --git a/Bootstrap.Admin/Models/HeaderBarModel.cs b/Bootstrap.Admin/Models/HeaderBarModel.cs
index 17013027..1879be22 100644
--- a/Bootstrap.Admin/Models/HeaderBarModel.cs
+++ b/Bootstrap.Admin/Models/HeaderBarModel.cs
@@ -14,17 +14,17 @@ namespace Bootstrap.Admin.Models
Icon = user.Icon;
DisplayName = user.DisplayName;
UserName = user.UserName;
- UserID = user.ID;
+ UserId = user.ID;
}
- public string UserName { get; protected set; }
+ public string UserName { get; private set; }
///
///
///
- public int UserID { get; protected set; }
+ public int UserId { get; private set; }
///
///
///
- public string DisplayName { get; protected set; }
+ public string DisplayName { get; private set; }
///
///
///
@@ -32,6 +32,6 @@ namespace Bootstrap.Admin.Models
///
/// 获得/设置 用户头像地址
///
- public string Icon { get; set; }
+ public string Icon { get; private set; }
}
}
\ No newline at end of file
diff --git a/Bootstrap.Admin/Models/LoginModel.cs b/Bootstrap.Admin/Models/LoginModel.cs
index 326ead0d..5f5c85fd 100644
--- a/Bootstrap.Admin/Models/LoginModel.cs
+++ b/Bootstrap.Admin/Models/LoginModel.cs
@@ -5,13 +5,6 @@
///
public class LoginModel : ModelBase
{
- ///
- ///
- ///
- public LoginModel()
- {
-
- }
///
///
///
diff --git a/Bootstrap.Admin/Models/MessageCountModel.cs b/Bootstrap.Admin/Models/MessageCountModel.cs
index 24f1c628..f650e243 100644
--- a/Bootstrap.Admin/Models/MessageCountModel.cs
+++ b/Bootstrap.Admin/Models/MessageCountModel.cs
@@ -1,15 +1,25 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace Bootstrap.Admin.Models
+namespace Bootstrap.Admin.Models
{
+ ///
+ ///
+ ///
public class MessageCountModel
{
- public int inboxCount { get; set; }
- public int sendmailCount { get; set; }
- public int markCount { get; set; }
- public int trashCount { get; set; }
+ ///
+ ///
+ ///
+ public int InboxCount { get; set; }
+ ///
+ ///
+ ///
+ public int SendmailCount { get; set; }
+ ///
+ ///
+ ///
+ public int MarkCount { get; set; }
+ ///
+ ///
+ ///
+ public int TrashCount { get; set; }
}
}
\ No newline at end of file
diff --git a/Bootstrap.Admin/Models/ModelBase.cs b/Bootstrap.Admin/Models/ModelBase.cs
index dd6492bc..0eddb7cb 100644
--- a/Bootstrap.Admin/Models/ModelBase.cs
+++ b/Bootstrap.Admin/Models/ModelBase.cs
@@ -7,6 +7,9 @@ namespace Bootstrap.Admin.Models
///
public class ModelBase
{
+ ///
+ ///
+ ///
public ModelBase()
{
Title = DictHelper.RetrieveWebTitle();
@@ -15,8 +18,10 @@ namespace Bootstrap.Admin.Models
///
///
///
- public string Title { get; set; }
-
- public string Footer { get; set; }
+ public string Title { get; private set; }
+ ///
+ ///
+ ///
+ public string Footer { get; private set; }
}
}
\ No newline at end of file
diff --git a/Bootstrap.Admin/Models/NavigatorBarModel.cs b/Bootstrap.Admin/Models/NavigatorBarModel.cs
index 0f925d72..2cb0fd8a 100644
--- a/Bootstrap.Admin/Models/NavigatorBarModel.cs
+++ b/Bootstrap.Admin/Models/NavigatorBarModel.cs
@@ -27,10 +27,10 @@ namespace Bootstrap.Admin.Models
///
///
///
- public IEnumerable