コード例 #1
0
        public IActionResult AddEPrescription(EPrescriptionDto dto)
        {
            EPrescription eprescription = EPrescriptionMapper.EPrescriptionDtoToEPrescription(dto);

            App.Instance().EPrescriptionService.AddEntity(eprescription);
            return(Ok());
        }
コード例 #2
0
        public static EPrescription EPrescriptionDtoToEPrescription(EPrescriptionDto dto)
        {
            EPrescription newEPrescriptions = new EPrescription();

            newEPrescriptions.PatientName    = dto.PatientName;
            newEPrescriptions.MedicamentName = dto.MedicamentName;
            newEPrescriptions.Comment        = dto.Comment;
            newEPrescriptions.PublishingDate = dto.PublishingDate;
            return(newEPrescriptions);
        }
コード例 #3
0
        public static EPrescriptionDto EPrescriptionToEPresctriptionDto(EPrescription ePrescription)
        {
            EPrescriptionDto dto = new EPrescriptionDto();

            dto.Id             = ePrescription.Id;
            dto.PatientId      = ePrescription.PatientId;
            dto.PatientName    = ePrescription.PatientName;
            dto.Comment        = ePrescription.Comment;
            dto.MedicamentName = ePrescription.MedicamentName;
            dto.PublishingDate = ePrescription.PublishingDate;
            return(dto);
        }
コード例 #4
0
 public EPrescription createIPrescription(EPrescriptionDto dto)
 {
     return(EPrescriptionAdapter.EPrescriptionDtoToEPresctiption(dto));
 }
コード例 #5
0
        public EPrescription Create(EPrescriptionDto dto)
        {
            EPrescription prescription = EPrescriptionAdapter.EPrescriptionDtoToEPresctiption(dto);

            return(EPrescriptionRepository.Create(prescription));
        }
コード例 #6
0
 public static EPrescription EPrescriptionDtoToEPresctiption(EPrescriptionDto dto)
 {
     return(new EPrescription(dto.Pharmacy, dto.Name, dto.Surname, dto.MedicalIDNumber, dto.Medicine, dto.Quantity, dto.Usage));
 }