Exemple #1
0
        public IActionResult Profile(int id)
        {
            int      user_id = id;
            CAccount temp    = CAccount.Get_User_By_ID(id);

            ViewBag.pic  = temp.pic;
            ViewBag.name = temp.fname;
            return(View("Profile", user_id));
        }
Exemple #2
0
        public IActionResult CreateForm(string title, string body, int user_id)
        {
            CAccount user = CAccount.Get_User_By_ID(user_id);
            string   name = user.fname;
            string   pic  = user.pic;

            Post.Create_Post(title, body, user_id, name, pic);
            return(RedirectToAction("Index", "UserDashBoard"));
        }