private void btnConfirmDelete_Click(object sender, RoutedEventArgs e) { if (toDeleteTransaction != null) { toDeleteTransaction._Contact.Transactions.Remove(toDeleteTransaction.BindedTransaction); stkTransactions.Children.Remove(toDeleteTransaction); } else { Cache.Instance.GetLibrary.Contacts.Remove(contactToDelete.BindedContact); MainPage.Instance.stkContacts.Children.Remove(contactToDelete); MainPage.Instance.lblContactCounter.Content = Cache.Instance.GetLibrary.Contacts.Count; if (selectedPage == contactToDelete) { MainPage.Instance.rightGrid(Visibility.Hidden); } } grdMain.Effect = null; grdMain.IsEnabled = true; recBlackbakground.Visibility = Visibility.Hidden; grdConfirm.Visibility = Visibility.Hidden; lblTotalEveryone.Text = getTotal(); toDeleteTransaction = null; contactToDelete = null; lblTotalTransactions.Text = selectedPage.getTotal(); lblTotalEveryone.Text = getTotal(); selectedPage.lblTotal.Text = selectedPage.getTotal(); }
public void sendConfirmDeleteTransaction() { grdMain.IsEnabled = false; recBlackbakground.Visibility = Visibility.Visible; grdConfirm.Visibility = Visibility.Visible; sendBackgroundblur(); contactToDelete = null; lblConfirmDeleteText.Text = "Are you sure you want to delete this transaction?"; }
private void btnConfirmCancel_Click(object sender, RoutedEventArgs e) { grdMain.IsEnabled = true; recBlackbakground.Visibility = Visibility.Hidden; grdConfirm.Visibility = Visibility.Hidden; grdMain.Effect = null; toDeleteTransaction = null; contactToDelete = null; }
public void sendConfirmDelete(ContactControl toDelete) { this.contactToDelete = toDelete; unselectAll(); SelectedPage = null; rightGrid(Visibility.Hidden); grdMain.IsEnabled = false; recBlackbakground.Visibility = Visibility.Visible; grdConfirm.Visibility = Visibility.Visible; sendBackgroundblur(); toDeleteTransaction = null; lblConfirmDeleteText.Text = "Are you sure you want to delete the contact " + toDelete.BindedContact.Name + "?"; }