private void btnDialogOk_Click(object sender, RoutedEventArgs e) { try { _user = App.WimeaApp.Users.Add(); //(string id, string name, string email, string contact, string role, string station) _user.Update(Id, nameTxtBx.Text, emailTxtBx.Text, contactTxtBx.Text, roleTxtBx.Text, stationTxtCbx.Text); this.DialogResult = true; } catch (Exception ex){ MessageBox.Show(ex.Message.ToString()); } }