예제 #1
0
 public void SaveMemberContact(int MemberID, ContactModel model)
 {
     Member member = FindMemberWithProfile(MemberID);
     DB_Service.Attach<Member>(member);
     Member_Profile mp = new Member_Profile();
     if (member.Member_Profile != null)
     {
         mp = member.Member_Profile;
     }
     mp.MemberID = member.MemberID;
     mp.Address = model.Address;
     mp.Phone = model.Phone;
     mp.Mobile = model.Mobile;
     mp.MSN = model.MSN;
     mp.QQ = model.QQ;
     if (model.Position.IndexOf("|") != -1)
     {
         mp.Lat = Convert.ToDouble(model.Position.Split('|')[0]);
         mp.Lng = Convert.ToDouble(model.Position.Split('|')[1]);
     }
     member.Member_Profile = mp;
     DB_Service.Commit();
 }
예제 #2
0
 public void SaveMemberBaseInfo(int MemberID, ProfileModel model)
 {
     Member member = FindMemberWithProfile(MemberID);
     DB_Service.Attach<Member>(member);
     Member_Profile mp = new Member_Profile();
     if (member.Member_Profile != null)
     {
         mp = member.Member_Profile;
     }
     mp.MemberID = model.MemberID;
     mp.Borthday = model.Borthday;
     mp.CityCode = model.CityCode;
     mp.Description = model.Description;
     member.NickName = model.NickName;
     mp.RealName = model.RealName;
     mp.Sex = model.Sex;
     member.Member_Profile = mp;
     DB_Service.Commit();
     SetLoginCookie(member);
 }