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 Bid(LiveBid model)
 {
     try
     {
         model.Username    = User.Identity.Name;
         model.BidDateTime = DateTime.Now;
         this.DB.LiveBid.Add(model);
         this.DB.SaveChanges();
         return(Json("SUCCESS"));
     }
     catch
     {
         return(Json("ERROR"));
     }
 }
 // POST: api/AddLiveBid
 public void Post([FromBody] LiveBid live)
 {
     db.insertLiveBid(live.CropId, live.BasePrice, live.BidPrice, live.Bemail);
 }