Example #1
0
 public ActionResult NewProject(NewProject model)
 {
     if (Session["Username"] == null)
     {
         return(RedirectToAction("LogIn", "User"));
     }
     else
     {
         WorkStationDAL.Project Pro = new WorkStationDAL.Project();
         if (Pro.NewProject(Convert.ToInt32(Session["IdAd"]), Session["Username"].ToString(), model.ProjectInformation) != -1)
         {
             return(View("~/Views/Alert/NewProjectCreated.cshtml"));
         }
         else
         {
             return(View("~/Views/Alert/ProjectNotCreated.cshtml"));
         }
     }
     return(View());
 }
Example #2
0
        public ActionResult Profile()
        {
            if (Session["Username"] != null)
            {
                WorkStationDAL.User    User    = new WorkStationDAL.User();
                WorkStationDAL.Skills  Skills  = new WorkStationDAL.Skills();
                WorkStationDAL.Project Project = new WorkStationDAL.Project();

                ViewBag.UserProfile             = User.UserProfile(Session["Username"].ToString());
                ViewBag.TechnicalLanguageSkills = Skills.TechnicalLanguageSkills(Session["Username"].ToString());
                ViewBag.TechnologySkills        = Skills.TechnologySkills(Session["Username"].ToString());
                ViewBag.LanguageSkills          = Skills.LanguageSkills(Session["Username"].ToString());
                ViewBag.ProjectReview           = Project.ProjectReview(Session["Username"].ToString());
            }
            else
            {
                return(RedirectToAction("LogIn", "User"));
            }
            return(View());
        }