public ActionResult UpdatePersonalInfo(UpdateInfo update)
        {
            var result = new Result();

            if (update != null)
            {
                IPatientMDRepository _pat = new PatientMDRepository();
                var userId   = Session["UserId"].ToString();
                var username = Session["UserName"].ToString();

                var pat = _pat.updatePersonalinfo(update, userId);
                if (pat != null)
                {
                    MembershipUser muser = Membership.GetUser(username);
                    muser.Email = update.EmailId;
                    Membership.UpdateUser(muser);
                    result.Success = "Your Personal Information Has been updated..";
                }
            }
            else
            {
                result.Error = "Please do Not Put Blank Data.";
            }

            return(Json(result));
        }
        public ActionResult PersonalInfo()
        {
            IPatientMDRepository _pat = new PatientMDRepository();
            var            userId     = Session["UserId"].ToString();
            var            username   = Session["UserName"].ToString();
            PatientMD      user       = _pat.GetByUserId(userId).First();
            MembershipUser muser      = Membership.GetUser(username);
            var            updateinfo = new UpdateInfo();

            updateinfo.PatientName = user.PatientName;
            updateinfo.DOB         = user.DateOfBirth;
            updateinfo.Sex         = user.Sex;
            updateinfo.EmailId     = muser.Email;
            return(Json(updateinfo));
        }