Ejemplo n.º 1
0
        // GET: Journal/Create
        public ActionResult Create()
        {
            var doctors = _doctorRepository.GetAll().Select(x => new DoctorViewModel
            {
                DoctorId   = x.DoctorId,
                FirstName  = x.FirstName,
                SecondName = x.SecondName
            });
            var medRecord = _medRecordRepository.GetAll().Select(x => new MedRecordViewModel
            {
                MedRecordId = x.MedRecordId,
                DOB         = x.DOB,
                FirstName   = x.FirstName,
                SecondName  = x.SecondName
            });
            var procedures = _procedureRepository.GetAll().Select(x => new ProcedureViewModel
            {
                ProcedureId = x.ProcedureId,
                Name        = x.Name
            });

            var addJournalViewModel = new AddJournalViewModel
            {
                Doctors    = doctors,
                MedRecords = medRecord,
                Procedures = procedures
            };

            return(View(addJournalViewModel));
        }
Ejemplo n.º 2
0
        //GET: MedRecords
        public ActionResult MedRecords()
        {
            var medRecords = _mapper.Map <IEnumerable <MedRecordViewModel> >(_medRecordRepository.GetAll());

            return(View(medRecords));
        }
Ejemplo n.º 3
0
        // GET: MedRecord
        public ActionResult Index([FromQuery] OrderDirection order)
        {
            var medRecords = _mapper.Map <IEnumerable <MedRecordViewModel> >(_medRecordRepository.GetAll(x => x.DOB, order));

            return(View(medRecords));
        }