Ejemplo n.º 1
0
        private void BtnHomePage_Click(object sender, EventArgs e)
        {
            FrmHome frmHome = new FrmHome();

            frmHome.Show();
            this.Dispose();
        }
Ejemplo n.º 2
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     try
     {
         if (String.IsNullOrEmpty(txtUsername.Text.Trim()) || String.IsNullOrEmpty(txtPassword.Text.Trim()))
         {
             MessageBox.Show(Lang.loginBadRequest, Lang.warning, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
         else
         {
             if (Singl.authControllerGet.Login(txtUsername.Text, txtPassword.Text)) //true ise
             {
                 usurname = txtUsername.Text;
                 password = txtPassword.Text;
                 FrmHome frmHome = new FrmHome();
                 frmHome.Show();
                 this.Hide();
             }
         }
     }
     catch (FaultException <REQUEST_ERRORType> ex)
     {
         MessageBox.Show(ex.Detail.ERROR_SHORT_DES, "ProcessingFault", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message.ToString());
     }
 }