Esempio n. 1
0
        // GET: StudentProfile/Details/5
        public ActionResult Details(Guid?id)
        {
            User user;

            if (id == null & Session["user"] == null)
            {
                return(RedirectToAction("Login", "Login"));
            }
            else if (Session["user"] != null)
            {
                user = new User();
                user = (User)Session["user"];

                Student student = new Student();
                student.StudentLoadUserById(user.BaseUserID);

                if (student.Email != null)
                {
                    return(View(student));
                }
                else
                {
                    Employer employer = new Employer();
                    employer.EmployerLoadUserById(user.BaseUserID);

                    return(RedirectToAction("Details", "EmployerProfile", new { id = employer.EmployerId }));
                }
            }
            else
            {
                return(RedirectToAction("Login", "Login"));
            }
        }
Esempio n. 2
0
        // GET: Employee/Details/5
        public ActionResult Details(Guid?id)
        {
            User user;

            if (id == null & Session["user"] == null)
            {
                return(RedirectToAction("Login", "Login"));
            }
            else if (Session["user"] != null)
            {
                user = new User();
                user = (User)Session["user"];

                Employer employer = new Employer();
                employer.EmployerLoadUserById(user.BaseUserID);

                return(View(employer));
            }
            else
            {
                return(RedirectToAction("Login", "Login"));
            }
        }