Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
            }
        }