TEST 1

09/07/2010 23:39

BUTTON1 CODE:

 /*Form2 yeah = new Form2();
            yeah.Show();*/


            listBox1.Items.Add(textBox1.Text);
            listBox1.Items.Add(textBox2.Text);
            if (radioButton1.Checked)
            {
                listBox1.Items.Add("male");
            }
            else
            {
                listBox1.Items.Add("female");
            }
            listBox1.Items.Add(textBox3.Text);
            listBox1.Items.Add(textBox4.Text + " days");

            if (comboBox1.Text == "King Size")
            {
          
                int n = int.Parse(textBox4.Text);
                int m = n * 4000;
                listBox1.Items.Add("King Size");
                listBox1.Items.Add(m.ToString() );
                listBox1.Items.Add("-------------------");
            }
            else if(comboBox1.Text == "Queen Size")
            {
                int n = int.Parse(textBox4.Text);
                int m = n * 3000;
                listBox1.Items.Add("Queen Size");
                listBox1.Items.Add(m.ToString());
                listBox1.Items.Add("-------------------");
            }
            else if (comboBox1.Text == "For Four")
            {
                int n = int.Parse(textBox4.Text);
                int m = n * 2000;
                listBox1.Items.Add("For Four");
                listBox1.Items.Add(m.ToString());
                listBox1.Items.Add("-------------------");
            }
            else if (comboBox1.Text == "For Two")
            {
                int n = int.Parse(textBox4.Text);
                int m = n * 1000;
                listBox1.Items.Add("For Two");
                listBox1.Items.Add(m.ToString());
                listBox1.Items.Add("-------------------");
            }
            else if (comboBox1.Text == "Single Bed")
            {
                int n = int.Parse(textBox4.Text);
                int m = n * 500;
                listBox1.Items.Add("Single Bed");
                listBox1.Items.Add(m.ToString());
                listBox1.Items.Add("-------------------");
            }
            else
            {
            }
 

Back