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()); } }
public void Update(Student student) { dal.Update(student); }
public bool Update(student student) { return(studentDAL.Update(student)); }
public void Update(Student entity) { _studentDAL.Update(entity); }