private void btnChooseProduct_Click(object sender, RoutedEventArgs e)
        {
            ProductRegister productRegister = new ProductRegister(true, DepartmentID);

            if (productRegister.ShowDialog() == true)
            {
                if (SelectedProducts.Contains(productRegister.SelectedProduct))
                {
                    MessageBox.Show("Du kan inte välja samma produkt flera gånger");
                }
                else
                {
                    SelectedProducts.Add(productRegister.SelectedProduct);
                    CreateColumn(productRegister.SelectedProduct);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Loads CustomerRegister and clear the temporary list TempIncomeList
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnChoseProduct_Click(object sender, RoutedEventArgs e)
        {
            ProductRegister productRegister = new ProductRegister(true);

            if (productRegister.ShowDialog() == true)
            {
                SelectedProduct              = productRegister.SelectedProduct;
                FinancialIncomeList          = new ObservableCollection <FinancialIncome>(RevenueManagement.Instance.GetFinancialIncomesByProduct(SelectedProduct.ProductID));
                dgIncomeCustomer.ItemsSource = FinancialIncomeList;
                lblProductID.Content         = SelectedProduct.ProductID;
                lblProductName.Content       = SelectedProduct.ProductName;
                dgIncomeCustomer.IsEnabled   = true;
                LockPrimaryCells();
                if (CurrentFinancialIncomeYear.FinancialIncomeLock == false)
                {
                    btnDelete.IsEnabled = true;
                    btnSave.IsEnabled   = true;
                }

                UpdateLabels();
            }
        }
示例#3
0
        private void btnProdukthantering_Click(object sender, RoutedEventArgs e)
        {
            ProductRegister productRegister = new ProductRegister();

            productRegister.ShowDialog();
        }