Exemplo n.º 1
0
        private void sahistaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormDodajSah f = new FormDodajSah();

            f.ShowDialog();
            showSahista_Click(sender, e);
        }
Exemplo n.º 2
0
        private void btnIzmeni_Click(object sender, EventArgs e)
        {
            if (!Provera.chkIfSelected(dgv1))
            {
                return;
            }

            if (dgv1.CurrentRow.DataBoundItem is Sahista)
            {
                var          item = dgv1.CurrentRow.DataBoundItem;
                FormDodajSah f    = new FormDodajSah();
                f.UpdateItem = item as Sahista;
                f.ShowDialog();
                SahistaIzvedeni(dgv1.DataSource as SortableBindingList <Sahista>);
            }
            else if (dgv1.CurrentRow.DataBoundItem is Turnir)
            {
                var             item = dgv1.CurrentRow.DataBoundItem as Turnir;
                FormDodajTurnir f    = new FormDodajTurnir();
                f.UpdateItem = item;
                f.ShowDialog();
            }
            else if (dgv1.CurrentRow.DataBoundItem is Organizator)
            {
                var          item = dgv1.CurrentRow.DataBoundItem as Organizator;
                FormDodajOrg f    = new FormDodajOrg();
                f.UpdateItem = item;
                f.ShowDialog();
            }
            else if (dgv1.CurrentRow.DataBoundItem is Sponzor)
            {
                MessageBox.Show("Ne mozete azurirati sponzora");
            }
            else if (dgv1.CurrentRow.DataBoundItem is Partija)
            {
                var item           = dgv1.CurrentRow.DataBoundItem as Partija;
                FormDodajPartija f = new FormDodajPartija();
                f.UpdateItem = item;
                f.ShowDialog();
                osveziSudiju(dgv1.DataSource as SortableBindingList <Partija>);
            }
            //ovde jedino mora da update i refresh da bi se videle promene
            dgv1.Update();
            dgv1.Refresh();
        }