Esempio n. 1
0
 public void SoldProduct(SoldModel sold)
 {
     var product = db.Products.Find(sold.ProductID);
     if (product != null)
     {
         product.SoldPrice = sold.soldPrice;
         product.SoldDate = sold.soldeDate;
         product.IsSold = true;
         product.UpdatedBy = User.Identity.Name;
         product.UpdatedDate = DateTime.Now;
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 public ActionResult SoldProductGet(int id)
 {
     SoldModel sd = new SoldModel() { ProductID = id };
     return PartialView("SoldProduct",sd);
 }