public void DeleteRoom2(int numberroom) { QLKhachsanEntities entity = new QLKhachsanEntities(); entity.Phongs.Remove(entity.Phongs.FirstOrDefault(e => e.Sophong == numberroom)); entity.SaveChanges(); }
public void PostEmployee(Nhanvien employee) { QLKhachsanEntities entity = new QLKhachsanEntities(); entity.Nhanviens.Add(employee); entity.SaveChanges(); }
public void PostRoom2(Phong room) { QLKhachsanEntities entity = new QLKhachsanEntities(); entity.Phongs.Add(room); entity.SaveChanges(); }
public void DeleteBill(long iddat) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Datphongs.Remove(entity.Datphongs.FirstOrDefault(e => e.IDDAT.Equals(iddat))); entity.SaveChanges(); } }
public void DeleteCustomer(string CMT) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Khachhangs.Remove(entity.Khachhangs.FirstOrDefault(e => e.CMT.Equals(CMT))); entity.SaveChanges(); } }
public void Taotk(TaiKhoan dangnhap) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.TaiKhoans.Add(dangnhap); entity.SaveChanges(); } }
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(); } }
public void PostTypeRoom(Loaiphong loai) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Loaiphongs.Add(loai); entity.SaveChanges(); } }
public void DeleteService(long iddv) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Dichvus.Remove(entity.Dichvus.FirstOrDefault(e => e.IDDV == iddv)); entity.SaveChanges(); } }
public void PostCTHDDV(Chitietdatdichvu cthddv) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Chitietdatdichvus.Add(cthddv); entity.SaveChanges(); } }
public void PostCustomer(Khachhang customer) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Khachhangs.Add(customer); entity.SaveChanges(); } }
public void PostCTHDP(Chitietdatphong ctdp) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Chitietdatphongs.Add(ctdp); entity.SaveChanges(); } }
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(); } }
public void DeleteEmployees(string manv) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Nhanviens.Remove(entity.Nhanviens.FirstOrDefault(e => e.MaNV == manv)); entity.SaveChanges(); } }
public void DeleteTypeRoom(string loai) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { entity.Loaiphongs.Remove(entity.Loaiphongs.FirstOrDefault(e => e.Loaiphong1.Equals(loai))); entity.SaveChanges(); } }
public void deletetk(string manv) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var tk = entity.TaiKhoans.FirstOrDefault(e => e.MaNV.Equals(manv)); entity.TaiKhoans.Remove(tk); entity.SaveChanges(); } }
public void updateroom1(long sophong, Phong room) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var em = entity.Phongs.FirstOrDefault(e => e.Sophong.Equals(sophong)); em.Tinhtrang = room.Tinhtrang; entity.SaveChanges(); } }
public void Thaydoi(string manv, TaiKhoan login) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var tk = entity.TaiKhoans.FirstOrDefault(e => e.MaNV.Equals(manv)); tk.Matkhau = login.Matkhau; entity.SaveChanges(); } }
public void PutCTHDDV(long idhd, long iddv, Chitietdatdichvu cthddv) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var em = entity.Chitietdatdichvus.FirstOrDefault(e => e.IDDAT.Equals(idhd) && e.IDDV == iddv); em.IDDAT = cthddv.IDDAT; em.IDDV = cthddv.IDDV; em.Soluong = cthddv.Soluong; entity.SaveChanges(); } }
public void PutCTHDP(long sophong, long iddat, Chitietdatphong ctdp) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var cth = entity.Chitietdatphongs.FirstOrDefault(e => e.Sophong.Equals(sophong) && e.IDDAT.Equals(iddat)); // cth.Sophong = cthdp.Sophong; // cth.IDHD = cthdp.IDHD; cth.Ngayden = ctdp.Ngayden; cth.Ngaydi = ctdp.Ngaydi; entity.SaveChanges(); } }
public void PutService(long iddv, Dichvu service) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var en = entity.Dichvus.FirstOrDefault(e => e.IDDV == iddv); en.TenDV = service.TenDV; en.GiaDV = service.GiaDV; en.DVT = service.DVT; en.Hinh = service.Hinh; en.Mota = service.Mota; entity.SaveChanges(); } }
public void PutRoom2(int numberroom, Phong room) { QLKhachsanEntities entity = new QLKhachsanEntities(); var en = entity.Phongs.FirstOrDefault(e => e.Sophong == numberroom); en.Sophong = room.Sophong; en.Tinhtrang = room.Tinhtrang; en.Loaiphong = room.Loaiphong; en.Ghichu = room.Ghichu; entity.SaveChanges(); }
public void PutTypeRoom(string loai, Loaiphong loaiphong) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var room = entity.Loaiphongs.FirstOrDefault(e => e.Loaiphong1.Equals(loai)); //room.Loaiphong1 = loaiphong.Loaiphong1; room.Gia = loaiphong.Gia; room.Mota = loaiphong.Mota; room.Hinhanh = loaiphong.Hinhanh; entity.SaveChanges(); } }
public void PutBill(long iddat, Datphong bill) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var bi = entity.Datphongs.FirstOrDefault(e => e.IDDAT.Equals(iddat)); bi.IDDAT = bill.IDDAT; bi.Ngaydat = bill.Ngaydat; bi.MaNV = bill.MaNV; bi.CMT = bill.CMT; bi.Ghichu = bill.Ghichu; entity.SaveChanges(); } }
public void PutCustomer(string CMT, Khachhang customer) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var cus = entity.Khachhangs.FirstOrDefault(e => e.CMT.Equals(CMT)); cus.CMT = customer.CMT; cus.Hoten = customer.Hoten; cus.Ngaysinh = customer.Ngaysinh; cus.Gioitinh = customer.Gioitinh; cus.Diachi = customer.Diachi; cus.SDT = customer.SDT; entity.SaveChanges(); } }
public void PutEmployees(string manv, Nhanvien employee) { using (QLKhachsanEntities entity = new QLKhachsanEntities()) { var en = entity.Nhanviens.FirstOrDefault(e => e.MaNV == manv); en.MaNV = employee.MaNV; en.Hoten = employee.Hoten; en.Gioitinh = employee.Gioitinh; en.SDT = employee.SDT; en.Hinh = employee.Hinh; en.Ghichu = employee.Ghichu; entity.SaveChanges(); } }