protected void btn_buscar_click(object sender, EventArgs args) { try { List <Salida_orden_carga> lst = SalidaCtrl.OrdenCargaGetLstByFolio(txt_dato.Text.Replace(" ", "").Trim()); rep_resultados.DataSource = lst; rep_resultados.DataBind(); } catch (Exception e) { ((MstCasc)this.Master).setError = e.Message; } }
private string ordenCarga(HttpContext context) { string response = string.Empty; string option = context.Request["opt"].ToString(); string folioOC = string.Empty; int idOc = 0; switch (option) { case "getByFolio": //Valida referencia folioOC = context.Request["folio"].ToString(); response = JsonConvert.SerializeObject(SalidaCtrl.OrdenCargaGetLstByFolio(folioOC)); break; case "getById": int.TryParse(context.Request["id_orden_carga"].ToString(), out idOc); response = JsonConvert.SerializeObject(SalidaCtrl.OrdenCargaGetById(idOc, false)); break; } return(response); }