public void LoadDS()
 {
     dtDS.Rows.Clear();
     lsHoaDon = busDatHang.SelectDatHang_TinhTrang(mode, maNH, "Đã Giao");
     for (int i = 0; i < lsHoaDon.Count; i++)
     {
         DataRow row = dtDS.NewRow();
         row["STT"]          = i + 1;
         row["TenNCC"]       = lsHoaDon[i].TenNCC;
         row["TongTien"]     = lsHoaDon[i].TongTien;
         row["ThoiGianGiao"] = lsHoaDon[i].ThoiGianGiao;
         dtDS.Rows.Add(row);
     }
 }
Example #2
0
 public void LoadDSDatHang()
 {
     gridDatHang.DataSource = null;
     dtDatHang.Rows.Clear();
     lsDatHang = busDatHang.SelectDatHang_TinhTrang(mode, maNH, "Chưa Giao");
     for (int i = 0; i < lsDatHang.Count; i++)
     {
         DataRow row = dtDatHang.NewRow();
         row["STT"]         = i + 1;
         row["TenNCC"]      = lsDatHang[i].TenNCC;
         row["TongTien"]    = lsDatHang[i].TongTien;
         row["ThoiGianDat"] = lsDatHang[i].ThoiGianDat;
         dtDatHang.Rows.Add(row);
     }
     gridDatHang.DataSource = dtDatHang;
 }