Пример #1
0
        public ActionResult CreateDate(Dates request)
        {
            if (request.IdPatientJs == null || request.IdPatientJs == "")
            {
                Patients            patients       = new Patients(request.Dni, request.FirstName, request.LastName);
                Response <Patients> resultPatients = ipatient.CreatePatient(patients);
                if (resultPatients.Success)
                {
                    request.IdPatient = resultPatients.Data.Id;
                }
                else
                {
                    return(Ok(resultPatients));
                }
            }
            else
            {
                request.IdPatient = new Guid(request.IdPatientJs);
            }
            request.IdService = new Guid(request.IdServiceJs);
            Response <Dates> result = idate.CreateDate(request);

            return(Ok(result));
        }
Пример #2
0
        public ActionResult CreatePatient(Patients request)
        {
            Response <Patients> result = patient.CreatePatient(request);

            return(Ok(result));
        }