public List <Phong> GetPhong(DateTime ngay) { PhongDataService phongData = new PhongDataService(); List <Phong> listPhong = phongData.GetPhongHop(); if (listPhong != null && listPhong.Count > 0) { foreach (var item in listPhong) { item.ListPhong = phongData.GetPhongHopTheoNgay(ngay, item.Id); } } return(listPhong); }
public object GetInfoPhong() { PhongDataService phongData = new PhongDataService(); List <Phong> listPhong = phongData.GetInfoPhong(); List <Event> lstEvent = new List <Event>(); foreach (var item in listPhong) { Event even = new Event(); even.date = item.Ngay.ToString(); even.start = item.TuNgay.ToString(); even.end = item.DenNgay.ToString(); even.id = item.Id.ToString(); even.title = item.TenPhong; even.color = item.Color; even.name = item.CuocHop; lstEvent.Add(even); } return(lstEvent); }
public List <Phong> GetPhongByUser(string user) { PhongDataService phongData = new PhongDataService(); return(phongData.GetPhongByUser(user)); }
public int CheckDatPhong(Phong phong) { PhongDataService phongData = new PhongDataService(); return(phongData.CheckDatPhong(phong)); }