Example #1
0
 public void update(rawstockproduct editItem)
 {
     rawstockproduct selectedRawStockProsuct = db.rawstockproducts.SingleOrDefault(item => item.id == editItem.id);
     selectedRawStockProsuct.code = editItem.code;
     selectedRawStockProsuct.name = editItem.name;
     selectedRawStockProsuct.quantity = editItem.quantity;
     selectedRawStockProsuct.buyingprice = editItem.buyingprice;
     db.SaveChanges();
 }
Example #2
0
 public void insert(rawstockproduct newItem)
 {
     db.rawstockproducts.Add(newItem);
     db.SaveChanges();
 }
Example #3
0
        public rawstockproduct selectSingle(rawstockproduct findItem)
        {
            rawstockproduct selectedRawStockProduct = db.rawstockproducts.SingleOrDefault(item => item.id == findItem.id);

            return selectedRawStockProduct;
        }
Example #4
0
 public void delete(rawstockproduct deleteItem)
 {
     rawstockproduct selectedItem= db.rawstockproducts.First(item => item.id == deleteItem.id);
     db.rawstockproducts.Remove(selectedItem);
     db.SaveChanges();
 }