public ActionResult action_insert_teacher(tbl_teacher_presonal_information tb) { Teacher_Repository tr = new Teacher_Repository(); int result = tr.insert_teacher(tb); if (result == 0) { return(HttpNotFound()); } return(RedirectToAction("show_teacher")); }
public void insert_teacher(tbl_teacher_presonal_information tb) { Teacher_Repository tr = new Teacher_Repository(); int result = tr.insert_teacher(tb); if (result == 0) { ViewData["msg"] = "عملیات با خطا مواجه شد"; } else { ViewData["msg"] = "ثبت با موفقیت انجام شد"; } }