Ejemplo n.º 1
0
        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)
            {
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }