Ejemplo n.º 1
0
        public ActionResult Index()
        {
            var vm = new DoctorDashboardViewModel
            {
                AcceptedPatients = _patientProfileService.All().Count(),
                Prescription     = _prescriptionService.All().Count()
            };

            return(View(vm));
        }
        // GET: Doctor
        public ActionResult Index()
        {
            string     userId            = User.Identity.GetUserId();
            AspNetUser user              = db.AspNetUsers.Find(userId);
            DoctorDashboardViewModel doc = new DoctorDashboardViewModel();

            doc.DoctorName = user.DoctorInfo.Degree + " " + user.UserName;
            ((DayOfWeek)1).ToString();
            doc.Courses = user.DoctorInfo.Courses.Select(c => new CourseViewModel {
                CourseCode = c.CourseCode, CourseDate = ((DayOfWeek)int.Parse(c.CourseDays)).ToString(), CourseName = c.CourseName, CourseTime = c.CourseTime.Value
            }).ToList();
            return(View(doc));
        }