|
|
@ -931,5 +931,108 @@ namespace EasyBL.WEBAPP.ShowEasy |
|
|
|
|
|
|
|
#endregion 展覽管理(List API 展覽類別篩選器)
|
|
|
|
|
|
|
|
#region Get會員個人信息
|
|
|
|
|
|
|
|
//會員個人訊息查詢
|
|
|
|
public HttpResponseMessage GetMemberInfo(string OrgID, string Account) |
|
|
|
{ |
|
|
|
SuccessResponseMessage srm = null; |
|
|
|
string sError = null; |
|
|
|
var db = SugarBase.GetIntance(); |
|
|
|
try |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
MemberDTO member = new MemberDTO(); |
|
|
|
var sLang = WebAppGlobalConstWord.DEFAULT_LANGUAGE; |
|
|
|
string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); |
|
|
|
|
|
|
|
var saUser = db.Queryable<SETB_CMS_Member>() |
|
|
|
//搜尋條件
|
|
|
|
.Where(x => x.OrgID == OrgID && x.Account == Account) |
|
|
|
.Single(); |
|
|
|
|
|
|
|
|
|
|
|
member.FirstName = saUser.FirstName;//名字
|
|
|
|
member.LastName = saUser.LastName; //姓氏
|
|
|
|
member.Email = saUser.Email;//Email
|
|
|
|
member.Phone = saUser.Phone;//電話
|
|
|
|
member.CountryID = saUser.CountryID;//國家
|
|
|
|
member.PhoneCode = saUser.PhoneCode;//電話國碼
|
|
|
|
if (!string.IsNullOrEmpty(member.CountryID)) |
|
|
|
{ |
|
|
|
|
|
|
|
var sCountry = db.Queryable<SETB_SYS_Country>() |
|
|
|
.Where(x => x.CountryID == member.CountryID && x.LangType == sLang) |
|
|
|
.Single(); |
|
|
|
member.CountryName = sCountry.CountryName; |
|
|
|
member.Country_ENCode = sCountry.Country_ENCode; |
|
|
|
|
|
|
|
} |
|
|
|
//返回user信息
|
|
|
|
srm = new SuccessResponseMessage(null, null); |
|
|
|
srm.DATA.Add(BLWording.REL, member); |
|
|
|
|
|
|
|
} while (false); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
sError = Util.GetLastExceptionMsg(ex); |
|
|
|
srm = new SuccessResponseMessage(null, null) |
|
|
|
{ |
|
|
|
STATUSCODE = (int)StatusCodeEnum.Error, |
|
|
|
MSG = StatusCodeEnum.Error.GetEnumText() |
|
|
|
}; |
|
|
|
} |
|
|
|
return HttpResponseExtension.ToJson(JsonConvert.SerializeObject(srm)); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 修改會員個人信息
|
|
|
|
/// <summary>
|
|
|
|
/// 修改會員個人信息
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="i_crm"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
public HttpResponseMessage UpdateMember(MemberDTO Member) |
|
|
|
{ |
|
|
|
SuccessResponseMessage srm = null; |
|
|
|
string sError = null; |
|
|
|
var db = SugarBase.GetIntance(); |
|
|
|
try |
|
|
|
{ |
|
|
|
do |
|
|
|
{ |
|
|
|
|
|
|
|
SETB_CMS_Member rsMember = new SETB_CMS_Member(); |
|
|
|
rsMember.FirstName = Member.FirstName;//名字
|
|
|
|
rsMember.LastName = Member.LastName;//姓氏
|
|
|
|
rsMember.Email = Member.Email;//Email
|
|
|
|
rsMember.Phone = Member.Phone;//電話
|
|
|
|
rsMember.CountryID = Member.CountryID;//國家
|
|
|
|
rsMember.PhoneCode = Member.PhoneCode;//電話國碼
|
|
|
|
var iRel = db.Updateable(rsMember) |
|
|
|
.UpdateColumns(it => new { it.FirstName, it.LastName, it.Email, it.Phone,it.CountryID,it.PhoneCode }) |
|
|
|
.Where(t1 => t1.Account == Member.Account).ExecuteCommand(); |
|
|
|
srm = new SuccessResponseMessage(null, null); |
|
|
|
srm.DATA.Add(BLWording.REL, iRel); |
|
|
|
} while (false); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
sError = Util.GetLastExceptionMsg(ex); |
|
|
|
srm = new SuccessResponseMessage(null, null) |
|
|
|
{ |
|
|
|
STATUSCODE = (int)StatusCodeEnum.Error, |
|
|
|
MSG = StatusCodeEnum.Error.GetEnumText() |
|
|
|
}; |
|
|
|
srm.DATA.Add(BLWording.REL, ""); |
|
|
|
} |
|
|
|
return HttpResponseExtension.ToJson(JsonConvert.SerializeObject(srm)); |
|
|
|
} |
|
|
|
#endregion
|
|
|
|
|
|
|
|
} |
|
|
|
} |