Пример #1
0
    public void GetByUser()
    {
        EmpresaBL        EmpresaBL     = new EmpresaBL();
        List <EmpresaBE> oLista        = new List <EmpresaBE>();
        String           CuentaUsuario = User.Identity.Name;

        oLista = EmpresaBL.GetByUser(CuentaUsuario);

        // Return JSON data
        JavaScriptSerializer js = new JavaScriptSerializer();
        string strJSON          = js.Serialize(oLista);

        Context.Response.Clear();
        Context.Response.ContentType = "application/json";
        Context.Response.Flush();
        Context.Response.Write(strJSON);
    }