private async void btnLogin_Click(object sender, EventArgs e) { APIService.Username = txtUsername.Text; APIService.Password = txtPassword.Text; try { await _service.Get <dynamic>(null); frmIndex frm = new frmIndex(); frm.Show(); } catch (Exception ex) { } }
private async void BtnLogin_Click(object sender, EventArgs e) { try { APIService.username = txtUsername.Text; APIService.password = txtPassword.Text; await _service.Get <dynamic>(null); frmIndex frm = new frmIndex(); frm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Autentifikacija", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private async void btnPrijava_Click(object sender, EventArgs e) { ApiService.username = txtKorisnickoIme.Text; ApiService.password = txtLozinka.Text; try { await service.Get <dynamic>(null); frmIndex frm = new frmIndex(); frm.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Authentifikacija", MessageBoxButtons.OK, MessageBoxIcon.Error); } }