Exemplo n.º 1
0
 void WcfClient_AddUserCompleted(object sender, AddUserCompletedEventArgs e)
 {
     if (e.Result)
     {
         MessageBox.Show("添加成功!");
     }
     else
     {
         MessageBox.Show("添加失败!");
     }
 }
Exemplo n.º 2
0
 private void _svc_AddUserCompleted(object sender, AddUserCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         // Set the UserId only when AddUser service call
         // was made successfully
         this.UserId = e.Result;
     }
     else
     {
         this.UserId = Guid.Empty;
         MessageBox.Show("Failed to add user please try again!");
     }
 }
Exemplo n.º 3
0
 void AddUserCompleted(object sender, AddUserCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         SelectedUser = e.Result;
         Password     = e.Result.Password;
         Users.Add(SelectedUser);
     }
     else
     {
         ErrorProvider.ShowError(e.Error, Navigator);
     }
     securityClient.AddUserCompleted -= AddUserCompleted;
     Busy = false;
 }
Exemplo n.º 4
0
        void _client_AddUserCompleted(object sender, 
            AddUserCompletedEventArgs e)
        {
            if(e.Error == null)
            {
                this.UserID = e.Result.UserId;
                this.UserPass = e.Result.Pass;
                this.SelectedNote = null;
                this.Notes = null;
                this.ShowMenu = true;
                this.ErrorMsg = null;

                (Application.Current.RootVisual as PhoneApplicationFrame)
                    .GoBack();
            }
            else
            {
                this.UserID = -1;
                this.UserPass = null;
                this.SelectedNote = null;
                this.Notes = null;
                this.ErrorMsg = e.Error.Message;
            }
        }
Exemplo n.º 5
0
 private void _svc_AddUserCompleted(object sender, AddUserCompletedEventArgs e)
 {
     if(e.Error == null) {
         // Set the UserId only when AddUser service call
         // was made successfully
         this.UserId = e.Result;
     }
     else {
         this.UserId = Guid.Empty;
         MessageBox.Show("Failed to add user please try again!");
     }
 }
Exemplo n.º 6
0
 void _client_AddUserCompleted(object sender, AddUserCompletedEventArgs e)
 {
     if(e.Error == null && e.Result)
     {
         this.RegisterStatus = "Registered successfully";
         this.Login(this.Email, this.Pass);
     }
     else if(e.Error != null)
     {
         this.RegisterStatus = e.Error.Message;
         this.Email = null;
         this.Pass = null;
     }
     else
     {
         this.RegisterStatus = "Connection error !";
         this.Email = null;
         this.Pass = null;
     }
 }