Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }