예제 #1
0
        public IActionResult UpdateDetails()
        {
            context = HttpContext.RequestServices.GetService(typeof(BCare.data.BcareContext)) as BcareContext;
            String cookie      = Request.Cookies["Session"];
            var    userDetails = context.GetUserDetailsByID(Int32.Parse(cookie.Substring(10)));

            return(View(userDetails));
        }
예제 #2
0
        public IActionResult Details()
        {
            context = HttpContext.RequestServices.GetService(typeof(BCare.data.BcareContext)) as BcareContext;
            String cookie = Request.Cookies["Session"];
            List <health_maintenance_organizations> listHMO = context.GetAllHMO();

            ViewBag.ListHMO = new SelectList(listHMO, "HMOID", "HMOName");
            if (cookie != null)
            {
                UserDetailViewModel userDetails = context.GetUserDetailsByID(Int32.Parse(cookie.Substring(10)));
                userDetails.user.PWHash = "";
                return(View(userDetails));
            }
            else
            {
                return(View());
            }
        }