protected void Page_Load(object sender, EventArgs e) { InfoSpNegocio info = new InfoSpNegocio(); RespuestaEntidad rsp = new RespuestaEntidad(); rsp = info.infoSp("spr_registrarFormulario1"); //demoGridNegocio demo = new demoGridNegocio(); //RespuestaEntidad rsp = new RespuestaEntidad(); //rsp = demo.forms(); //GridView1.DataSource = rsp.valor; //GridView1.DataBind(); //if (GridView1.Rows.Count > 0) //{ // GridView1.HeaderRow.TableSection = TableRowSection.TableHeader; // GridView1.FooterRow.TableSection = TableRowSection.TableFooter; //} }
static public string getInfoSpTabla(string stringRequest) { string jsonResponse = string.Empty; RespuestaEntidad response = new RespuestaEntidad(); InfoSpNegocio infoSp = new InfoSpNegocio(); try { JObject solicitud = JObject.Parse(stringRequest); string nombreSp = (string)solicitud["nombreSp"]; response = infoSp.infoSpTabla(nombreSp); jsonResponse = JsonConvert.SerializeObject(response); } catch (Exception ex) { response.codigo = -1; response.mensaje = "Ocurrió un error al serializar el objeto"; response.error = ex.ToString(); response.valor = null; jsonResponse = JsonConvert.SerializeObject(response); } return(jsonResponse); }