protected void btnLogin_Click(object sender, ImageClickEventArgs e)
    {
        cUsuarios obj = new cUsuarios(txtUsuario.Text, txtPsw.Text);

        String Mensaje = obj.ValidaUsr();

        if (obj.PersonID != 0)
        {
            Session.Add("Person_ID", obj.PersonID);
            Response.Redirect("Siniestros/Default.aspx");
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "err_msg", "swal(\"Oh...\", \"" + Mensaje + "\", \"error\");", true);
        }
    }
    protected void btnLogin_Click1(object sender, EventArgs e)
    {
        cUsuarios obj = new cUsuarios(txtUsuario.Text, txtPsw.Text);

        String Mensaje = obj.ValidaUsr();

        if (obj.userId != 0)
        {
            Session.Add("idUser", obj.userId);
            Response.Redirect("Inicio.aspx");
        }
        else
        {
            String script = "$.confirm({title: 'Error!',    content: 'Usuario y/o contraseña incorrectos',theme: 'material',buttons: {ok:{ btnClass: 'btn btn-info',action: function(){ }   }}}); ";
            ScriptManager.RegisterStartupScript(this, GetType(),
                                                "ServerControlScript", script, true);
        }
    }