Exemplo n.º 1
0
        public ActionResult AddStudent(Data.student model)
        {
            var result = new Models.AddStudent().New(model);

            if (result)
            {
                return(RedirectToAction("AddStudent", "Admin"));
            }
            return(View());
        }
Exemplo n.º 2
0
 public bool New(Data.student model)
 {
     try
     {
         db.addStudent(model.studentName, model.studentSurname, model.studentEmail, model.studentPassword);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }