Esempio n. 1
0
 public CRUDController()
 {
     customersList = new List<ICustomer>();
     daf = new DataAccessFacade();
     sc = new SerializeController();
     cf = new CustomerFacade();
 }
Esempio n. 2
0
 public AppointmentFacade(CustomerFacade customerfacade)
 {
     foreach (ICustomer icustomer in customerfacade.customersList)
     {
         customerfacade.AddAllCustomerAppointmentsToList(icustomer, appointmentsList);
     }
 }
Esempio n. 3
0
 public CRUDController()
 {
     customersList = new List <ICustomer>();
     daf           = new DataAccessFacade();
     sc            = new SerializeController();
     cf            = new CustomerFacade();
 }
Esempio n. 4
0
 public AppointmentFacade(CustomerFacade customerfacade)
 {
     foreach (ICustomer icustomer in customerfacade.customersList)
     {
         customerfacade.AddAllCustomerAppointmentsToList(icustomer, appointmentsList);
     }
 }
 public CreateCustomerDialog(MainWindow mainWindow, CustomerFacade cfInput, AppointmentFacade afInput)
 {
     InitializeComponent();
     this.mainWindow = mainWindow;
     cf = cfInput;
     icustomer = cf.CreateCustomer();
     af = afInput;
 }
Esempio n. 6
0
        public MainWindow()
        {
            cf = new CustomerFacade();
            af = new AppointmentFacade(cf);
            InitializeComponent();
            customersList = cf.LoadAllCustomers();

            customersDataGrid.ItemsSource = customersList;
            GetAppointments();
        }
        public CreateCustomerDialog(MainWindow mainWindow, CustomerFacade cfInput, AppointmentFacade afInput, List<ICustomer> customers)
        {
            InitializeComponent();
            cf = cfInput;
            af = afInput;
            customersList = customers;
            icustomer = cf.CreateCustomer();
            this.mainWindow = mainWindow;

            EditInsteadOfSave = false;

            appointments = new List<IAppointment>();
            AppointmentListView.ItemsSource = appointments;
        }
        // Constructor til "Ændre Kunde":
        public CreateCustomerDialog(MainWindow mainWindow, CustomerFacade cfInput, AppointmentFacade afInput, List<ICustomer> customers, ICustomer cust)
        {
            InitializeComponent();
            cf = cfInput;
            af = afInput;
            customersList = customers;
            icustomer = cust;
            this.mainWindow = mainWindow;

            appointments = cust.Appointments;
            AppointmentListView.ItemsSource = appointments;

            EditInsteadOfSave = true;

            nameTextBox.Text = cust.Name;
            contactPersonTextBox.Text = cust.ContactPerson;
            addressTextBox.Text = cust.Address;
            cityTextBox.Text = cust.City;
            zipCodeTextBox.Text = cust.ZipCode;
            phoneNumberTextBox.Text = cust.PhoneNumber;
        }