private void button1_Click_1(object sender, EventArgs e)
        {
            bool provera = false;

            foreach (var c in this.Controls)
            {
                if (c is TextBox && ((TextBox)c).Text == "")
                {
                    MessageBox.Show("Morate popuniti sva polja");
                    provera = false;
                    break;
                }
                else if (c is ComboBox && ((ComboBox)c).Text == "")
                {
                    MessageBox.Show("Morate popuniti sva polja");
                    provera = false;
                    break;
                }
                else
                {
                    provera = true;
                }
            }
            if (provera == true)
            {
                ulica.Naziv_Ulice = tbNazivUlice.Text;
                ulica.ID_Ulice    = int.Parse(cmbUlica.SelectedValue.ToString());


                groupBox1.Visible = false;

                ulica.izmeniUlicu(ulica);

                MessageBox.Show("Uspesno ste izmenili podatke o: " + cmbUlica.Text + "\n u evidenciju", "Informacija", MessageBoxButtons.OK, MessageBoxIcon.Information);


                combo.popuniCmbUlica(cmbUlica);
                combo.popuniCmbMesto(cmbMesto);
                table = (DataTable)cmbUlica.DataSource;

                groupBox1.Visible = false;

                foreach (var c in this.Controls)
                {
                    if (c is TextBox)
                    {
                        ((TextBox)c).Text = String.Empty;
                    }
                    else if (c is ComboBox)
                    {
                        ((ComboBox)c).Text = String.Empty;
                    }
                }
            }
        }
Esempio n. 2
0
        public frmUnosAdrese()
        {
            InitializeComponent();
            ulica  = new UlicaBLL();
            combo  = new PopunaCmBox();
            adresa = new AdresaBLL();
            table  = new DataTable();

            combo.popuniCmbUlica(cmbUl);
        }
Esempio n. 3
0
        public frmBrisanjeAzuriranjeAdrese()
        {
            InitializeComponent();
            combo  = new PopunaCmBox();
            ulica  = new UlicaBLL();
            adresa = new AdresaBLL();
            table  = new DataTable();

            combo.popuniCmbUlica(cmbUlica);
            combo.popuniCmbAdresa(cmbAdresa);
            table = (DataTable)cmbAdresa.DataSource;
        }
        public frmBrisanjeAzuriranjeUlice()
        {
            InitializeComponent();
            combo = new PopunaCmBox();
            ulica = new UlicaBLL();
            mesto = new MestoBLL();
            table = new DataTable();

            combo.popuniCmbUlica(cmbUlica);
            combo.popuniCmbMesto(cmbMesto);
            table = (DataTable)cmbUlica.DataSource;
        }