private List <ConfiguracionBE> GetConfiguracion(string sIdConfiguracion = null) { List <ConfiguracionBE> lstConfiguracion = new List <ConfiguracionBE>(); ConfiguracionBR oConBus = new ConfiguracionBR(); RespuestaComunBE RespuestaComun = new RespuestaComunBE(); ConfiguracionBE item = new ConfiguracionBE(); item.psIDCONFIGAPP = sIdConfiguracion; RespuestaComun = oConBus.GetConfigAPP(item); if (RespuestaComun.itemError.pbFlag) { if (sIdConfiguracion == null) { ViewState["lstCatGenerales"] = RespuestaComun.lstConfiguracion; } else { item.psIDCONFIGAPP = RespuestaComun.lstConfiguracion[0].psIDCONFIGAPP.ToString(); item.psDESCRIPCION = RespuestaComun.lstConfiguracion[0].psDESCRIPCION.ToString(); item.psVALOR = RespuestaComun.lstConfiguracion[0].psVALOR.ToString(); item.psACTIVO = RespuestaComun.lstConfiguracion[0].psACTIVO; ConfiguracionWUC.SetConfiguracion(item); } } lstConfiguracion = RespuestaComun.lstConfiguracion; return(lstConfiguracion); }
protected void btnShowAdd_Click(object sender, EventArgs e) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append("$('"); sb.Append("#mdlConfiguracion"); sb.Append("').modal('show');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AddShowModalScript", sb.ToString(), false); lblTituloModal.Text = "Agregar Parametro de Configuración"; ConfiguracionWUC.ClearConfiguracion(); ViewState["sEditar"] = string.Empty; }
protected void Add_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(ViewState["sEditar"].ToString())) { AddConfiguracion(); } else { SetConfiguracion(); } ConfiguracionWUC.ClearConfiguracion(); ViewState["sEditar"] = string.Empty; CargaSiempre(); }
private void AddConfiguracion() { ConfiguracionBR oConBus = new ConfiguracionBR(); RespuestaComunBE RespuestaComun = new RespuestaComunBE(); ConfiguracionBE item = new ConfiguracionBE(); item = ConfiguracionWUC.GetConfiguracion(); RespuestaComun = oConBus.AddConfigAPP(item); if (RespuestaComun.itemError.pbFlag) { SetGrid(true); } }