Exemplo n.º 1
0
 public void PostBill(Datphong datphong)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.SP_THEMDAT(datphong.Ngaydat.ToString(), datphong.MaNV, datphong.CMT, datphong.Ghichu);
     }
 }
Exemplo n.º 2
0
 public IEnumerable <SP_CTDATDV_Result> GetCTHDDV(long idhd)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.SP_CTDATDV(idhd).ToList());
     }
 }
 public IEnumerable <LOADROOMRANH_Result> GetRR(string loaip)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.LOADROOMRANH(loaip).ToList());
     }
 }
Exemplo n.º 4
0
        public void DeleteRoom2(int numberroom)
        {
            QLKhachsanEntities entity = new QLKhachsanEntities();

            entity.Phongs.Remove(entity.Phongs.FirstOrDefault(e => e.Sophong == numberroom));
            entity.SaveChanges();
        }
Exemplo n.º 5
0
 public void LuuHD(Hoadon hoadon)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.LuuHoaDon(hoadon.Tienphong, hoadon.Tiendichvu, hoadon.VAT, hoadon.Khuyenmai, hoadon.Ngaylap, hoadon.IDDAT);
     }
 }
 public IEnumerable <SP_CTDATPHONG_Result> GetCTHDP(long iddat)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.SP_CTDATPHONG(iddat).ToList());
     }
 }
Exemplo n.º 7
0
 public IEnumerable <TIMKH_Result> GetTim(string cmt)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.TIMKH(cmt).ToList());
     }
 }
Exemplo n.º 8
0
 public void PostService(Dichvu Service)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.THEMDV(Service.TenDV, Service.GiaDV, Service.DVT, Service.Hinh, Service.Mota);
     }
 }
Exemplo n.º 9
0
        public void PostEmployee(Nhanvien employee)
        {
            QLKhachsanEntities entity = new QLKhachsanEntities();

            entity.Nhanviens.Add(employee);
            entity.SaveChanges();
        }
Exemplo n.º 10
0
        public void PostRoom2(Phong room)
        {
            QLKhachsanEntities entity = new QLKhachsanEntities();

            entity.Phongs.Add(room);
            entity.SaveChanges();
        }
Exemplo n.º 11
0
 public IEnumerable <THONGKETHANG_Result> Get(string ngay)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.THONGKETHANG(ngay).ToList());
     }
 }
Exemplo n.º 12
0
        public IEnumerable <Phong> GetRooms()
        {
            QLKhachsanEntities entity = new QLKhachsanEntities();

            entity.Configuration.ProxyCreationEnabled = false;
            return(entity.Phongs.ToList());
        }
Exemplo n.º 13
0
 public IEnumerable <SP_LOGIN_Result> GetLogin(string ac, string pass)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         return(entity.SP_LOGIN(ac, pass).ToList());
     }
 }
Exemplo n.º 14
0
 public IEnumerable <KTMANV_Result> KTNV(string manv)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.KTMANV(manv).ToList());
     }
 }
Exemplo n.º 15
0
 public IEnumerable <SEARCHUSER_Result> SearchUser(string name)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.SEARCHUSER(name).ToList());
     }
 }
Exemplo n.º 16
0
 public IEnumerable <Nhanvien> GetEmployees()
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.Nhanviens.ToList());
     }
 }
Exemplo n.º 17
0
 public void DeleteCTHDDV(long iddv, long idhd)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Chitietdatdichvus.Remove(entity.Chitietdatdichvus.FirstOrDefault(e => e.IDDAT.Equals(idhd) && e.IDDV == iddv));
         entity.SaveChanges();
     }
 }
Exemplo n.º 18
0
 public void PostCTHDDV(Chitietdatdichvu cthddv)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Chitietdatdichvus.Add(cthddv);
         entity.SaveChanges();
     }
 }
Exemplo n.º 19
0
 public IEnumerable <Loaiphong> GetTypeRoom()
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.Loaiphongs.ToList());
     }
 }
Exemplo n.º 20
0
 public void DeleteTypeRoom(string loai)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Loaiphongs.Remove(entity.Loaiphongs.FirstOrDefault(e => e.Loaiphong1.Equals(loai)));
         entity.SaveChanges();
     }
 }
Exemplo n.º 21
0
 public void PostTypeRoom(Loaiphong loai)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Loaiphongs.Add(loai);
         entity.SaveChanges();
     }
 }
Exemplo n.º 22
0
 public void DeleteEmployees(string manv)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Nhanviens.Remove(entity.Nhanviens.FirstOrDefault(e => e.MaNV == manv));
         entity.SaveChanges();
     }
 }
Exemplo n.º 23
0
 public void Taotk(TaiKhoan dangnhap)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.TaiKhoans.Add(dangnhap);
         entity.SaveChanges();
     }
 }
Exemplo n.º 24
0
 public void DeleteService(long iddv)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Dichvus.Remove(entity.Dichvus.FirstOrDefault(e => e.IDDV == iddv));
         entity.SaveChanges();
     }
 }
Exemplo n.º 25
0
 public IEnumerable <Hoadon> Get()
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.Hoadons.ToList());
     }
 }
Exemplo n.º 26
0
 public void PostCTHDP(Chitietdatphong ctdp)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Chitietdatphongs.Add(ctdp);
         entity.SaveChanges();
     }
 }
Exemplo n.º 27
0
 public IEnumerable <Datphong> GetBill()
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.Datphongs.ToList());
     }
 }
Exemplo n.º 28
0
 public void DeleteBill(long iddat)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Datphongs.Remove(entity.Datphongs.FirstOrDefault(e => e.IDDAT.Equals(iddat)));
         entity.SaveChanges();
     }
 }
Exemplo n.º 29
0
 public void DeleteCTHDP(long sophong, long iddat)
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Chitietdatphongs.Remove(entity.Chitietdatphongs.FirstOrDefault(e => e.IDDAT.Equals(iddat) && e.Sophong.Equals(sophong)));
         entity.SaveChanges();
     }
 }
Exemplo n.º 30
0
 public IEnumerable <Chitietdatdichvu> Get()
 {
     using (QLKhachsanEntities entity = new QLKhachsanEntities())
     {
         entity.Configuration.ProxyCreationEnabled = false;
         return(entity.Chitietdatdichvus.ToList());
     }
 }