Example #1
0
        ///////////////////////////////////////////////////
        /////////////////Model////////////////////////////
        /////////////////////////////////////////////////
        private void addModelbutton_Click(object sender, EventArgs e)
        {
            textBoxModelInsert.Hide();
            MarkAutoCB.Hide();
            СhooseMarkLabel.Hide();
            TypeModelLabel.Hide();
            addModelbutton.Hide();
            NumDoorsSeats.Hide();
            textBoxSeats.Hide();
            textBoxDoors.Hide();
            Type_kuz.Hide();
            textBoxKuz.Hide();
            string query = "insert into Automobile values('" + MarkAutoCB.Text + "' , '" + textBoxModelInsert.Text + "','" + textBoxKuz.Text + "'," + textBoxDoors.Text + ", " + textBoxSeats.Text + ")";

            ExecuteQuery(query);
            string LBquerystr = "SELECT Engine_type FROM Specifications";

            LBquery(LBquerystr, listBoxSpecs);
            LBquerystr = "SELECT Equipment FROM Complectation";
            LBquery(LBquerystr, listBoxCompl);
            LBquerystr = "SELECT * FROM Colour";
            LBquery(LBquerystr, listBoxColour);
            ChoosespecsLabel.Show();
            ChooseCompllabel.Show();
            ChooseColourLabel.Show();
            listBoxSpecs.Show();
            listBoxCompl.Show();
            listBoxColour.Show();
            readyAddModelButton.Show();
        }
Example #2
0
 private void readyAddModelButton_Click(object sender, EventArgs e)
 {
     readyAddModelButton.Hide();
     ChoosespecsLabel.Hide();
     ChooseCompllabel.Hide();
     ChooseColourLabel.Hide();
     listBoxSpecs.Hide();
     listBoxCompl.Hide();
     listBoxColour.Hide();
     textBoxModelInsert.Show();
     MarkAutoCB.Show();
     СhooseMarkLabel.Show();
     TypeModelLabel.Show();
     addModelbutton.Show();
 }