private void btnKetNoi_Click(object sender, EventArgs e)
 {
     try
     {
         DungChung dc = new DungChung();
         dc.KetNoi(txtServer.Text, txtDatabase.Text, txtUsername.Text, txtPassword.Text);
         frmDangNhap f = new frmDangNhap();
         this.Hide();
         f.ShowDialog();
     }
     catch (Exception tt)
     {
         MessageBox.Show("Kết nối thất bại");
     }
 }
예제 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            dc.KetNoi();
            lbHang.DataSource    = hang.getListHang();
            lbHang.DisplayMember = "TenHang";
            lbHang.ValueMember   = "MaHang";

            cbbTenXe.DataSource    = oto.getListOto();
            cbbTenXe.DisplayMember = "TenXe";
            cbbTenXe.ValueMember   = "MaXe";
            dsHoaDon = hoaDon.getListHoaDon();

            dataGridView1.DataSource = dsHoaDon;

            LoadXe();
        }
예제 #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     dc.KetNoi();
 }
예제 #4
0
 private void frmMenu_Load(object sender, EventArgs e)
 {
     dc.KetNoi();
     ds = dangNhap.getListDangNhap();
     dataGridView1.DataSource = ds;
 }