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));
        }
Example #2
0
 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"));
     }
 }
Example #3
0
 public ActionResult Create(LiveBidItem model)
 {
     try
     {
         this.DB.LiveBidItems.Add(model);
         this.DB.SaveChanges();
         return(Json("SUCCESS"));
     }
     catch
     {
         return(Json("ERROR"));
     }
 }