예제 #1
0
        //Sign in confirmation
        private void button12_Click(object sender, EventArgs e)
        {
            con.Open();

            string query = "Select * from [Table] Where Card_number = '" + tb_card.Text.Trim() + "' AND Pin_code = '" + tb_pin.Text.Trim() + "'";

            cmd             = new SqlCommand();
            cmd.CommandText = query;
            sda             = new SqlDataAdapter(query, con);
            dt = new DataTable();
            sda.Fill(dt);


            if (dt.Rows.Count == 1)
            {
                TakeUserData();
                ClearTextBoxes();
                this.Hide();
                atm_acc.Show();
            }
            else
            {
                label3.Text      = "Wrong card or pin-code! Please, try again!";
                label3.ForeColor = Color.DarkRed;
                ClearTextBoxes();
            }

            con.Close();
        }
예제 #2
0
        //Back to account form
        private void btn_back_Click(object sender, EventArgs e)
        {
            ATM_account accForm = new ATM_account();

            this.Hide();
            accForm.Show();
        }
예제 #3
0
        //Return to previous form
        private void Transfer_confirm_FormClosed(object sender, FormClosedEventArgs e)
        {
            ATM_account accForm = new ATM_account();

            this.Hide();
            accForm.Show();
        }
예제 #4
0
        //Transfer confirmation button
        private void btn_confirm_transfer_Click(object sender, EventArgs e)
        {
            //Takes money from owner account
            UpdateAccWallet();

            //Transfer money to receiver account
            TransferMoneyToReceiver();
            ATM_account accForm = new ATM_account();

            this.Hide();
            accForm.Show();
            MessageBox.Show("Succeeded!");
        }