Пример #1
0
        private void loadDataKhach()
        {
            dtKhach = new DataTable();
            dtKhach.Clear();
            dtKhach = khach.getKhach();

            //dua data len datagirdview\
            dgvListUsers.DataSource = dtKhach;

            //thay doi do rong cot
            dgvListUsers.AutoResizeColumns();

            /* try
             * {
             *   dtbill = new DataTable();
             *   dtbill.Clear();
             *   DataSet ds = blbill.LayThongTinDonHang();
             *   dtbill = ds.Tables[0];
             *   //dua data len datagirdview
             *   dgvBanHang.DataSource = dtbill;
             *   //thay doi do rong cot
             *   dgvBanHang.AutoResizeColumns();
             * }
             * catch(SqlException)
             * {
             *   MessageBox.Show("Không lấy được thong tin don hang. Lỗi rồi!!!");
             * } */
        }
Пример #2
0
 private void Reload()
 {
     dataGridViewKhach.DataSource = khach.getKhach();
     foreach (DataGridViewColumn column in dataGridViewKhach.Columns)
     {
         column.SortMode = DataGridViewColumnSortMode.NotSortable;
     }
 }