Exemplo n.º 1
0
        private void ChooseModelModifCB_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            СhooseMarkModifCB.Items.Clear();
            string sqlExpression = "SELECT Mark_auto FROM Automobile Where Model_auto = '" + ChooseModelModifCB.Text + "'";

            CBquery(sqlExpression, СhooseMarkModifCB);
            if (!Model)
            {
                ++countChosenauto;
                Model = true;
            }
            if (countChosenauto == 2)
            {
                countChosenauto = 0;
                ColorModif.Show();
                EngineModif.Show();
                ComplectationModif.Show();
                YearModif.Show();
                YearTB.Show();
                Pricelbl.Show();
                PriceTB.Show();
                ModifButton.Show();
                ColorModifCB.Show();
                sqlExpression = "SELECT Colour FROM Automobile_colour Where _ID_Auto IN(select ID_Auto from Automobile Where Mark_Auto = '" + СhooseMarkModifCB.Text + "' AND Model_auto = '" + ChooseModelModifCB.Text + "')";
                CBquery(sqlExpression, ColorModifCB);
                SpecsModifCB.Show();
                sqlExpression = "SELECT Engine_type FROM Automobile_Specification Where _ID_Auto IN(select ID_Auto from Automobile Where Mark_Auto = '" + СhooseMarkModifCB.Text + "' AND Model_auto = '" + ChooseModelModifCB.Text + "')";
                CBquery(sqlExpression, SpecsModifCB);
                ComplectModifCB.Show();
                sqlExpression = "SELECT Equipment FROM Automobile_Complectation Where _ID_Auto IN(select ID_Auto from Automobile Where Mark_Auto = '" + СhooseMarkModifCB.Text + "' AND Model_auto = '" + ChooseModelModifCB.Text + "')";
                CBquery(sqlExpression, ComplectModifCB);
                Model = false;
            }
        }
Exemplo n.º 2
0
 private void UPDradiobtn_CheckedChanged(object sender, EventArgs e)
 {
     if (UPDradiobtn.Checked == true)
     {
         ProductIDcbx.Show();
         ProductsIDlbl.Show();
         ProductNametxt.Show();
         ProductNamelbl.Show();
         Pricetxt.Show();
         Pricelbl.Show();
         btn.Show();
         btn.Text = "Edit";
     }
 }
Exemplo n.º 3
0
 private void Searchbtn_CheckedChanged_1(object sender, EventArgs e)
 {
     if (Searchbtn.Checked == true)
     {
         ProductIDcbx.Hide();
         ProductsIDlbl.Hide();
         ProductNametxt.Show();
         ProductNamelbl.Show();
         Pricetxt.Show();
         Pricelbl.Show();
         btn.Show();
         btn.Text = "Search";
     }
 }
Exemplo n.º 4
0
 private void INSradiobtn_CheckedChanged(object sender, EventArgs e)
 {
     if (INSradiobtn.Checked == true)
     {
         ProductIDcbx.Hide();
         ProductsIDlbl.Hide();
         ProductNametxt.Show();
         ProductNamelbl.Show();
         Pricetxt.Show();
         Pricelbl.Show();
         btn.Show();
         btn.Text = "ADD";
     }
 }