Exemple #1
0
        public IActionResult PatientPage(int id)
        {
            PatientAppointmentListVM PatientAppointmentListVM = new PatientAppointmentListVM();

            PatientAppointmentListVM.Patient      = _unitOfWork.Patient.GetFirstOrDefault(p => p.Id == id, Utility.InsuranceProp + "," + Utility.AddressProp);
            PatientAppointmentListVM.Appointments = _unitOfWork.Appointment.GetAll(a => a.PatientId == id, a => a.OrderBy(a => a.StartTime), Utility.DoctorProp);
            return(View(PatientAppointmentListVM));
        }
Exemple #2
0
        public IActionResult Index()
        {
            var DbF = Microsoft.EntityFrameworkCore.EF.Functions;
            var PatientAppointmentListVM = new PatientAppointmentListVM();
            var today   = DateTime.Now.Date;
            var nextDay = DateTime.Now.Date.AddDays(1);

            PatientAppointmentListVM.Appointments = _unitOfWork.Appointment.GetAll(a => a.StartTime >= today && a.EndTime <= nextDay, a => a.OrderBy(a => a.StartTime), Utility.PatientProp + "," + Utility.DoctorProp);
            return(View(PatientAppointmentListVM));
        }