Exemplo n.º 1
0
        private void btnUnesi_Click(object sender, EventArgs e)
        {
            data.Username = userNameTxt.Text;
            data.Password = passwordTxt.Text;
            var result = loginVmService.GetLoginData(data);

            try {
                if (result != null)
                {
                    menuForm.GetEmployee(result);
                    this.menuForm.Show();
                }
            }
            catch (Exception er) {
                throw;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Tries to login with given input data
 /// </summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">Event args</param>
 private void btnUnesi_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(userNameTxt.Text) && !string.IsNullOrEmpty(passwordTxt.Text))
     {
         enteredData.Username = userNameTxt.Text;
         enteredData.Password = passwordTxt.Text;
         result = loginVmService.GetLoginData(enteredData);
     }
     try {
         if (result != null)
         {
             CurrentUser.SetEmployee(result);
             menuForm.GetEmployee(result);
             this.menuForm.Show();
             this.Hide();
         }
     }
     catch (Exception er) {
         throw;
     }
 }