Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public List <Phong> GetPhongByUser(string user)
        {
            PhongDataService phongData = new PhongDataService();

            return(phongData.GetPhongByUser(user));
        }
Esempio n. 4
0
        public int CheckDatPhong(Phong phong)
        {
            PhongDataService phongData = new PhongDataService();

            return(phongData.CheckDatPhong(phong));
        }