private void dataGridViewKorisnici_CellClick_1(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { int korisnikId = Convert.ToInt32(dataGridViewKorisnici.SelectedRows[0].Cells[0].Value.ToString()); korisnik = DBKorisnici.KorisniciSelectByID(korisnikId); } }
protected void Page_Load(object sender, EventArgs e) { int ID = Convert.ToInt32(Request.QueryString["id"]); Services.Data.Recenzije recenzija = DBRecenzije.SelectByID(ID); int KorisnikID = recenzija.KorisnikID; autor.Text = DBKorisnici.KorisniciSelectByID(KorisnikID).Ime + " " + DBKorisnici.KorisniciSelectByID(KorisnikID).Prezime; datum.Text = recenzija.Datum.ToString(); naslov.Text = recenzija.Igre.Naziv; sadrzaj.Text = recenzija.Sadrzaj; }