Example #1
0
        private void btnDodaj_Click(object sender, EventArgs e)
        {
            frmNovostiDetalji frm = new frmNovostiDetalji();

            this.Close();
            frm.Show();
        }
Example #2
0
        private void dgvNovosti_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var el = dgvNovosti.SelectedRows[0].Cells[0].Value.ToString();

            if (int.TryParse(el, out int id))
            {
                frmNovostiDetalji frm = new frmNovostiDetalji(id);
                frm.Show();
            }
        }
Example #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (dgvNovosti.SelectedRows.Count > 0)
            {
                var el = dgvNovosti.SelectedRows[0].Cells[0].Value.ToString();
                if (int.TryParse(el, out int id))
                {
                    frmNovostiDetalji frm = new frmNovostiDetalji(id);

                    frm.Show();
                }
            }
        }