Exemplo n.º 1
0
        void Combo_mjenjac()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "mjenjac";
            var           itemi = alen.popuni(query);

            cobx_Mjenjač.DataSource = itemi;
        }
Exemplo n.º 2
0
        void Combo_oprema()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "paketopreme";
            var           itemi = alen.popuni(query);

            cobx_Oprema.DataSource = itemi;
        }
Exemplo n.º 3
0
        void Combo_gorivo()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "gorivo";
            var           itemi = alen.popuni(query);

            cobx_Gorivo.DataSource = itemi;
        }
Exemplo n.º 4
0
        void Combo_model()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "model";
            var           itemi = alen.popuni(query);

            cobx_Model.DataSource = itemi;
        }
Exemplo n.º 5
0
        void Combo_marka()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "marka";
            var           itemi = alen.popuni(query);

            cobx_Marka.DataSource = itemi;
        }
Exemplo n.º 6
0
        void Combo_vrsta()
        {
            konf_combobox alen  = new konf_combobox();
            string        query = "vrsta_auto";
            var           itemi = alen.popuni(query);

            cobx_Vrsta.DataSource = itemi;
        }
Exemplo n.º 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(cobx_Vrsta.Text))
            {
                MessageBox.Show("Niste odabrali sva polja!");
            }

            else if (string.IsNullOrEmpty(cobx_Marka.Text))
            {
                MessageBox.Show("Niste odabrali sva polja!");
            }

            else if (string.IsNullOrEmpty(cobx_Model.Text))
            {
                MessageBox.Show("Niste odabrali sva polja!");
            }

            else if (string.IsNullOrEmpty(cobx_Oprema.Text))
            {
                MessageBox.Show("Niste odabrali sva polja!");
            }

            else if (string.IsNullOrEmpty(cobx_Mjenjač.Text))
            {
                MessageBox.Show("Niste odabrali sva polja!");
            }

            else if (string.IsNullOrEmpty(cobx_Gorivo.Text))
            {
                MessageBox.Show("Niste sva polja!");
            }

            else
            {
                konf_combobox xyz     = new konf_combobox();
                int           id_auto = xyz.query_tablice(cobx_Vrsta.Text, cobx_Marka.Text, cobx_Model.Text, cobx_Gorivo.Text, cobx_Mjenjač.Text, cobx_Oprema.Text);
                if (id_auto != 0)
                {
                    string a1 = cobx_Vrsta.Text;
                    string b1 = cobx_Marka.Text;
                    string c1 = cobx_Model.Text;
                    string d1 = cobx_Gorivo.Text;
                    string e1 = cobx_Mjenjač.Text;
                    string f1 = cobx_Oprema.Text;

                    this.Close();
                    new pregled(id_auto, a1, b1, c1, d1, e1, f1).Show();
                }
            }
        }