private async void dgv_Korisnici_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgv_Korisnici.CurrentCell.ColumnIndex.Equals(4) && e.RowIndex != -1)
            {
                if (dgv_Korisnici.CurrentCell != null)
                {
                    var          id   = int.Parse(dgv_Korisnici[e.ColumnIndex - 4, e.RowIndex].Value.ToString());
                    frm_Korisnik Form = new frm_Korisnik(id, 1);
                    Form.Show();
                }
            }
            else if (dgv_Korisnici.CurrentCell.ColumnIndex.Equals(5))
            {
                var id = int.Parse(dgv_Korisnici[e.ColumnIndex - 5, e.RowIndex].Value.ToString());
                await _KorisnikService.Delete <KorisnikModel>(id);

                btn_Pretraga_Click(this, EventArgs.Empty);
            }
        }
Beispiel #2
0
        private void btn_UrediProfil_Click(object sender, EventArgs e)
        {
            frm_Korisnik form = new frm_Korisnik(_KorisnikId, 2);

            form.Show();
        }
        private void btn_DodajKorisnika_Click(object sender, EventArgs e)
        {
            frm_Korisnik form = new frm_Korisnik(0, 0);

            form.Show();
        }