예제 #1
0
 public CRUDController()
 {
     customersList = new List<ICustomer>();
     daf = new DataAccessFacade();
     sc = new SerializeController();
     cf = new CustomerFacade();
 }
예제 #2
0
 public AppointmentFacade(CustomerFacade customerfacade)
 {
     foreach (ICustomer icustomer in customerfacade.customersList)
     {
         customerfacade.AddAllCustomerAppointmentsToList(icustomer, appointmentsList);
     }
 }
예제 #3
0
 public CRUDController()
 {
     customersList = new List <ICustomer>();
     daf           = new DataAccessFacade();
     sc            = new SerializeController();
     cf            = new CustomerFacade();
 }
예제 #4
0
 public AppointmentFacade(CustomerFacade customerfacade)
 {
     foreach (ICustomer icustomer in customerfacade.customersList)
     {
         customerfacade.AddAllCustomerAppointmentsToList(icustomer, appointmentsList);
     }
 }
예제 #5
0
 public CreateCustomerDialog(MainWindow mainWindow, CustomerFacade cfInput, AppointmentFacade afInput)
 {
     InitializeComponent();
     this.mainWindow = mainWindow;
     cf = cfInput;
     icustomer = cf.CreateCustomer();
     af = afInput;
 }
예제 #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;
        }