public void loadThongTinLoaiKhachHang()
 {
     cmd = new Sqlcommands();
     if (cmd.open())
     {
         SqlDataReader dr = cmd.getDataReader("SELECT  LOAIKHACHHANG.TENLOAIKHACH FROM LOAIKHACHHANG ");
         while (dr.Read())
         {
             cboLoaiKhach.Items.Add(dr["TENLOAIKHACH"]);
         }
     }
 }
Exemple #2
0
        private void rdoMa_MouseClick(object sender, MouseEventArgs e)
        {
            cmd             = new Sqlcommands();
            txtTimKiem.Text = "";
            SqlDataReader dr;

            dr = cmd.getDataReader("SELECT NHASANXUAT.IDNHASANXUAT FROM NHASANXUAT");
            while (dr.Read())
            {
                txtTimKiem.AutoCompleteCustomSource.Add(dr["IDNHASANXUAT"].ToString());
            }

            cmd.close();
        }
Exemple #3
0
 public void HienThiTimKiem()
 {
     cmd = new Sqlcommands();
     if (rdoTimTheoTen.Checked)
     {
         if (cmd.open())
         {
             txtTimKiem.Text = "";
             SqlDataReader dr;
             dr = cmd.getDataReader("SELECT NHASANXUAT.TENNHASANXUAT FROM NHASANXUAT");
             while (dr.Read())
             {
                 txtTimKiem.AutoCompleteCustomSource.Add(dr["TENNHASANXUAT"].ToString());
             }
         }
         cmd.close();
     }
 }
        public void loadThongTinMaHangTenHang()
        {
            cmd = new Sqlcommands();
            SqlDataReader dr = cmd.getDataReader("SELECT  MATHANG.IDMATHANG FROM MATHANG ");

            while (dr.Read())
            {
                txtMaHang.AutoCompleteCustomSource.Add(dr["IDMATHANG"].ToString());
            }
            cmd.close();
            cmd = new Sqlcommands();
            SqlDataReader dr2 = cmd.getDataReader("SELECT  MATHANG.TENMATHANG FROM MATHANG ");

            while (dr2.Read())
            {
                txtTenHang.AutoCompleteCustomSource.Add(dr2["TENMATHANG"].ToString());
            }
            cmd.close();
        }