Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbMemberAccount tbmemberaccount = db.tbMemberAccount.Find(id);

            db.tbMemberAccount.Remove(tbmemberaccount);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        //
        // GET: /MemberAccount/Delete/5

        public ActionResult Delete(int id = 0)
        {
            tbMemberAccount tbmemberaccount = db.tbMemberAccount.Find(id);

            if (tbmemberaccount == null)
            {
                return(HttpNotFound());
            }
            return(View(tbmemberaccount));
        }
Esempio n. 3
0
 public ActionResult Edit(tbMemberAccount tbmemberaccount)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbmemberaccount).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbmemberaccount.Member_ID);
     return(View(tbmemberaccount));
 }
Esempio n. 4
0
        //
        // GET: /MemberAccount/Edit/5

        public ActionResult Edit(int id = 0)
        {
            tbMemberAccount tbmemberaccount = db.tbMemberAccount.Find(id);

            if (tbmemberaccount == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbmemberaccount.Member_ID);
            return(View(tbmemberaccount));
        }
Esempio n. 5
0
        public ActionResult Create(tbMemberAccount tbmemberaccount)
        {
            if (ModelState.IsValid)
            {
                db.tbMemberAccount.Add(tbmemberaccount);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbmemberaccount.Member_ID);
            return(View(tbmemberaccount));
        }