public ActionResult Projects()
        {
            EntrepreneurAuth cred = check_clientRelation();

            if (!cred.Valid)
            {
                return(Redirect(@"/User/Index"));
            }
            manageClient_Sessions(cred);
            Models.EntrepreneurIndexViewModel entrepreneurAccount = new Models.EntrepreneurIndexViewModel(cred.Entrepreneur_ID, User.Identity.GetUserId());
            return(View(entrepreneurAccount));
        }
        public ActionResult Details(int id, string Entrepreneur_Message)
        {
            Models.EntrepreneurIndexViewModel entrepreneurModel = new Models.EntrepreneurIndexViewModel(id, User.Identity.GetUserId());
            SessionUserAccessor session = get_SessionIDs();

            if (session.Entrepreneur_ID > 0)
            {
                entrepreneurModel.message_Entrepreneur(id, session.Entrepreneur_ID, 4, Entrepreneur_Message);
            }
            else if (session.Investor_ID > 0)
            {
                entrepreneurModel.message_Entrepreneur(id, session.Investor_ID, 3, Entrepreneur_Message);
            }
            else
            {
                entrepreneurModel.message_Entrepreneur(id, entrepreneurModel.User_Id, 1, Entrepreneur_Message);
            }
            return(View(entrepreneurModel));
        }
 public ActionResult Details(int id)
 {
     Models.EntrepreneurIndexViewModel entrepreneurModel;
     if (User.Identity.GetUserId() != null)
     {
         SessionUserAccessor session = get_SessionIDs();
         if (session.Entrepreneur_ID > 0)
         {
             entrepreneurModel = new Models.EntrepreneurIndexViewModel(id, User.Identity.GetUserId(), session.Entrepreneur_ID);
             if (entrepreneurModel.Profile_Public)
             {
                 return(View(entrepreneurModel));
             }
             else
             {
                 return(Redirect("/Search/Index"));
             }
         }
         else if (session.Investor_ID > 0)
         {
             entrepreneurModel = new Models.EntrepreneurIndexViewModel(id, User.Identity.GetUserId(), session.Investor_ID);
             if (entrepreneurModel.Profile_Public)
             {
                 return(View(entrepreneurModel));
             }
             else
             {
                 return(Redirect("/Search/Index"));
             }
         }
     }
     else
     {
         entrepreneurModel = new Models.EntrepreneurIndexViewModel();
         entrepreneurModel._get_EntrepreneurData(id);
         if (entrepreneurModel.Profile_Public)
         {
             return(View(entrepreneurModel));
         }
     }
     return(Redirect("/Search/Index"));
 }