public ActionResult ShowUserOffers(String UserID) { if (User.Identity.Name != "") { if (UserID == null) { UserID = (string)Session["UserID"]; } WorkWithOffers WWO = new WorkWithOffers(Server); WorkWithUsers WWU = new WorkWithUsers(); IQueryable <Offers> UserOffers = WWO.GetUserOffers(UserID); Users ActiveUser = WWU.GetUserByID(UserID); ViewBag.UserName = ActiveUser.FirstName + " " + ActiveUser.LastName; Session["UserID"] = UserID; return(View(UserOffers)); } else { return(RedirectToAction("AccessDenied", "AccessDenied")); } }
public ActionResult ShowUserInfo(string UserID) { if (UserID == null) { UserID = (string)Session["UserID"]; } WorkWithUsers WWU = new WorkWithUsers(); Session["UserID"] = UserID; return(View(WWU.GetUserByID(UserID))); }