Exemplo n.º 1
0
        private void byFlightNumberToolStripMenuItem_Click(object sender, EventArgs e)
        {
            filter = 1;
            bool flag = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Name == "AddFilter_Form")
                {
                    flag = true;
                    AF.textBox_FilterComment.Text = "Enter flight number " + Environment.NewLine + "Format: xx000, x - letter, 0 - number";
                    AF.Visible = true;
                    AF.Activate();
                    AF.filter = filter;
                }
            }
            if (!flag)
            {
                AF = new AddFilter_Form(filter, this);
                AF.textBox_FilterComment.Text = "Enter flight number" + Environment.NewLine + "Format: xx000, x - letter, 0 - number";
                AF.Show();
            }
        }
Exemplo n.º 2
0
        private void byDateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            filter = 3;
            bool flag = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Name == "AddFilter_Form")
                {
                    flag = true;
                    AF.textBox_FilterComment.Text = "Enter date " + Environment.NewLine + "Format: dd.mm.yyyy";
                    AF.Visible = true;
                    AF.Activate();
                    AF.filter = filter;
                }
            }
            if (!flag)
            {
                AF = new AddFilter_Form(filter, this);
                AF.textBox_FilterComment.Text = "Enter date " + Environment.NewLine + "Format: dd.mm.yyyy";
                AF.Show();
            }
        }
Exemplo n.º 3
0
        private void byTotalWeightToolStripMenuItem_Click(object sender, EventArgs e)
        {
            filter = 4;
            bool flag = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Name == "AddFilter_Form")
                {
                    flag = true;
                    AF.textBox_FilterComment.Text = "Enter total weight" + Environment.NewLine + "Luggage exceeding the specified weight will be displayed";
                    AF.Visible = true;
                    AF.Activate();
                    AF.filter = filter;
                }
            }
            if (!flag)
            {
                AF = new AddFilter_Form(filter, this);
                AF.textBox_FilterComment.Text = "Enter total weight" + Environment.NewLine + "Luggage exceeding the specified weight will be displayed";
                AF.Show();
            }
        }
Exemplo n.º 4
0
        private void byDestinationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            filter = 2;
            bool flag = false;

            foreach (Form f in Application.OpenForms)
            {
                if (f.Name == "AddFilter_Form")
                {
                    flag = true;
                    AF.textBox_FilterComment.Text = "Enter destination";
                    AF.Visible = true;
                    AF.Activate();
                    AF.filter = filter;
                }
            }
            if (!flag)
            {
                AF = new AddFilter_Form(filter, this);
                AF.textBox_FilterComment.Text = "Enter destination";
                AF.Show();
            }
        }