Пример #1
0
 public ActionResult Signup(user_info us)
 {
     if (repo.checkUsername(us.user_name))
     {
         ViewBag.error = "User_name Exists!!";
         return(View());
     }
     else
     {
         if (us.name != "" && us.password != null)
         {
             us.user_type = "student";
             repo.Insert(us);
             return(RedirectToAction("Index"));
         }
         else
         {
             ViewBag.error = "Please Fill All Fields";
             return(View());
         }
     }
 }
Пример #2
0
 public ActionResult Create(user_info us)
 {
     us.user_type = "teacher";
     repo.Insert(us);
     return(RedirectToAction("Index"));
 }