Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DonationTab donationTab = db.DonationTabs.Find(id);

            db.DonationTabs.Remove(donationTab);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "DonationId,Donation,DonationDate,DonationDetail,MemberId")] DonationTab donationTab)
 {
     if (ModelState.IsValid)
     {
         db.Entry(donationTab).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MemberId = new SelectList(db.Members, "MemberId", "FirstName", donationTab.MemberId);
     return(View(donationTab));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "DonationId,Donation,DonationDate,DonationDetail,MemberId")] DonationTab donationTab)
        {
            if (ModelState.IsValid)
            {
                db.DonationTabs.Add(donationTab);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.MemberId = new SelectList(db.Members, "MemberId", "FirstName", donationTab.MemberId);
            return(View(donationTab));
        }
Exemplo n.º 4
0
        // GET: DonationTabs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DonationTab donationTab = db.DonationTabs.Find(id);

            if (donationTab == null)
            {
                return(HttpNotFound());
            }
            return(View(donationTab));
        }
Exemplo n.º 5
0
        // GET: DonationTabs/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DonationTab donationTab = db.DonationTabs.Find(id);

            if (donationTab == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MemberId = new SelectList(db.Members, "MemberId", "FirstName", donationTab.MemberId);
            return(View(donationTab));
        }