Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            BidsViewModel bidsViewModel = db.BidsViewModels.Find(id);

            db.BidsViewModels.Remove(bidsViewModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAll()
        {
            var bidsViewModel = new BidsViewModel {
                Bids = await _marketingProvider.Bids.AllAsync()
            };

            return(View(bidsViewModel));
        }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "UserUrl,UserName,Value,bidData")] BidsViewModel bidsViewModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bidsViewModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bidsViewModel));
 }
Exemplo n.º 4
0
        public ActionResult Create([Bind(Include = "UserUrl,UserName,Value,bidData")] BidsViewModel bidsViewModel)
        {
            if (ModelState.IsValid)
            {
                db.BidsViewModels.Add(bidsViewModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bidsViewModel));
        }
Exemplo n.º 5
0
        // GET: BidsListModelModels/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BidsViewModel bidsViewModel = db.BidsViewModels.Find(id);

            if (bidsViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(bidsViewModel));
        }