Beispiel #1
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            if (cmbUlica.SelectedValue != null)
            {
                adresa.ID_Adrese = int.Parse(cmbAdresa.SelectedValue.ToString());
                adresa.brisiAdresu(adresa);
                combo.popuniCmbAdresa(cmbAdresa);
                table             = (DataTable)cmbAdresa.DataSource;
                groupBox1.Visible = false;
                MessageBox.Show("Uspesno ste izbrisali adresu iz evidencije.", "Informacija", MessageBoxButtons.OK, MessageBoxIcon.Information);


                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;
                    }
                }
            }
            else
            {
                MessageBox.Show("Morate izabrati ulicu");
            }
        }
        public frmUnosKupca()
        {
            InitializeComponent();
            kupac  = new KupacBLL();
            adresa = new AdresaBLL();
            combo  = new PopunaCmBox();
            table  = new DataTable();

            combo.popuniCmbAdresa(cmbAdresa);
        }
Beispiel #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;
        }