Exemplo n.º 1
0
        public int SoLuongPhongTheoDieuKien()
        {
            DateTime         ngayNhan = new DateTime(2020, 8, 20);
            DateTime         ngayTra  = new DateTime(2020, 8, 20);
            NhanVienBusiness nhanvien = new NhanVienBusiness();

            return(nhanvien.LayDanhSachPhongTheoDieuKien(ngayNhan, ngayTra).Count);
        }
Exemplo n.º 2
0
        public IHttpActionResult LayDanhSachPhongTheoDieuKien([FromBody] dynamic dynamic)
        {
            if (dynamic == null)
            {
                return(BadRequest());
            }
            ThoiGianDatPhongDTO thoiGianDatPhong = JsonConvert.DeserializeObject <ThoiGianDatPhongDTO>(dynamic.ToString());

            using (NhanVienBusiness nhanVienBusiness = new NhanVienBusiness())
            {
                return(Ok(nhanVienBusiness.LayDanhSachPhongTheoDieuKien(thoiGianDatPhong.NgayNhan, thoiGianDatPhong.NgayTra)));
            }
        }