diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/MembersService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/MembersService.cs index 5b63309..64e37b5 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/MembersService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/MembersService.cs @@ -153,21 +153,25 @@ namespace EasyBL.WEBAPP.SYS do { string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); - var saCountry = db.Queryable() + var saUser = db.Queryable() //搜尋條件 .Where(x => x.OrgID == OrgID && x.Account == Account) .Single(); - var sFilePath = db.Queryable() - .Where(x => x.ParentID == saCountry.MemberID) + + if (!string.IsNullOrEmpty(saUser.MemberPicture)) { + + var sFilePath = db.Queryable() + .Where(x => x.ParentID == saUser.MemberPicture) .Single(); - saCountry.MemberPicture = requestUrl + "/" + sFilePath.FilePath.Replace("\\", "/"); - var iRel = db.Insertable(saCountry).ExecuteCommand(); + saUser.MemberPicture = requestUrl + "/" + sFilePath.FilePath.Replace("\\", "/"); + + } //返回user信息 srm = new SuccessResponseMessage(null, null); - srm.DATA.Add(BLWording.REL, iRel); + srm.DATA.Add(BLWording.REL, saUser); } while (false); }