示例#1
0
        public void UpdateUserData(ProfileData user)
        {
            MembershipUser loggedUser = Membership.GetUser(user.UserID);
            loggedUser.Email = user.Email;

            Membership.UpdateUser(loggedUser);

            ProfileBase profile = ProfileBase.Create(loggedUser.UserName, true);
            profile.SetPropertyValue("FriendlyName", user.FriendlyName);
            profile.Save();

            Klient klient = (from k in _klientContext.GetAll().AsQueryable()
                             where k.User_id == user.UserID
                             select k).First();

            klient.Email = loggedUser.Email;
            klient.Firma = user.Firma;
            klient.Imie = user.Imie;
            klient.KodPocztowy = user.KodPocztowy;
            klient.Kraj = user.Kraj;
            klient.Login = loggedUser.UserName;
            klient.Miasto = user.Miasto;
            klient.Nazwisko = user.Nazwisko;
            klient.NIP = user.NIP;
            klient.Numer = user.Numer;
            klient.User_id = (Guid)loggedUser.ProviderUserKey;
            klient.Telefon = user.Telefon;
            klient.Ulica = user.Ulica;

            _klientContext.Update(klient);
        }
示例#2
0
 public void SetParentWindow(ProfileDisplay window)
 {
     this.parentWindow = window;
     this.RegistrationData = parentWindow.RegistrationData;
     profileContext = parentWindow.Resources["ProfilContext"] as ProfileContext;
 }
示例#3
0
 public void UpdateRegistrationData(ProfileData profile)
 {
 }
 /// <summary>
 /// Asynchronously invokes the 'UpdateUserData' method of the DomainService.
 /// </summary>
 /// <param name="user">The value for the 'user' parameter of this action.</param>
 /// <returns>An operation instance that can be used to manage the asynchronous request.</returns>
 public InvokeOperation UpdateUserData(ProfileData user)
 {
     Dictionary<string, object> parameters = new Dictionary<string, object>();
     parameters.Add("user", user);
     this.ValidateMethod("UpdateUserData", parameters);
     return this.InvokeOperation("UpdateUserData", typeof(void), parameters, true, null, null);
 }