예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id);

            db.tbBonusRecord.Remove(tbbonusrecord);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
        //
        // GET: /BonusRecord/Delete/5

        public ActionResult Delete(int id = 0)
        {
            tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id);

            if (tbbonusrecord == null)
            {
                return(HttpNotFound());
            }
            return(View(tbbonusrecord));
        }
예제 #3
0
 public ActionResult Edit(tbBonusRecord tbbonusrecord)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbbonusrecord).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbbonusrecord.Member_ID);
     return(View(tbbonusrecord));
 }
예제 #4
0
        //
        // GET: /BonusRecord/Edit/5

        public ActionResult Edit(int id = 0)
        {
            tbBonusRecord tbbonusrecord = db.tbBonusRecord.Find(id);

            if (tbbonusrecord == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Member_ID = new SelectList(db.tbMemberInfo, "Member_ID", "Member_Name", tbbonusrecord.Member_ID);
            return(View(tbbonusrecord));
        }
예제 #5
0
        public ActionResult Create(tbBonusRecord tbbonusrecord)
        {
            if (ModelState.IsValid)
            {
                db.tbBonusRecord.Add(tbbonusrecord);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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