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

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

            return(patientViewModel);
        }
示例#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);
        }
 public PatientAddView()
 {
     InitializeComponent();
     _viewModel     = new PatientAddViewModel();
     BindingContext = _viewModel;
 }
示例#5
0
 public PatientAddPage(PatientAddViewModel viewModel)
 {
     InitializeComponent();
     BindingContext = viewModel;
 }