public ActionResult AddStudent(Data.student model) { var result = new Models.AddStudent().New(model); if (result) { return(RedirectToAction("AddStudent", "Admin")); } return(View()); }
public bool New(Data.student model) { try { db.addStudent(model.studentName, model.studentSurname, model.studentEmail, model.studentPassword); return(true); } catch (Exception) { return(false); } }