public ActionResult Index(int id) { LiveBidItem item = this.DB.LiveBidItems.Single(i => i.LiveBidItemId == id); @ViewBag.Name = item.Name; @ViewBag.Description = item.Description; LiveBid model = new LiveBid(); model.LiveBidItemId = id; return(View(model)); }
public ActionResult Delete(LiveBidItem model) { try { this.DB.Entry(model).State = System.Data.EntityState.Deleted; this.DB.SaveChanges(); return(Json("SUCCESS")); } catch { return(Json("ERROR")); } }
public ActionResult Create(LiveBidItem model) { try { this.DB.LiveBidItems.Add(model); this.DB.SaveChanges(); return(Json("SUCCESS")); } catch { return(Json("ERROR")); } }