Esempio n. 1
0
 public void Update(StorageEntity item)
 {
     using (var db = new InventaryContext()) {
         db.Storages.Update(item);
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public static List <WerehouseEntity> WereHouseList()
 {
     using (var contexto = new InventaryContext())
     {
         return(contexto.Werehouses.ToList());
     }
 }
Esempio n. 3
0
 public static WerehouseEntity WereHouseById(string id)
 {
     using (var contexto = new InventaryContext())
     {
         return(contexto.Werehouses.ToList().FirstOrDefault(wh => wh.WerehouseId == id));
     }
 }
Esempio n. 4
0
 public static ProductEntity ProductById(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.Products.ToList().LastOrDefault(p => p.ProductId == id));
     }
 }
Esempio n. 5
0
 public static List <StorageEntity> StorageList()
 {
     using (var db = new InventaryContext())
     {
         return(db.Storages.ToList());
     }
 }
Esempio n. 6
0
 public static List <WarehouseEntity> WarehouseList()
 {
     using (var db = new InventaryContext())
     {
         return(db.Warehouses.ToList());
     }
 }
Esempio n. 7
0
 public static List <ProductEntity> ProductList()
 {
     using (var db = new InventaryContext())
     {
         return(db.Products.ToList());
     }
 }
Esempio n. 8
0
 public static IEnumerable <OrderEntity> OrderById(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.Orders.ToList().Where(o => o.clientIdentifier == id)); // Products.ToList().LastOrDefault(p => p.productId == id);
     }
 }
Esempio n. 9
0
 public static List <OrderEntity> OrderList()
 {
     using (var db = new InventaryContext())
     {
         return(db.Orders.ToList());
     }
 }
Esempio n. 10
0
 public CategoryEntity FindElement(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.Categories.ToList().LastOrDefault(p => p.CategoryId == id));
     }
 }
Esempio n. 11
0
 public static WareHouseEntity WareHouseById(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.WareHouses.ToList().LastOrDefault(p => p.WareHouseId == id));
     }
 }
Esempio n. 12
0
 public static ProductEntity ProductById(string id)
 {
     using (var contexto = new InventaryContext())
     {
         return(contexto.Products.FirstOrDefault(p => p.ProductId == id));
     }
 }
Esempio n. 13
0
 public void CreateItem(StorageEntity item)
 {
     using (var db = new InventaryContext()) {
         db.Storages.Add(item);
         db.SaveChanges();
     }
 }
 public warehouseEntity GetWarehouseById(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.Warehouses.ToList().LastOrDefault(x => x.WarehouseId == id));
     }
 }
Esempio n. 15
0
 public static CategoryEntity CategoryById(string id)
 {
     using (var db = new InventaryContext())
     {
         return(db.Categories.ToList().LastOrDefault(c => c.CategoryId == id));
     }
 }
Esempio n. 16
0
 public void CreateItem(ProductEntity item)
 {
     using (var db =  new InventaryContext()) {
         db.Products.Add(item);
         db.SaveChanges();
     }
 }
Esempio n. 17
0
 public static List <CategoryEntity> CategoryList()
 {
     using (var db = new InventaryContext())
     {
         return(db.Categories.ToList());
     }
 }
Esempio n. 18
0
 // ----------> List
 public List <InputOutputEntity> InputOutputList()
 {
     using (var db = new InventaryContext())
     {
         return(db.InOuts.ToList());
     }
 }
Esempio n. 19
0
 public static List <StorageEntity> StorageProductsByWarehouseList(string idWarehouse)
 {
     using (var db = new InventaryContext())
     {
         return(db.Storages.Include(x => x.Product).Include(x => x.Warehouse).Where(x => x.WarehouseId == idWarehouse).ToList());
     }
 }
Esempio n. 20
0
 public static void UpdateProducts(ProductEntity uProduct)
 {
     using (var db = new InventaryContext())
     {
         db.Products.Update(uProduct);
         db.SaveChanges();
     }
 }
Esempio n. 21
0
 public void UpdateInOut(InOutEntity oInOut)
 {
     using (var db = new InventaryContext())
     {
         db.InOuts.Update(oInOut);
         db.SaveChanges();
     }
 }
Esempio n. 22
0
 public void Update(InputOutputEntity item)
 {
     using (var db = new InventaryContext())
     {
         db.InOuts.Update(item);
         db.SaveChanges();
     }
 }
Esempio n. 23
0
 public static void CreateProduct(ProductEntity oProduct)
 {
     using (var db = new InventaryContext())
     {
         db.Products.Add(oProduct);
         db.SaveChanges();
     }
 }
Esempio n. 24
0
 public void CreateCategory(InputOutputEntity oInOut)
 {
     using (var db = new InventaryContext())
     {
         db.InOuts.Add(oInOut);
         db.SaveChanges();
     }
 }
Esempio n. 25
0
 public void UpdateInOut(CategoryEntity uInOut)
 {
     using (var db = new InventaryContext())
     {
         db.Categories.Update(uInOut);
         db.SaveChanges();
     }
 }
Esempio n. 26
0
 public static void UpdateWarehouse(WarehouseEntity oWarehouse)
 {
     using (var db = new InventaryContext())
     {
         db.Warehouses.Update(oWarehouse);
         db.SaveChanges();
     }
 }
Esempio n. 27
0
 public static void CreateWareHouse(WareHouseEntity oWareHouse)
 {
     using (var db = new InventaryContext())
     {
         db.WareHouses.Add(oWareHouse);
         db.SaveChanges();
     }
 }
Esempio n. 28
0
 public static void StorageUpdate(StorageEntity storageEntity)
 {
     using (var contexto = new InventaryContext())
     {
         contexto.Storages.Update(storageEntity);
         contexto.SaveChanges();
     }
 }
Esempio n. 29
0
 public static void StorageInsert(StorageEntity storageEntity)
 {
     using (var contexto = new InventaryContext())
     {
         contexto.Storages.Add(storageEntity);
         contexto.SaveChanges();
     }
 }
Esempio n. 30
0
 public static void UpdateCategory(CategoryEntity oCategory)
 {
     using (var db = new InventaryContext())
     {
         db.Categories.Update(oCategory);
         db.SaveChanges();
     }
 }