Beispiel #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            Form Splash = new Splash_Screen();

            Splash.Show();
            this.Close();
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     foreach (ListViewItem item in listView1.SelectedItems)
     {
         cardnum = item.SubItems[0].Text;
         Select_Card(cardnum);
         if (cardblock == "False" && DateTime.Compare(DateTime.Now, DateTime.ParseExact("30/" + expiry, "dd/MM/yy", System.Globalization.CultureInfo.InvariantCulture)) <= 0)
         {
             Form Menu = new Menu();
             Menu.Show();
             Hide();
         }
         else
         {
             string error = "";
             if (cardblock == "True")
             {
                 error += "Your Card Has been Blocked\n";
             }
             if (DateTime.Compare(DateTime.Now, DateTime.ParseExact("30/" + expiry, "dd/MM/yy", System.Globalization.CultureInfo.InvariantCulture)) >= 0)
             {
                 error += "Your Card Has Expired";
             }
             MessageBox.Show(error + "\n Please Contact Your Bank", "Card Insert Error");
             Form splashscreen = new Splash_Screen();
             splashscreen.Show();
             this.Close();
         }
     }
 }
Beispiel #3
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     getpin();
     if (textBox1.Text == PINCode)
     {
         Close();
     }
     else if (textBox1.Text == "911911")
     {
         CardBlock();
         pincancel = true;
         Close();
     }
     else
     {
         if (tries == 0)
         {
             MessageBox.Show("Your Tries Have Exceeded Allowed Tries\nYour Card Has Been Blocked", "CARD BLOCKED", MessageBoxButtons.OK, MessageBoxIcon.Error);
             CardBlock();
             Form splashscreen = new Splash_Screen();
             splashscreen.Show();
             this.Close();
         }
         else
         {
             MessageBox.Show("Your PIN is Incorrect!\nYou Have " + tries + " Left", "PIN INCORRECT", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             tries--;
             textBox1.Clear();
         }
     }
 }
Beispiel #4
0
        private void buttonCANCEL_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Change PIN cancel!");
            Form splash = new Splash_Screen();

            splash.Show();
            this.Close();
        }
Beispiel #5
0
        private void buttonCANCEL_Click(object sender, EventArgs e)
        {
            pincancel = true;
            MessageBox.Show("Transaction Cancelled");
            Form splash = new Splash_Screen();

            splash.Show();
            this.Close();
        }
Beispiel #6
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do you want to Go Back to the Splash Screen?", "Do you want to go back to the Splash Screen?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         MessageBox.Show("Thank you for Using Alay Bank Atm System");
         Form splash = new Splash_Screen();
         splash.Show();
         this.Close();
     }
 }
Beispiel #7
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (DialogResult.Yes == MessageBox.Show("Do you Want to Cancel Transacation?", "Cancel Transaction", MessageBoxButtons.YesNo))
     {
         MessageBox.Show("Transaction Canceled");
         Form Splash = new Splash_Screen();
         Splash.Show();
         this.Close();
     }
     else
     {
     }
 }
Beispiel #8
0
 private void buttonOK_Click(object sender, EventArgs e)
 {
     CreateNewCard.Insert("Update card_list set PIN = '" + EncryptDecrypt.EncryptString(textBox1.Text, CreateNewCard.salt) + "' where Card_No = '" + CardInsert.encrcardnum + "'");
     MessageBox.Show("PIN sucessfully changed!");
     if (MessageBox.Show("Do you want another Transaction?", "Another Transaction", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Form mm = new Menu();
         mm.Show();
         this.Close();
     }
     else
     {
         MessageBox.Show("Thank You for Using Alay Bank ATM");
         Form splash = new Splash_Screen();
         splash.Show();
         this.Close();
     }
 }
Beispiel #9
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (Int32.Parse(maskedTextBox1.Text) > Int32.Parse(balance))
     {
         MessageBox.Show("Insuffient Balance\n Please Try Again");
         Application.Restart();
     }
     else
     {
         if (Int32.Parse(maskedTextBox1.Text) >= 100)
         {
             string newbalance = (Int32.Parse(balance) - Int32.Parse(maskedTextBox1.Text)).ToString();
             CreateNewCard.Insert("Update card_list set balance = '" + EncryptDecrypt.EncryptString(newbalance, 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("Withdrew on " + DateTime.Now, CreateNewCard.salt) + "');");
             if (MessageBox.Show("Do you want another Transaction?", "Another Transaction", MessageBoxButtons.YesNo) == DialogResult.Yes)
             {
                 Form mm = new Menu();
                 mm.Show();
                 this.Close();
             }
             else
             {
                 CreateNewCard.Initialize();
                 CreateNewCard.Insert("Insert Into transrec values ('" + CardInsert.cardnum + "','" + newbalance + "')");
                 Form print = new Recieptprint();
                 Recieptprint.source = "cash";
                 print.ShowDialog();
                 MessageBox.Show("Thank You for Using Alay Bank ATM");
                 Form splash = new Splash_Screen();
                 splash.Show();
                 this.Close();
             }
         }
         else
         {
             MessageBox.Show("Withdrawn Amount must be 100 Pesos or greater", "Withdraw Failed");
             Form splashscreen = new Splash_Screen();
             splashscreen.Show();
             this.Hide();
         }
     }
 }
Beispiel #10
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();
        }
Beispiel #11
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do you want another Transaction?", "Another Transaction", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Form mm = new Menu();
         mm.Show();
         this.Close();
     }
     else
     {
         CreateNewCard.Initialize();
         CreateNewCard.Insert("Insert Into transrec values ('" + CardInsert.cardnum + "','" + balance + "')");
         Form print = new Recieptprint();
         Recieptprint.source = "cash";
         print.ShowDialog();
         MessageBox.Show("Thank You for Using Alay Bank ATM");
         Form splash = new Splash_Screen();
         splash.Show();
         this.Close();
     }
 }
Beispiel #12
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (Int32.Parse(Balance_Inquiry.balance) >= Int32.Parse(Amount.Text))
            {
                int rbalance;
                rbalance = Int32.Parse(Balance_Inquiry.balance) - Int32.Parse(Amount.Text);
                if (Int32.Parse(Amount.Text) >= 1000)
                {
                    int rewardpoint = Int32.Parse(Amount.Text) / 1000;
                    int newpoints   = Int32.Parse(Balance_Inquiry.points) + rewardpoint;
                    CreateNewCard.Insert("Update card_list set ponts = '" + EncryptDecrypt.EncryptString(newpoints.ToString(), CreateNewCard.salt) + "' where Card_No = '" + CardInsert.encrcardnum + "'");
                }
                CreateNewCard.Insert("Update card_list set balance = '" + EncryptDecrypt.EncryptString(rbalance.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("Paid bill on " + DateTime.Now, CreateNewCard.salt) + "');");
                if (MessageBox.Show("Do you want another Transaction?", "Another Transaction", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    Form mm = new Menu();
                    mm.Show();
                    this.Close();
                }
                else
                {
                    CreateNewCard.Initialize();
                    CreateNewCard.Insert("Insert Into transrec values ('" + CardInsert.cardnum + "','" + rbalance + "')");
                    Form print = new Recieptprint();
                    Recieptprint.source = "cash";
                    print.ShowDialog();
                    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 Balance\n Thank you for using Alay Bank ATM");
            }
        }