Exemple #1
0
        public void loadTenNhaSanXuat(string str)
        {
            dt = new DataTable();
            dt = cmd.getDataTable(str);
            comboBoxNhaSanXuat.DataSource = dt;

            comboBoxNhaSanXuat.DisplayMember = dt.Columns[1].ToString();
            comboBoxNhaSanXuat.ValueMember   = dt.Columns[0].ToString();
        }
Exemple #2
0
        //194.168.1.24

        public void HienThiTongTinLenDataGird()
        {
            cmd = new Sqlcommands();
            if (cmd.open())
            {
                DataTable tb = new DataTable();
                tb = cmd.getDataTable("Select *FROM NHASANXUAT");
                danhsachNhaSanXuat.DataSource = tb;
            }
        }
Exemple #3
0
 public void HienThiThongTinMatHang(string str)
 {
     cmd = new Sqlcommands();
     //ds = new DataSet();
     //ds.Clear();
     dt = new DataTable("MATHANG");
     if (cmd.open())
     {
         //    ds = cmd.getDataSet(str);
         //    dataGridViewDanhSachMatHang.DataSource = ds.Tables[0];
         //    //     dataGridViewDanhSachMatHang.DataSource = ds;
         //}
         // dt = new DataTable();
         dt = cmd.getDataTable(str);
         dataGridViewDanhSachMatHang.DataSource = dt;
     }
 }