Ejemplo n.º 1
0
        /// <summary>
        /// Send the product selected to the Product Info Form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void NextButton_Click(object sender, EventArgs e)
        {
            ProductInfoForm productInfo = new ProductInfoForm(_selectedComputer, this);

            productInfo.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// event handler for opening the saved form
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _savedOrderButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.Show();
        }
Ejemplo n.º 3
0
        private void BackButton_Click(object sender, EventArgs e)
        {
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.ShowDialog();
            this.Close();
        }
Ejemplo n.º 4
0
        // Go to the product info form

        private void btn_loadOrder_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = this;
            productInfoForm.Show();
        }
        private void NextButton_Click(object sender, EventArgs e)
        {
            savingProducts();

            this.Hide();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.ShowDialog();
        }
Ejemplo n.º 6
0
        //Shows next form
        private void NextButton_Click(object sender, EventArgs e)
        {
            ProductInfoForm info = new ProductInfoForm();

            info.previousForm = this;

            this.Hide();
            info.Show();
        }
Ejemplo n.º 7
0
        /// <summary>
        /// when the next button is pressed the select form is hidden and the productinfo form is opened
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _nextButton_Click(object sender, EventArgs e)
        {
            // Instantiate the next form
            ProductInfoForm productInfoForm = new ProductInfoForm();

            // pass a reference from the current form to the next form
            productInfoForm.previousForm = this;

            productInfoForm.Show();
            this.Hide();
        }
Ejemplo n.º 8
0
        // open product info form and the open file dialog
        private void btnOpenSaved_Click(object sender, EventArgs e)
        {
            SelectForm      selectForm      = new SelectForm();
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = selectForm;

            this.Hide();
            productInfoForm.Show();
            productInfoForm.OpenFile(btnOpenSaved, e);
        }
Ejemplo n.º 9
0
        // go to the next form
        private void btnNext_Click(object sender, EventArgs e)
        {
            // instantiate next form
            ProductInfoForm productInfoForm = new ProductInfoForm();

            productInfoForm.previousForm = this;

            // hide this form and show next form
            this.Hide();
            productInfoForm.Show();
        }
Ejemplo n.º 10
0
        /// <summary>
        /// event handler to generate the next form and close this one
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void _nextButton_Click(object sender, EventArgs e)
        {
            //1. intantiate
            ProductInfoForm productInfoForm = new ProductInfoForm();

            //2. pass a reference
            productInfoForm.firstForm = this;
            _storingValue();

            productInfoForm.Show();
            this.Hide();
            productInfoForm.storedValues();
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Opens a file dialog box for the user to select a previous order
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LoadOrderButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog file = new OpenFileDialog();

            file.InitialDirectory = Directory.GetCurrentDirectory();
            DialogResult result = file.ShowDialog();

            if (result != DialogResult.Cancel)
            {
                try
                {
                    StreamReader    sr  = new StreamReader(file.FileName);
                    ProductInfoForm pif = new ProductInfoForm(toProduct(sr));
                    pif.Show();
                    this.Hide();
                }
                catch (Exception)
                {
                    Debug.WriteLine("File is invalid");
                }
            }
        }