Пример #1
0
 public ActionResult Insert(bisnis_aktifitas m)
 {
     if (ModelState.IsValid)
     {
         db.bisnis_aktifitas.Add(m);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(m));
 }
Пример #2
0
 public ActionResult Edit(bisnis_aktifitas r, int id)
 {
     if (ModelState.IsValid)
     {
         db.bisnis_aktifitas.Attach(r);
         db.Entry(r).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(r));
 }
Пример #3
0
        public ActionResult AktivitasEdit(int id)
        {
            bisnis_aktifitas r = db.bisnis_aktifitas.Single(p => p.aktifitasid == id);

            return(View(r));
        }