Пример #1
0
        public void AddTypeProduct(string _name)
        {
            var typeProduct = new TypeProduct(_name);

            using (var db = new InveTimeContext())
            {
                db.TypeProducts.Add(typeProduct);
                db.SaveChanges();
            }
        }
Пример #2
0
        public void AddPositionUser(string _position, int _acsessLevel)
        {
            var positionUser = new PositionUser(_position, _acsessLevel);

            using (var db = new InveTimeContext())
            {
                db.PositionUsers.Add(positionUser);
                db.SaveChanges();
            }
        }
Пример #3
0
        public void AddProduct(string _EAC, string _name, int _amount, double?_cost)
        {
            var product = new Product(_EAC, _name, _amount, _cost);

            using (var db = new InveTimeContext())
            {
                db.Products.Add(product);
                db.SaveChanges();
            }
        }
Пример #4
0
        public void AddUser(string _login, string _password, string _name, string _secondName, string _email)
        {
            var user = new User(_login, _password, _name, _secondName, _email);

            using (var db = new InveTimeContext())
            {
                db.Users.Add(user);
                db.SaveChanges();
            }
        }