Esempio n. 1
0
        /// <summary>
        /// Loads CustomerRegister and clear the temporary list TempIncomeList
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnChoseCustomer_Click(object sender, RoutedEventArgs e)
        {
            CustomerRegister customerRegister = new CustomerRegister(true);

            if (customerRegister.ShowDialog() == true)
            {
                dgIncomeProduct.IsEnabled   = true;
                SelectedCustomer            = customerRegister.SelectedCustomer;
                FinancialIncomeList         = new ObservableCollection <FinancialIncome>(RevenueManagement.Instance.GetFinancialIncomesByCustomer(SelectedCustomer.CustomerID));
                dgIncomeProduct.ItemsSource = FinancialIncomeList;
                lblCustomerID.Content       = SelectedCustomer.CustomerID;
                lblCustomerName.Content     = SelectedCustomer.CustomerName;

                LockPrimaryCells();
                if (CurrentFinancialIncomeYear.FinancialIncomeLock == false)
                {
                    btnDelete.IsEnabled = true;
                    btnSave.IsEnabled   = true;
                }
                UpdateLabels();
            }
        }
Esempio n. 2
0
        private void btnKundhantering_Click(object sender, RoutedEventArgs e)
        {
            CustomerRegister customerRegister = new CustomerRegister();

            customerRegister.ShowDialog();
        }