Example #1
0
 public void DeleteCategory(CategoryEntity oCategory)
 {
     using (var db = new InventoryContext())
     {
         db.Categories.Remove(oCategory);
         db.SaveChanges();
     }
 }
 public void CreateInOut(InputOutputEntity oInOut)
 {
     using (var db = new InventoryContext())
     {
         db.Add(oInOut);
         db.SaveChanges();
     }
 }
Example #3
0
 public static void UpdateProduct(ProductEntity oProduct)
 {
     using (var db = new InventoryContext())
     {
         db.Products.Update(oProduct);
         db.SaveChanges();
     }
 }
Example #4
0
 public void CreateCategory(CategoryEntity oCategory)
 {
     using (var db = new InventoryContext())
     {
         db.Categories.Add(oCategory);
         db.SaveChanges();
     }
 }
Example #5
0
 public void CreateProduct(ProductEntity oProduct)
 {
     using (var db = new InventoryContext())
     {
         db.Products.Add(oProduct);
         db.SaveChanges();
     }
 }
Example #6
0
        public InventoryItem AddInventoryItems(InventoryItem items)
        {
            _context.InventoryItems.Add(items);

            _context.SaveChanges();

            return(items);
        }
Example #7
0
 public void CreateItem(WareHouseEntity item)
 {
     using (dbContext = new InventoryContext())
     {
         dbContext.WareHouses.Update(item);
         dbContext.SaveChanges();
     }
 }
 public void DeleteInOut(InputOutputEntity oInOut)
 {
     using (var db = new InventoryContext())
     {
         db.Remove(oInOut);
         db.SaveChanges();
     }
 }
 public void UpdateItem(ProductEntity item)
 {
     using (var db = new InventoryContext())
     {
         db.Products.Update(item);
         db.SaveChanges();
     }
 }
Example #10
0
 public void Add(GoodsReceive gr)
 {
     using (var context = new InventoryContext())
     {
         context.GoodsReceives.Add(gr);
         context.SaveChanges();
     }
 }
Example #11
0
 public void Update(ModuleAccessCtrlTransaction txn)
 {
     using (var context = new InventoryContext())
     {
         context.Entry(txn).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Example #12
0
 public void Update(GoodsReceive gr)
 {
     using (var context = new InventoryContext())
     {
         context.Entry(gr).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Example #13
0
 public static void CreateStorage(StorageEntity storage)
 {
     using (var db = new InventoryContext())
     {
         db.Storages.Add(storage);
         db.SaveChanges();
     }
 }
Example #14
0
 public void UpdateWareHouse(WareHouseEntity objWareHouse)
 {
     using (var db = new InventoryContext())
     {
         db.WareHouses.Update(objWareHouse);
         db.SaveChanges();
     }
 }
Example #15
0
 public static void UpdateWarehouse(WarehouseEntity oWarehouse)
 {
     using (InventoryContext db = new InventoryContext())
     {
         db.Warehouses.Update(oWarehouse);
         db.SaveChanges();
     }
 }
Example #16
0
 public void Update(Role role)
 {
     using (var context = new InventoryContext())
     {
         context.Entry(role).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Example #17
0
 public void UpdateItem(StorageEntity item)
 {
     using (var dbContext = new InventoryContext())
     {
         dbContext.Storages.Update(item);
         dbContext.SaveChanges();
     }
 }
Example #18
0
 public static void UpdateCategory(CategoryEntity category)
 {
     using (var db = new InventoryContext())
     {
         db.Categories.Update(category);
         db.SaveChanges();
     }
 }
Example #19
0
 public void Add(User user)
 {
     using (var context = new InventoryContext())
     {
         context.Users.Add(user);
         context.SaveChanges();
     }
 }
 public void DeleteStorage(StorageEntity oStorage)
 {
     using (var db = new InventoryContext())
     {
         db.Remove(oStorage);
         db.SaveChanges();
     }
 }
Example #21
0
 public void UpdateInputOutput(InputOutputEntity objInputOutput)
 {
     using (var db = new InventoryContext())
     {
         db.InOut.Update(objInputOutput);
         db.SaveChanges();
     }
 }
 public void UpdateStorage(StorageEntity oStorage)
 {
     using (var db = new InventoryContext())
     {
         db.Update(oStorage);
         db.SaveChanges();
     }
 }
Example #23
0
 public static void UpdateWherehouse(WherehouseEntity wherehouse)
 {
     using (var db = new InventoryContext())
     {
         db.Wherehouses.Update(wherehouse);
         db.SaveChanges();
     }
 }
 public void UpdateItem(WarehouseEntity item)
 {
     using (var db = new InventoryContext())
     {
         db.Warehouses.Update(item);
         db.SaveChanges();
     }
 }
Example #25
0
 public void Add(FCU fcu)
 {
     using (var context = new InventoryContext())
     {
         context.FCUs.Add(fcu);
         context.SaveChanges();
     }
 }
Example #26
0
 public ActionResult TeslimBirimEkle(Birim b)
 {
     try
     {
         db.Birim.Add(b);
         db.SaveChanges();
         TempData["GenelMesaj"] = "Teslim birimi ekleme işlemi başarılı bir şekilde tamamlanmıştır.";
         return(RedirectToAction("TeslimBirim"));
     }
     catch (Exception)
     {
         return(Redirect("/Admin/Hata"));
     }
 }
Example #27
0
 public static void CreateWareHouse(WareHouseEntity oWareHouse)
 {
     using (var db = new InventoryContext())
     {
         oWareHouse.WarehouseId = Guid.NewGuid().ToString();
         db.WareHouses.Add(oWareHouse);
         db.SaveChanges();
     }
 }
Example #28
0
 public void TestAdd()
 {
     using (var context = new InventoryContext())
     {
         string assetTagString = Guid.NewGuid().ToString();
         var    queryCat       = context.Categories.First();
         context.Inventory.Add(new InventoryItem {
             AssetTag = assetTagString, Name = "Test Item", Category = queryCat, Notes = "Notes go here"
         });
         context.SaveChanges();
         var currentPlace = context.Inventory.ToList();
         var queryItem    = context.Inventory.Where(item => item.AssetTag == assetTagString).FirstOrDefault();
         context.Transactions.Add(new Checkout {
             Item = queryItem, Owner = "David", Start = DateTime.UtcNow, Out = true
         });
         context.SaveChanges();
     }
 }
        public ActionResult Create([Bind(Include = "ID,Name,PhotographyOfArticle,MemeType,TextField,CategoryId")] Article article)
        {
            //string base64string = Convert.ToBase64String(article.PhotographyOfArticle);
            //Dodato je: article.PhotographyOfArticle != null && article.PhotographyOfArticle.Length > 0
            if (ModelState.IsValid && article.PhotographyOfArticle != null && article.PhotographyOfArticle.Length > 0)
            {
                //     var PhotographyOfArticle = Path.GetFileName(article.PhotographyOfArticle.ToList<byte>);
                //     var path = Path.Combine(Server.MapPath("Inventory.Maps"), PhotographyOfArticle);
                //     article.PhotographyOfArticle.SaveAs(path);

                db.Articles.Add(article);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.CategoryId = new SelectList(db.Categories, "ID", "Name", article.CategoryId);
            return(View(article));
        }
Example #30
0
        public int Inser(string idProduct, string idVoucher, int quantityInput, int priceInput, int quantityOutput, string note)
        {
            int rowAffected = 0;

            ReceiveVoucherInfo voucherInfo = new ReceiveVoucherInfo();

            voucherInfo.IDProduct        = idProduct;
            voucherInfo.IDReceiveVoucher = idVoucher;
            voucherInfo.QuantityInput    = quantityInput;
            voucherInfo.PriceInput       = priceInput;
            voucherInfo.QuantityOutput   = quantityOutput;
            voucherInfo.Note             = note;

            db.ReceiveVoucherInfoes.Add(voucherInfo);
            rowAffected = db.SaveChanges();

            return(rowAffected);
        }
        static void CreatePatients(InventoryContext context)
        {
            var beers = new List<Beer>();

            var beer = new Beer
            {
                Name = "Amanda Silver",
                //Picture = GetPatientPicture(0),
                Created = DateTime.Now
            };
            beers.Add(beer);

            context.Beers.AddRange(beers);
            context.SaveChanges();
        }