public bool XoaLoaiPhong(ref string err, string LoaiPhong) { QuanLyKhachSanEntities qlksEntity = new QuanLyKhachSanEntities(); KIEUPHONG kp = new KIEUPHONG(); kp.LoaiPhong = LoaiPhong; qlksEntity.KIEUPHONGs.Attach(kp); qlksEntity.KIEUPHONGs.Remove(kp); qlksEntity.SaveChanges(); return(true); }
public bool ThemLoaiPhong(string LoaiPhong, int GiaPhong, ref string err) { QuanLyKhachSanEntities qlksEntity = new QuanLyKhachSanEntities(); KIEUPHONG kp = new KIEUPHONG(); kp.LoaiPhong = LoaiPhong; kp.GiaPhong = GiaPhong; qlksEntity.KIEUPHONGs.Add(kp); qlksEntity.SaveChanges(); return(true); }