示例#1
0
    public void GetAll()
    {
        EmpresaBL        EmpresaBL = new EmpresaBL();
        List <EmpresaBE> oLista    = new List <EmpresaBE>();

        oLista = EmpresaBL.GetAll(connstring);

        // 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);
    }