/// <summary> /// 根据账号获取学员 /// </summary> /// <param name="acc"></param> /// <returns></returns> public Song.Entities.Accounts ForAcc(string acc) { Song.Entities.Accounts account = Business.Do <IAccounts>().AccountsSingle(acc, -1); if (account == null) { return(account); } Song.Entities.Accounts curr = (Song.Entities.Accounts)account.Clone(); curr.Ac_Pw = string.Empty; return(curr); }
public Song.Entities.Accounts Current() { Song.Entities.Accounts acc = Extend.LoginState.Accounts.CurrentUser; if (acc == null) { return(acc); } Song.Entities.Accounts curr = acc.Clone <Song.Entities.Accounts>(); if (curr != null) { curr.Ac_Pw = string.Empty; } return(curr); }
/// <summary> /// 处理学员信息,密码清空、头像转为全路径,并生成clone对象 /// </summary> /// <param name="acc">学员账户的clone对象</param> /// <returns></returns> private Song.Entities.Accounts _tran(Song.Entities.Accounts acc) { if (acc == null) { return(acc); } Song.Entities.Accounts curr = acc.Clone <Song.Entities.Accounts>(); if (curr != null) { curr.Ac_Pw = string.Empty; } curr.Ac_Photo = WeiSha.Common.Upload.Get["Accounts"].Virtual + curr.Ac_Photo; return(curr); }
/// <summary> /// 处理学员信息,密码清空、头像转为全路径,并生成clone对象 /// </summary> /// <param name="acc">学员账户的clone对象</param> /// <returns></returns> private Song.Entities.Accounts _tran(Song.Entities.Accounts acc) { if (acc == null) { return(acc); } Song.Entities.Accounts curr = acc.Clone <Song.Entities.Accounts>(); if (curr != null) { curr.Ac_Pw = string.Empty; } if (System.IO.File.Exists(WeiSha.Common.Upload.Get["Accounts"].Physics + curr.Ac_Photo)) { curr.Ac_Photo = WeiSha.Common.Upload.Get["Accounts"].Virtual + curr.Ac_Photo; } else { curr.Ac_Photo = ""; } return(curr); }