Ejemplo n.º 1
0
        private void Added_Button_Click(object sender, RoutedEventArgs e)
        {
            var alert = new NewAccountAlert();

            if (alert.ShowDialog() == true)
            {
                DBManager.share.InsertOrUpdateData(alert.account);
                AccountItems = DBManager.share.GetAllListFromTable(Account.TABLE_NAME, typeof(Account)) as List <Account>;
            }
        }
Ejemplo n.º 2
0
        private void Edit_Button_Click(object sender, RoutedEventArgs e)
        {
            Account selectedItem = Account_List.SelectedItem as Account;
            var     alert        = new NewAccountAlert(selectedItem);

            if (alert.ShowDialog() == true)
            {
                DBManager.share.InsertOrUpdateData(alert.account);
                AccountItems       = DBManager.share.GetAllListFromTable(Account.TABLE_NAME, typeof(Account)) as List <Account>;
                Edit_Btn.IsEnabled = false;
                Rm_Btn.IsEnabled   = false;
            }
        }