Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form changeblockpin = new BlockChangepin();

            changeblockpin.Show();
            this.Close();
        }
Esempio n. 2
0
        private void CreateNewCard_Load(object sender, EventArgs e)
        {
            string cardno = "";

            while (cardno == cardnumdb)
            {
                cardno = build();
                call(cardno);
            }
            PIN.Text    = BlockChangepin.build();
            CardNo.Text = cardno;
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in listView1.SelectedItems)
            {
                if (Int32.Parse(Balance_Inquiry.balance) >= Int32.Parse(item.SubItems[1].Text))
                {
                    int newbal = Int32.Parse(Balance_Inquiry.balance) - Int32.Parse(item.SubItems[1].Text);
                    CreateNewCard.Insert("Update card_list set points = '" + EncryptDecrypt.EncryptString(newbal.ToString(), CreateNewCard.salt) + "' where Card_No = '" + CardInsert.encrcardnum + "'");
                    CreateNewCard.Initialize("server=localhost;uid=root;pwd=;database=alaybank_cards;sslmode=none;");
                    CreateNewCard.Insert("Insert into alay" + CardInsert.cardnum + " (`trans_id`, `trans_details`) VALUES (NULL ,'" + EncryptDecrypt.EncryptString("Claimed Reward on " + DateTime.Now, CreateNewCard.salt) + "');");
                    MessageBox.Show("Balance Successfuly Updated\n Thank You for Using Alay Bank ATM System");
                    CreateNewCard.Initialize();
                    CreateNewCard.Insert("insert into rewardprint values('" + item.SubItems[0].Text + "','" + BlockChangepin.build() + "')");
                    Form print = new Recieptprint();
                    Recieptprint.source = "reward";
                    print.ShowDialog();
                    if (MessageBox.Show("Do you want another Transaction?", "Another Transaction", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        Form mm = new Menu();
                        mm.Show();
                        this.Close();
                    }
                    else
                    {
                        CreateNewCard.Insert("Insert Into transrec values ('" + CardInsert.cardnum + "','" + newbal + " Points')");
                        MessageBox.Show("Thank You for Using Alay Bank ATM");
                        Form splash = new Splash_Screen();
                        splash.Show();
                        this.Close();
                    }
                }
                else
                {
                    MessageBox.Show("Transaction cannot be processed!\n Insufficient Reward Points\n Thank you for using Alay Bank ATM");
                }
            }
            Form splashscreen = new Splash_Screen();

            splashscreen.Show();
            this.Hide();
        }