更新代码:适配2013版本编译器

This commit is contained in:
sunnian 2018-05-05 13:06:28 +08:00
parent c9e1cc4dec
commit a6838b6fe1
2 changed files with 8 additions and 7 deletions

View File

@ -17,11 +17,11 @@ namespace Bootstrap.Admin.Models
UserName = user.UserName;
Css = user.Css;
}
public string UserName { get; }
public string UserName { get; private set; }
/// <summary>
///
/// </summary>
public string DisplayName { get; }
public string DisplayName { get; private set; }
/// <summary>
///
/// </summary>
@ -29,10 +29,10 @@ namespace Bootstrap.Admin.Models
/// <summary>
/// 获得/设置 用户头像地址
/// </summary>
public string Icon { get; }
public string Icon { get; private set; }
/// <summary>
///
/// </summary>
public string Css { get; }
public string Css { get; private set; }
}
}

View File

@ -14,16 +14,17 @@ namespace Bootstrap.Admin.Models
/// <summary>
/// 获得/设置 头像文件大小
/// </summary>
public long Size { get; }
public long Size { get; private set; }
/// <summary>
/// 获得 系统配置的所有样式表
/// </summary>
public IEnumerable<BootstrapDict> Csss { get; }
public IEnumerable<BootstrapDict> Csss { get; private set; }
/// <summary>
///
/// </summary>
/// <param name="url"></param>
public ProfilesModel(string url) : base(url)
public ProfilesModel(string url)
: base(url)
{
var fileName = HttpContext.Current.Server.MapPath(Icon);
if (File.Exists(fileName))