2016-10-23 23:35:17 +08:00
|
|
|
|
using Bootstrap.DataAccess;
|
2017-04-05 13:58:50 +08:00
|
|
|
|
using Bootstrap.Security;
|
2016-10-23 23:35:17 +08:00
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Models
|
2016-10-20 17:55:29 +08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2016-10-23 23:35:17 +08:00
|
|
|
|
public class HeaderBarModel : ModelBase
|
2016-10-20 17:55:29 +08:00
|
|
|
|
{
|
2016-10-23 23:35:17 +08:00
|
|
|
|
public HeaderBarModel()
|
|
|
|
|
{
|
2017-04-05 13:58:50 +08:00
|
|
|
|
var user = BootstrapUser.RetrieveUserByUserName(HttpContext.Current.User.Identity.Name);
|
2016-10-23 23:35:17 +08:00
|
|
|
|
Icon = user.Icon;
|
|
|
|
|
DisplayName = user.DisplayName;
|
|
|
|
|
UserName = user.UserName;
|
|
|
|
|
}
|
|
|
|
|
public string UserName { get; private set; }
|
2016-10-20 17:55:29 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2016-10-23 23:35:17 +08:00
|
|
|
|
public string DisplayName { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string HomeUrl { get; set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获得/设置 用户头像地址
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Icon { get; private set; }
|
2016-10-20 17:55:29 +08:00
|
|
|
|
}
|
|
|
|
|
}
|