Example #1
0
 public ActionResult Edit(Models.Tmahasiswa edit)
 {
     if (ModelState.IsValid)
     {
         try
         {
             // TODO: Add update logic here
             crudm.Edit(edit);
             crudm.Save();
             return(RedirectToAction("Index"));
         }
         catch
         {
         }
     }
     return(View());
 }
Example #2
0
 public ActionResult Create([Bind(Exclude = "NRP")] Models.Tmahasiswa mahasiswabaru)
 {
     if (ModelState.IsValid)
     {
         try
         {
             // TODO: Add insert logic here
             crudm.NewMahasiswa(mahasiswabaru);
             crudm.Save();
             return(RedirectToAction("Index"));
         }
         catch
         {
         }
     }
     return(View());
 }
Example #3
0
        //
        // GET: /Home/Delete/5

        public ActionResult Delete(int id)
        {
            Models.Tmahasiswa tm = crudm.Tampil(id);
            return(View(tm));
        }