public ActionResult Step3(GetClinicRegistrationUserFormCommand command) { var answer = _clinicRegistrationsService.GetClinicRegistrationUserForm(command); return View(answer); }
public GetClinicRegistrationUserFormCommandAnswer GetClinicRegistrationUserForm(GetClinicRegistrationUserFormCommand command) { var hospital = this._hospitalRepository.GetModels().FirstOrDefault(model => model.Id == command.CurrentHospitalId); var sectionProfile = this._sectionProfileRepository.GetModels().FirstOrDefault(model => model.Id == command.SectionProfileId); return new GetClinicRegistrationUserFormCommandAnswer { CurrentHospitalId = command.CurrentHospitalId, DateValue = command.Date, Date = command.Date.ToCorrectDateString(), SectionProfileId = command.SectionProfileId, SexId = command.SexId, Code = Guid.NewGuid().ToString(), CurrentHospital = hospital.Name, Sex = command.SexId != null ? ((Sex)command.SexId).ToCorrectString() : string.Empty, Token = command.Token.Value, FirstName = "", LastName = "", PhoneNumber = "", SectionProfile = sectionProfile.Name, Years = 0, Months = 0, Weeks = 0, AgeCategoryId = command.AgeCategoryId }; }