public AddNewPatientViewModel(AmbulanceDomainContext context, IServiceLocator serviceLocator) { _serviceLocator = serviceLocator; _patientDomainContext = context; NewPatient = new AddPatientPo(); Regions = new BindableCollection<Cis_Kraj>(); District = new BindableCollection<Cis_Okres>(); City = new BindableCollection<Cis_Obec>(); AddressRegions = new BindableCollection<Cis_Kraj>(); AddressDistrict = new BindableCollection<Cis_Okres>(); AddressCity = new BindableCollection<Cis_Obec>(); DisplayName = "Práva na UI"; Sex = new BindableCollection<string>(); CityId = null; }
public void TransformPoToEntity(AddPatientPo po, IdentifikacneUdaje entity) { entity.KrstneMeno = po.FirstName; entity.Priezvisko = po.LastName; entity.RodnePriezvisko = po.MaidenName!=null ? po.MaidenName: ""; entity.DatumNarodenia = BirthDate != null ? po.Birthday : new DateTime(1900, 1, 1); entity.RodCislo = po.RC != null ? po.RC : ""; entity.MiestoNarodenia = CityId; entity.Pohlavie = int.Parse(SexIndex); }