Пример #1
0
 public void SoldProduct(SoldModel sold)
 {
     var product = db.Products.Find(sold.ProductID);
     if (product != null)
     {
         product.HiredPrice = sold.soldPrice;
         product.HiredDate = sold.soldeDate;
         product.IsHired = true;
         product.UpdatedBy = User.Identity.Name;
         product.UpdatedDate = DateTime.Now;
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Пример #2
0
 public ActionResult SoldProductGet(int id)
 {
     SoldModel sd = new SoldModel() { ProductID = id };
     return PartialView("SoldProduct", sd);
 }