void WcfClient_AddUserCompleted(object sender, AddUserCompletedEventArgs e) { if (e.Result) { MessageBox.Show("添加成功!"); } else { MessageBox.Show("添加失败!"); } }
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!"); } }
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; }
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; } }
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!"); } }
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; } }