private async void btnPrikazi_Click(object sender, EventArgs e) { KorisniciSearchRequest searchRequest = new KorisniciSearchRequest() { Ime = txtIme.Text, Prezime = txtPrezime.Text }; var list = await korisniciService.GetAll <List <Korisnici> >(searchRequest); dgvKorisnici.DataSource = list; }
private async void btnLogin_Click(object sender, EventArgs e) { try { APIService.Username = txtUsername.Text; APIService.Password = txtPassword.Text; var result = await _vrsteProizvoda.GetAll <dynamic>(); MDIParent1 frm = new MDIParent1(); frm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }