/// <summary> /// Button logic to commit changes to a user account /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ConfirmChanges_Click(object sender, RoutedEventArgs e) { //update the acct AccountInfoModel acct = new AccountInfoModel(); acct.username = EmailBox.Text; acct.password = PasswordBox.Password; acct.phone_number = PhoneNumBox.Text; try { UpdateAccount(acct); } catch (HttpRequestException) { MessageBox.Show("API Connection Failure"); } HomeScreen home = new HomeScreen(User); var win = Window.GetWindow(this); win.Content = home; }
/// <summary> /// Button logic for new clipboard creation confirmation. Generates the /// API request for a new clipboard /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ConfirmChanges_Click(object sender, RoutedEventArgs e) { //UPDATE THE USER ID THING HERE NewClipboardModel board = new NewClipboardModel(); board.board_name = this.NameBox.Text; //LOL UPDATE THIS ASAP board.user_id = User.GetUserId(); //"SOME USERID THAT I NEED TO GET FROM SOMEWHERE"; try { AddNewClipboard(board); } catch (HttpRequestException) { MessageBox.Show("API Connection Failure"); } HomeScreen home = new HomeScreen(User); var win = Window.GetWindow(this); win.Content = home; }