private void TimKiemTheoYeuCau(int s) { RoomDTO thongtin = LayThongTinTimKiem(); if (s == 1) { lstt = RoomBUS.DanhSachPhongYeuCau(thongtin); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } else if (s == 2) { lstt = RoomBUS.DanhSachPhongTheoLoai(thongtin); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } else if (s == 3) { lstt = RoomBUS.DanhSachPhongTheoLoaiTheoYeuCau(thongtin); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } else if (s == 4) { decimal dgtu = Convert.ToDecimal(txtDonGiaTu.Text); lstt = RoomBUS.DanhSachPhongTheoDGTu(dgtu); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } else if (s == 5) { decimal dgtu = Convert.ToDecimal(txtDonGiaTu.Text); decimal dgden = Convert.ToDecimal(txtDonGiaDen.Text); lstt = RoomBUS.DanhSachPhongTheoKhoangDG(dgtu, dgden); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } else if (s == 6) { decimal dgden = Convert.ToDecimal(txtDonGiaDen.Text); lstt = RoomBUS.DanhSachPhongTheoDGDen(dgden); for (int i = 0; i < lstt.Count; i++) { lstt[i].DonGia = Convert.ToDecimal(string.Format("{0:0,0}", lstt[i].DonGia)); } gcDanhSachPhong.DataSource = lstt; } }