Esempio n. 1
0
 public static List <SpecialInvent> GetAllSpecialInvent()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.SpecialInvent.ToList());
     }
 }
Esempio n. 2
0
 //get all
 public static List <Rating> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.ToList());
     }
 }
Esempio n. 3
0
 //get by id
 public static Visiters GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.FirstOrDefault(v => v.ld == id));
     }
 }
Esempio n. 4
0
 //get all
 public static List <InventDose> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.InventDose.ToList());
     }
 }
Esempio n. 5
0
 //get all
 public static List <Visiters> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.ToList());
     }
 }
Esempio n. 6
0
 public static Visiters GetByPassword(string username, string password)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Visiters.FirstOrDefault(p => p.Password == password && p.NameUser == username));
     }
 }
 //get all
 public static List <EmployeesTypes> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.ToList());
     }
 }
 //get by id
 public static EmployeesTypes GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.EmployeesTypes.Find(id));
     }
 }
Esempio n. 9
0
 public static StatusInvent GetByIdStatusInvent(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.StatusInvent.Find(id));
     }
 }
Esempio n. 10
0
 //get by category
 public static List <Menu> GetByCategory(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.Where(item => item.Category == id).ToList());
     }
 }
Esempio n. 11
0
 //get by id
 public static Menu GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.Find(id));
     }
 }
Esempio n. 12
0
 //get by id
 public static Rating GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Rating.Find(id));
     }
 }
Esempio n. 13
0
 //get all
 public static List <Tables> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.ToList());
     }
 }
Esempio n. 14
0
 public static Employees Login(string username, string password)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Employees.FirstOrDefault(p => p.Password == password && p.LastName == username));
     }
 }
Esempio n. 15
0
 //get all
 public static List <Category> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.ToList());
     }
 }
Esempio n. 16
0
 //get by id
 public static Category GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Category.Find(id));
     }
 }
Esempio n. 17
0
 //get all
 public static List <CommentVisiter> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CommentVisiter.ToList());
     }
 }
Esempio n. 18
0
 //get by id
 public static CurrentEmployee GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.Find(id));
     }
 }
Esempio n. 19
0
 //get by id
 public static Tables GetById(int id)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Tables.Find(id));
     }
 }
Esempio n. 20
0
 //get all
 public static List <CurrentEmployee> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.CurrentEmployee.ToList());
     }
 }
Esempio n. 21
0
 //get all
 public static List <Menu> GetAll()
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         return(db.Menu.ToList());
     }
 }
Esempio n. 22
0
 //add
 public static void Add(Category Category)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Category.Add(Category);
         db.SaveChanges();
     }
 }
Esempio n. 23
0
        //    get by id
        //    public static CommentVisiter GetById(int id)
        //    {

        //        using (restaurantEntities db = new restaurantEntities())
        //        {
        //            return db.CommentVisiter.Find(id);
        //        }


        //    }
        //    add
        public static void Add(CommentVisiter CommentVisiter)
        {
            using (restaurantEntities db = new restaurantEntities())
            {
                db.CommentVisiter.Add(CommentVisiter);
                db.SaveChanges();
            }
        }
Esempio n. 24
0
 //delete
 public static void Delete(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Remove(currentEmployee);
         db.SaveChanges();
     }
 }
Esempio n. 25
0
 //update
 public static void Update(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(currentEmployee).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 26
0
 //add
 public static void Add(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Add(currentEmployee);
         db.SaveChanges();
     }
 }
Esempio n. 27
0
 //delete
 public static void Delete(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Remove(tables);
         db.SaveChanges();
     }
 }
Esempio n. 28
0
 //update
 public static void Update(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(tables).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 29
0
 //add
 public static void Add(Tables tables)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Tables.Add(tables);
         db.SaveChanges();
     }
 }
Esempio n. 30
0
 //delete
 public static void Delete(Rating Rating)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Rating.Remove(Rating);
         db.SaveChanges();
     }
 }