示例#1
0
 /// <summary>
 /// Authorization
 /// </summary>
 /// <param name="login">Login (email)</param>
 /// <param name="password">Auth password</param>
 /// <returns></returns>
 public bool Login(string login, string password)
 {
     this.options.Login    = login;
     this.options.Password = password;
     transportService      = new TransportService(this.options.Login, this.options.Password, this.options.Url, this.options.Database, new Tools.JsonParser());
     return(transportService.Login());
 }
示例#2
0
        protected void btn_Login_Click(object sender, EventArgs e)
        {
            Txt_Mensaje.Text = String.Empty;
            TransportService ws = new TransportService();

            try
            {
                if (ws.Login(txt_Usuario.Text, txt_Contraseña.Text))
                {
                    Response.Redirect(url: "MasterPage/WebForm1.aspx");
                }
                else
                {
                    Txt_Mensaje.Text = "Credenciales Incorrectos";
                }
            }
            catch (Exception)
            {
                Txt_Mensaje.Text = "Ha ocurrido un problema al iniciar sesion.";
            }
        }