Esempio n. 1
0
        public AppointmentViewModel(Appointment appointment, AppointmentRepository appointmentRepository)
        {
            if (appointment == null)
                throw new ArgumentNullException("appointment");

            if (appointmentRepository == null)
               throw new ArgumentNullException("appointmentRepository");

            _appointment = appointment;
            _appointmentRepository = appointmentRepository;
            //_customerType = Strings.CustomerViewModel_CustomerTypeOption_NotSpecified;
        }
Esempio n. 2
0
        public AppointmentsViewModel(AppointmentRepository appointmentRepository)
        {
            if (appointmentRepository == null)
                throw new ArgumentNullException("appointmentRepository");

            //base.DisplayName = Strings.AllCustomersViewModel_DisplayName;

            _appointmentRepository = appointmentRepository;

            // Subscribe for notifications of when a new customer is saved.
            //_appointmentRepository.CustomerAdded += this.OnCustomerAddedToRepository;

            // Populate the AllCustomers collection with CustomerViewModels.
            this.CreateAllAppointments();
        }
Esempio n. 3
0
        public MainWindowViewModel(string appointmentDataFile)
        {
            base.DisplayName = Strings.MainWindowViewModel_DisplayName;

            _appointmentRepository = new AppointmentRepository(appointmentDataFile);
        }