void LoadData() { lvDSDV.Items.Clear(); DataTable dt = SQLConnection.Select("*", "DichVu"); foreach (DataRow dr in dt.Rows) { ListViewItem i = new ListViewItem(dr["TenDichVu"].ToString()); i.SubItems.Add(dr["DonGiaDV"].ToString()); i.SubItems.Add(dr["IDDichVu"].ToString()); lvDSDV.Items.Add(i); } }
void LoadData() { lvDSFood.Items.Clear(); DataTable dt = SQLConnection.Select("*", "MonAn"); foreach (DataRow dr in dt.Rows) { ListViewItem i = new ListViewItem(dr["TenMonAn"].ToString()); i.SubItems.Add(dr["DonGiaMA"].ToString()); i.SubItems.Add(dr["IDMonAn"].ToString()); lvDSFood.Items.Add(i); } }
void LoadData() { DataTable dt = SQLConnection.Select("*", "MaGiamGia"); foreach (DataRow dr in dt.Rows) { ListViewItem i = new ListViewItem(dr["IDMaGiamGia"].ToString()); i.SubItems.Add(dr["MoTa"].ToString()); i.SubItems.Add(dr["HanSuDung"].ToString()); i.SubItems.Add(dr["HieuQua"].ToString()); lvDSMGG.Items.Add(i); } }
void LoadData() { lvDSKH.Items.Clear(); DataTable dt = SQLConnection.Select("*", "KhachHang"); foreach (DataRow dr in dt.Rows) { ListViewItem i = new ListViewItem(dr["CMND"].ToString()); i.SubItems.Add(dr["TenKhachHang"].ToString()); i.SubItems.Add(dr["IDKhachHang"].ToString()); lvDSKH.Items.Add(i); } }
void LoadData() { DataTable dt = SQLConnection.Select("*", "Phong"); foreach (DataRow dr in dt.Rows) { string loai = dr["IDPhong"].ToString().Remove(1); string phong = dr["IDPhong"].ToString().Substring(1); ListViewItem i = new ListViewItem(phong); i.SubItems.Add(loai); switch (dr["TinhTrang"].ToString()) { case "True": i.SubItems.Add(daDat); break; case "False": i.SubItems.Add(chuaDat); break; } i.SubItems.Add(dr["GiaPhong"].ToString()); lvDSPhong.Items.Add(i); } }