Пример #1
0
        private void btnDodaj_Click(object sender, EventArgs e)
        {
            frmKartaDetalji frm = new frmKartaDetalji();

            this.Close();
            frm.Show();
        }
Пример #2
0
        private void dgvKarte_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            try
            {
                var el = dgvKarte.SelectedRows[0].Cells[0].Value.ToString();

                if (int.TryParse(el, out int id))
                {
                    frmKartaDetalji frm = new frmKartaDetalji(id);
                    frm.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Karta", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }