Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            CanHelp canHelp = db.CanHelps.Find(id);

            db.CanHelps.Remove(canHelp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "CanHelpId,FirstName,LastName,Email,CreditCard,CV,Amount")] CanHelp canHelp)
 {
     if (ModelState.IsValid)
     {
         db.Entry(canHelp).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("DonateConfirmed", new { id = canHelp.CanHelpId }));
     }
     return(View(canHelp));
 }
Пример #3
0
        // GET: CanHelps/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CanHelp canHelp = db.CanHelps.Find(id);

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