public static Patient ToPatientDb(PatientAddViewModel patientAddViewModel) { Patient patient = new Patient() { LastName = patientAddViewModel.LastName, FirstName = patientAddViewModel.FirstName, CNP = patientAddViewModel.CNP }; return(patient); }
public static PatientAddViewModel ToPatientAdd(Patient patient) { PatientAddViewModel patientViewModel = new PatientAddViewModel() { CNP = patient.CNP, FirstName = patient.FirstName, LastName = patient.LastName }; return(patientViewModel); }
public static Address ToAddressDb(PatientAddViewModel patientAddViewModel) { Address address = new Address() { Number = int.Parse(patientAddViewModel.Nr), Street = patientAddViewModel.Street, City = patientAddViewModel.City, County = patientAddViewModel.County, Unit = patientAddViewModel.Unit }; if (patientAddViewModel.Floor != null) { address.Floor = int.Parse(patientAddViewModel.Floor); } if (patientAddViewModel.Floor != null) { address.ApartmentNumber = int.Parse(patientAddViewModel.ApartmentNumber); } return(address); }
public PatientAddView() { InitializeComponent(); _viewModel = new PatientAddViewModel(); BindingContext = _viewModel; }
public PatientAddPage(PatientAddViewModel viewModel) { InitializeComponent(); BindingContext = viewModel; }