public IActionResult Register() { context = HttpContext.RequestServices.GetService(typeof(BCare.data.BcareContext)) as BcareContext; String cookie = Request.Cookies["Session"]; if (cookie == null) { List <health_maintenance_organizations> listHMO = context.GetAllHMO(); ViewBag.ListHMO = new SelectList(listHMO, "HMOID", "HMOName"); } return(View()); }
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()); } }