private void creditlist_SelectionChanged(object sender, SelectionChangedEventArgs e) { //creditCards tapItem = ((FrameworkElement)e.OriginalSource).DataContext as creditCards; creditCards slectedItem = creditlist.SelectedItem as creditCards; PhoneApplicationService.Current.State["param"] = slectedItem; NavigationService.Navigate(new Uri("/creditDetails.xaml", UriKind.Relative)); }
////portected override methods protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); c = PhoneApplicationService.Current.State["param"] as creditCards; page_name.Text = c.bankName; tb_accountNumb.Text = c.accountNumber; tb_cardNumb.Text = c.cardNumber; tb_cvvCode.Text = c.getSecurityNumber(); tb_pincode.Text = c.getPinCode(); tb_startDate.Text = c.endDate; tb_endDate.Text = c.endDate; }
public credit() { InitializeComponent(); creditlist.ItemsSource = cardsCollection; creditCards t1 = new creditCards(); t1.bankName = "Allied Bank"; t1.cardNumber = "22365895"; t1.addPinCode("1147"); t1.addSecurityNumber("123"); cardsCollection.Add(t1); creditlist.DataContext = cardsCollection; }
private void ab_add_Click(object sender, EventArgs e) { if (bankName_txtBox.Text != null && cardNumber_txtBox.Text != null && secNumber_txtBox.Text != null && pinCode_pswdBox.Password != null && startDate_dtPicker1.Value.HasValue && endDate_dtPicker.Value.HasValue) { creditCards temp = new creditCards(); temp.bankName = bankName_txtBox.Text; temp.cardNumber = cardNumber_txtBox.Text; temp.accountNumber = acctNumber_txtBox.Text; temp.addSecurityNumber(secNumber_txtBox.Text); temp.addPinCode(pinCode_pswdBox.Password); temp.startDate = startDate_dtPicker1.ValueString; temp.endDate = endDate_dtPicker.ValueString; cardsCollection.Add(temp); creditlist.ItemsSource = cardsCollection; tb_clear(); } else { MessageBox.Show("Please Enter Required Values", "Error", MessageBoxButton.OK); } }