public JsonResult GetCurrentUser() { User u = userBLL.GetByID(new Guid(HttpContext.User.Identity.Name)); CurrentUserVM current = new CurrentUserVM(); current.FullName = u.FirstName + " " + u.LastName; current.ProfileImage = profileImageBLL.GetProfileImageByUserID(u.ID).Image.Base64; var json = new JavaScriptSerializer().Serialize(current); return(Json(json, JsonRequestBehavior.AllowGet)); }
/// <summary>These details will be used to show Patient's Details in the Layout- Left Column</summary> /// <param name="currentUser"></param> protected void SetPatientProfileValues(AppUserDetailsVM currentUser) { CurrentUserVM vm = new CurrentUserVM() { DisplayName = currentUser.Name, LocalArea = currentUser.AddressBook.LocalArea, City = currentUser.AddressBook.City, ImageUrl = currentUser.ImageUrl, }; ViewBag.UserDetails = vm; }
/// <summary>These details will be used to show Doctor's Details in the Layout- Left Column</summary> /// <param name="currentUser"></param> protected void SetDoctorsProfileValues(AppUserDetailsVM currentUser) { CurrentUserVM vm = new CurrentUserVM() { DisplayName = "Dr. " + currentUser.Name, Degrees = currentUser.DoctorDetails.DoctorDegrees(), Chamber = currentUser.CurrentRole.OrganisationName, ImageUrl = "user-3.png" }; //currentUser.AddressBook.LocalArea = currentUser.CurrentRole.OrganisationName; //## Current Selected Chamber ViewBag.UserDetails = vm; }