Beispiel #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            comboBox3.Enabled = false;
            comboBox1.Items.Clear();
            comboBox3.Items.Clear();
            comboBox5.Items.Clear();
            checkBox1.Checked = false;
            if (comboBox2.Text != "" & comboBox4.Text != "")
            {
                LRrail   lrRail      = new LRrail(Int32.Parse(comboBox2.Text));
                string[] splitString = comboBox4.Text.Split(' ');
                FRrail   frRail      = new FRrail(Int32.Parse(splitString[0]));
                BArail   baRail      = new BArail(Int32.Parse(splitString[0]));

                textBox7.Text = "";

                List <string> listHeight = new List <string> {
                };
                listHeight = db.Search("TAS", "Height", "Catalogue");
                foreach (string i in listHeight)
                {
                    comboBox1.Items.Add(i);
                }

                List <string> listColor = new List <string> {
                };
                listColor = db.Search("PAH" + lrRail.depth.ToString() + frRail.width.ToString(), "Color", "Catalogue");  //boxDepth ou box.Depth (attention au type) etc..
                foreach (string i in listColor)
                {
                    comboBox5.Items.Add(i);
                }
                if (comboBox4.Text.Contains("(Doors available)"))
                {
                    checkBox1.Enabled = true;
                }
                if (!(comboBox4.Text.Contains("(Doors available)")))
                {
                    checkBox1.Enabled = false;
                }

                comboBox4.Items.Clear();
                comboBox4.Items.Add(splitString[0]);
                comboBox4.Text          = comboBox4.Items[0].ToString();
                largeur                 = Int32.Parse(comboBox4.Text);
                profondeur              = Int32.Parse(comboBox2.Text);
                tabControl1.SelectedTab = Box;
            }
            else
            {
                textBox7.Text = "Incomplete fields !";
            }
        }
Beispiel #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            textBox7.Text     = "";
            comboBox3.Enabled = true;
            string[] splitString = comboBox4.Text.Split(' ');
            FRrail   frRail      = new FRrail(Int32.Parse(splitString[0]));

            List <string> listDoor = new List <string> {
            };

            listDoor = db.Search("POR" + comboBox1.Text + frRail.width.ToString(), "Color", "Catalogue");  //boxHeight ou box.Height (attention au type) etc..
            comboBox3.Items.Clear();
            foreach (string i in listDoor)
            {
                comboBox3.Items.Add(i);
            }
        }