public ActionResult sidebarPartialView() { var userLogin = (UserLogin)Session["userId"]; var guest = guestService.GetGuestById(userLogin.id); ViewBag.guest = guest; return(View()); }
/// <summary> /// Retrieves one value from the list of values /// </summary> /// <param name=<em>"id"</em>>The id of the item to be retrieved</param> /// <returns></returns> // GET: api/Room/5 public HttpResponseMessage GetGuest(int id) { try { var Temp = _GuestService.GetGuestById(id); if (Temp != null) { return(Request.CreateResponse(HttpStatusCode.OK, Temp)); } return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "No Room found for this id")); } catch (Exception) { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
public ActionResult editProfile(int id) { var model = guestService.GetGuestById(id); return(View(model)); }