private void HienthiGiaPhong(int maLoaiGia, int maLoaiPhong) { PhongBUS phongBUS = new PhongBUS(); lbGiaPhong.Text = phongBUS.LayGiaPhong(maLoaiGia, maLoaiPhong).ToString(); HienthiTraTruoc(); }
private void HienthiGiaPhong(int maLoaiGia, int maLoaiPhong) { PhongBUS phongBUS = new PhongBUS(); if (cbmLoaiDangKy.Text.Equals("theo ngay")) { TimeSpan Time = dtpkNgayKT.Value - dtpkNgayBD.Value; int TongSoNgay = Time.Days; if (TongSoNgay == 0) { TongSoNgay = 1; } lbGiaPhong.Text = (float.Parse(phongBUS.LayGiaPhong(maLoaiGia, maLoaiPhong).ToString()) * TongSoNgay).ToString(); } else { lbGiaPhong.Text = phongBUS.LayGiaPhong(maLoaiGia, maLoaiPhong).ToString(); } }