Beispiel #1
0
        private void btnViewAllProducts_Click(object sender, EventArgs e)
        {
            this.Hide();
            AllProductsForm allProductsForm = new AllProductsForm(true);

            allProductsForm.Location      = this.Location;
            allProductsForm.StartPosition = this.StartPosition;
            allProductsForm.FormClosing  += delegate {
                AddProductRangeToUnit(allProductsForm.SelectedProducts(), allProductsForm.Amount());
                this.Show();
            };
            allProductsForm.ShowDialog();
        }
Beispiel #2
0
        private void btnEditSearch_Click(object sender, EventArgs e)
        {
            this.Hide();
            AllProductsForm allProductsForm = new AllProductsForm(false);

            allProductsForm.Location      = this.Location;
            allProductsForm.StartPosition = this.StartPosition;
            allProductsForm.FormClosing  += delegate {
                AddProductToEditForm(allProductsForm.SelectedProducts().FirstOrDefault());
                this.Show();
            };
            allProductsForm.ShowDialog();
        }
Beispiel #3
0
        private void btnDocumentProductSearch_Click(object sender, EventArgs e)
        {
            this.Hide();
            AllProductsForm allProductsForm = new AllProductsForm(true);

            if (selectedDocument != DocumentTypes.receipt)
            {
                allProductsForm.warehouseFilter = WarehouseHolder.selectedWarehouse.id;
            }
            allProductsForm.Location      = this.Location;
            allProductsForm.StartPosition = this.StartPosition;
            allProductsForm.FormClosing  += delegate {
                AddProductToReceivingForm(allProductsForm.SelectedProducts(), allProductsForm.Amount());
                this.Show();
            };
            allProductsForm.ShowDialog();
        }