Esempio n. 1
0
        public static Patient ToPatientDb(PatientAddViewModel patientAddViewModel)
        {
            Patient patient = new Patient()
            {
                LastName  = patientAddViewModel.LastName,
                FirstName = patientAddViewModel.FirstName,
                CNP       = patientAddViewModel.CNP
            };

            return(patient);
        }
Esempio n. 2
0
        public static PatientAddViewModel ToPatientAdd(Patient patient)
        {
            PatientAddViewModel patientViewModel = new PatientAddViewModel()
            {
                CNP       = patient.CNP,
                FirstName = patient.FirstName,
                LastName  = patient.LastName
            };

            return(patientViewModel);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public PatientAddView()
 {
     InitializeComponent();
     _viewModel     = new PatientAddViewModel();
     BindingContext = _viewModel;
 }
Esempio n. 5
0
 public PatientAddPage(PatientAddViewModel viewModel)
 {
     InitializeComponent();
     BindingContext = viewModel;
 }