private void DateListItemSelected(object sender, SelectionChangedEventArgs e) { if (listBoxobj.SelectedIndex != -1) { ExpenseVM listitem = listBoxobj.SelectedItem as ExpenseVM;//Get slected listbox item contact ID Frame.Navigate(typeof(DailyPage), listitem.GetDateOnly()); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { // parameter as data m_CurrentExpense = e.Parameter as ExpenseVM; // fill data into widgets w_DateOfExpense.Date = new DateTimeOffset(m_CurrentExpense.GetDateOnly()); w_AmountOfExpense.Text = m_CurrentExpense.Amount.ToString(); w_AmountOfExpense.Focus(FocusState.Keyboard); }
private void UpdateContact_Click(object sender, RoutedEventArgs e) { // parse widgets values to data m_CurrentExpense.SetDate(w_DateOfExpense.Date.DateTime); int valCents = DataConversion.ConvertCurrencyStringToIntegerCents(w_AmountOfExpense.Text); // store data ExpenseItem spend = new ExpenseItem(m_CurrentExpense.Id, m_CurrentExpense.GetDateOnly(), valCents); App.GlobalPersistanceService.GetExpensesStorage().UpdateDetails(spend);//Update selected DB contact Id // interface transition Frame.Navigate(typeof(HomePage)); }