public void Initialize() { culture = new CultureInfo("en-US"); // Used for comparing decimals with strings dataAccessFacade = new DataAccessFacadeStub(); customerController = new CustomerController(dataAccessFacade); supplierController = new SupplierController(dataAccessFacade); paymentController = new PaymentController(dataAccessFacade); bookingController = new BookingController(paymentController, customerController, dataAccessFacade); ICustomer lonelyTree = customerController.CreateCustomer(CustomerType.Bureau, "", "Lonely Tree"); }
public BookingsUserControl(BookingController bookingController, SupplierController supplierController, CustomerController customerController) { InitializeComponent(); this.bookingController = bookingController; this.supplierController = supplierController; this.customerController = customerController; bookingsDataGrid.ItemsSource = bookingController.ReadAllBookings(); bookingTypeComboBox.ItemsSource = Enum.GetValues(typeof(BookingType)); bookingTypeComboBox.SelectedIndex = 0; collapsePlusImage = new BitmapImage(new Uri("/Images/collapse-plus.png", UriKind.Relative)); collapseMinImage = new BitmapImage(new Uri("/Images/collapse-min.png", UriKind.Relative)); autoCompleteEntries = new HashSet<string>(); addAutoCompleteEntries(); culture = MainWindow.GetCulture(); }
public MainWindow() { InitializeComponent(); SupplierController supplierController = new SupplierController(); CustomerController customerController = new CustomerController(); PaymentController paymentController = new PaymentController(); BookingController bookingController = new BookingController(paymentController, customerController); accountingControl = new AccountingUserControl(paymentController, supplierController, customerController); accountingUserControl.Content = accountingControl; suppliersUserControl.Content = new SuppliersUserControl(supplierController, customerController); customersUserControl.Content = new CustomersUserControl(customerController); bookingsUserControl.Content = new BookingsUserControl(bookingController, supplierController, customerController); currentTabIndex = 0; }
public IncomingPaymentsUserControl(PaymentController paymentController, CustomerController customerController, SupplierController supplierController) { InitializeComponent(); this.paymentController = paymentController; this.customerController = customerController; this.supplierController = supplierController; details = new DetailsUserControl(paymentController); details.payeeTextBox.Text = "Lonely Tree"; details.payeeTextBox.IsEnabled = false; detailsUserControl.Content = details; collapsePlusImage = new BitmapImage(new Uri("/Images/collapse-plus.png", UriKind.Relative)); collapseMinImage = new BitmapImage(new Uri("/Images/collapse-min.png", UriKind.Relative)); RefreshPaymentDataGrid(); }
public AccountingUserControl(PaymentController paymentController, SupplierController supplierController, CustomerController customerController) { InitializeComponent(); this.paymentController = paymentController; this.supplierController = supplierController; this.customerController = customerController; incomingPaymentsControl = new IncomingPaymentsUserControl(paymentController, customerController, supplierController); outgoingPaymentsControl = new OutgoingPaymentsUserControl(paymentController, customerController, supplierController); archivedPaymentsControl = new ArchivedPaymentsUserControl(paymentController); incomingPaymentsUserControl.Content = incomingPaymentsControl; outgoingPaymentsUserControl.Content = outgoingPaymentsControl; archiveUserControl.Content = archivedPaymentsControl; currentTabIndex = mainTabNavigation.SelectedIndex; }
public SuppliersUserControl(SupplierController supplierController, CustomerController customerController) { InitializeComponent(); this.customerController = customerController; this.supplierController = supplierController; culture = MainWindow.GetCulture(); suppliersDataGrid.ItemsSource = supplierController.ReadAllSuppliers(); supplierTypeComboBox.ItemsSource = Enum.GetValues(typeof(SupplierType)); supplierTypeComboBox.SelectedIndex = 0; accountTypeComboBox.ItemsSource = Enum.GetValues(typeof(AccountType)); accountTypeComboBox.SelectedIndex = 0; bookingTypeComboBox.ItemsSource = Enum.GetValues(typeof (BookingType)); bookingTypeComboBox.SelectedIndex = 0; baseDateComboBox.ItemsSource = Enum.GetValues(typeof (BaseDate)); baseDateComboBox.SelectedIndex = 0; paymentTypeComboBox.ItemsSource = Enum.GetValues(typeof (PaymentType)); paymentTypeComboBox.SelectedIndex = 0; collapsePlusImage = new BitmapImage(new Uri("/Images/collapse-plus.png", UriKind.Relative)); collapseMinImage = new BitmapImage(new Uri("/Images/collapse-min.png", UriKind.Relative)); autoCompleteEntries = new HashSet<string>(); AddCustomersToAutoComplete(customerController.ReadAllCustomers()); }