protected string Grabar(string strFunciones) { string sResul = "OK@#@"; IB.SUPER.ADM.SIC.BLL.TipoAccionPreventa oAccion = null; try { oAccion = new IB.SUPER.ADM.SIC.BLL.TipoAccionPreventa(); sResul += getHtmlMantenimiento(oAccion.Grabar(strFunciones)) + "@#@"; } catch (Exception ex) { sResul = "Error@#@" + Errores.mostrarError("Error al actualizar los tipos de acciones de preventa.", ex, false); } finally { oAccion.Dispose(); } return(sResul); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsCallback) { //Para que se muestre la botonera, únicamente hay que indicar el número de botonera //y crear el manejador de eventos para la misma. Master.nBotonera = 34;// 49; Master.Botonera.ItemClick += new ToolBarEventHandler(this.Botonera_Click); Master.TituloPagina = "Acciones de preventa"; Master.bFuncionesLocales = true; if (!Page.IsPostBack) { Master.FuncionesJavaScript.Add("Javascript/draganddrop.js"); IB.SUPER.ADM.SIC.BLL.TipoAccionPreventa oAccion = new IB.SUPER.ADM.SIC.BLL.TipoAccionPreventa(); try { List <IB.SUPER.ADM.SIC.Models.TipoAccionPreventa> oLista = oAccion.Catalogo(); strTablaHTML = getHtmlMantenimiento(oLista); } catch (Exception ex) { Master.sErrores = Errores.mostrarError("Error al obtener los datos", ex); } finally { oAccion.Dispose(); } } //1º Se indican (por este orden) la función a la que se va a devolver el resultado // y la función que va a acceder al servidor string cbRespuesta = Page.ClientScript.GetCallbackEventReference(this, "arg", "RespuestaCallBack", "context", false); string cbLlamada = "function RealizarCallBack(arg, context)" + "{" + cbRespuesta + ";" + "}"; //2º Se "registra" la función que va a acceder al servidor. Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RealizarCallBack", cbLlamada, true); } }