public bool CargaControlesNuevo() { TipoProducto tipoProd = new TipoProducto(dataConnectionString); short success = 0; DataTable tab = tipoProd.GetList(ref success); iView.TipoOperacion.Items.Clear();//SelectedIndex = -1; if (success == 0) { iView.TipoOperacion.DataTextField = "gls_dscrn_tipo_ctzcn_lcext"; iView.TipoOperacion.DataValueField = "Item"; iView.TipoOperacion.DataSource = tab; iView.TipoOperacion.DataBind(); } else if (tipoProd.errlist.Count > 0) { errores.Add("errores", tipoProd.errlist); iView.Comanda.Value = "errores"; // string.Empty; iView.pageContent = Errores2Json(); return(false); } // iView.NumeroCotizacion iView.Producto.Items.Clear();//SelectedIndex = -1; iView.TipoCredito.SelectedIndex = -1; iView.TipoCredito.Items.Clear(); ControlPlazo control = new ControlPlazo(dataConnectionString); DataTable rec = control.GetListTiposCredito(ref success); if (success == 0) { iView.TipoCredito.DataTextField = "Glosa"; iView.TipoCredito.DataValueField = "Idx"; iView.TipoCredito.DataSource = rec; iView.TipoCredito.DataBind(); } else if (control.errlist.Count > 0) { errores.Add("errores", control.errlist); iView.Comanda.Value = "errores"; // string.Empty; iView.pageContent = Errores2Json(); return(false); } iView.Moneda.Items.Clear(); Moneda mon = new Moneda(dataConnectionString); DataTable recm = mon.GetList(ref success); if (success == 0) { iView.Moneda.DataTextField = "gls_monda"; iView.Moneda.DataValueField = "cod_monda"; iView.Moneda.DataSource = recm; iView.Moneda.DataBind(); iView.Moneda.SelectedValue = "13"; iView.MoneComision.DataTextField = "gls_monda"; iView.MoneComision.DataValueField = "cod_monda"; iView.MoneComision.DataSource = recm; iView.MoneComision.DataBind(); iView.MoneComision.SelectedValue = "13"; } else if (mon.errlist.Count > 0) { errores.Add("errores", mon.errlist); iView.Comanda.Value = "errores"; // string.Empty; iView.pageContent = Errores2Json(); return(false); } iView.Reembolso.Items.Clear(); DataTable recb = cotizacion.GetListCodigoReembolso(ref success); if (success == 0) { iView.Reembolso.DataTextField = "Glosa"; iView.Reembolso.DataValueField = "Idx"; iView.Reembolso.DataSource = recb; iView.Reembolso.DataBind(); } else if (cotizacion.errlist.Count > 0) { errores.Add("errores", cotizacion.errlist); iView.Comanda.Value = "errores"; // string.Empty; iView.pageContent = Errores2Json(); return(false); } iView.TipoOperSuby.Items.Clear(); iView.ProdSuby.Items.Clear(); return(true); }