BootstrapAdmin/Bootstrap.Admin/Models/HeaderBarModel.cs

38 lines
1006 B
C#
Raw Normal View History

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