コード例 #1
0
        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));
        }
コード例 #2
0
        /// <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;
        }
コード例 #3
0
        /// <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;
        }