using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace check
{
    public partial class bankslist : Form
    {
        public bankslist()
        {
            InitializeComponent();
        }

        private void bankslist_Load(object sender, EventArgs e)
        {
            DataTable dt1 = new DataTable();
            DataBase db1 = new DataBase();
            dt1 = db1.MySelect("select * from bank");
            dgv_banklist.DataSource = dt1;
        }

        private void dgv_banklist_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (Application.OpenForms["account"] != null)
            {
                account account = (account)Application.OpenForms["account"];
                account.GetBankName(dgv_banklist.CurrentRow.Cells[1].Value.ToString());
                this.Close();

            }
            else
            {
                ckeck ckeck = (ckeck)Application.OpenForms["ckeck"];
                ckeck.GetBankNames(dgv_banklist.CurrentRow.Cells[1].Value.ToString());
                this.Close();
            }
        }

    }
}
