SHARE
TWEET

Untitled

EraCoder Apr 26th, 2018 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.Mvc;
  6. using System.Data.Entity;
  7.  
  8. public class AdminPanelController : Controller
  9.     {
  10. [HttpPost]
  11.         public ActionResult SignIn(Models.UserLoginInfo userlogin)
  12.         {
  13.             Models.CheckUser check = new Models.CheckUser(userlogin);
  14.             if (check.ReturnResult())
  15.             {
  16.                 Session["SessionStart"] = check.Username;
  17.                 return RedirectToAction("Index");
  18.             }
  19.             else
  20.             {
  21.                 return RedirectToAction("Login");
  22.             }
  23.         }
  24.  
  25.         [HttpPost]
  26.         public ActionResult SignUp(Models.UserRegistrationInfo userRegistrationInfo)
  27.         {
  28.             Models.RegistrationUser registration = new Models.RegistrationUser(userRegistrationInfo);
  29.             if (registration.AddUser())
  30.             {
  31.                 return RedirectToAction("Login");
  32.             }
  33.             else
  34.             {
  35.                 return RedirectToAction("Registration");
  36.             }
  37.         }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top