Exemple #1
0
 public ActionResult Edit(Student student)
 {
     try
     {
         var result = _student.Update(student);
         if (result == 1)
         {
             TempData["Pesan"] = $"<span class='alert alert-success'>Berhasil mengupdate data student {student.Nama}</span><br/><br />";
             return(RedirectToAction("Index"));
         }
         else
         {
             ViewBag.PesanError = $"<span class='alert alert-danger'>Gagal mengupdate data student {student.Nama}</span>";
             return(View());
         }
     }
     catch (Exception ex)
     {
         ViewBag.PesanError = $"<span class='alert alert-danger'>{ex.Message}</span>";
         return(View());
     }
 }
Exemple #2
0
 public void Update(Student student)
 {
     dal.Update(student);
 }
Exemple #3
0
 public bool Update(student student)
 {
     return(studentDAL.Update(student));
 }
Exemple #4
0
 public void Update(Student entity)
 {
     _studentDAL.Update(entity);
 }