private void checkvalues() { Image2.Width = 280; Image2.Height = 450; if (CheckBoxListNumImagen.SelectedItem.Text == "1") { ListItem listItem = this.CheckBoxListSalida.Items.FindByText("RVPA"); if (listItem != null) { listItem.Selected = false; } listItem = this.CheckBoxListSalida.Items.FindByText("Recargas Prepago"); if (listItem != null) { listItem.Selected = false; } listItem = this.CheckBoxListSalida.Items.FindByText("Intercompany"); if (listItem != null) { listItem.Selected = false; } listItem = this.CheckBoxListSalida.Items.FindByText("Mayorista"); if (listItem != null) { listItem.Selected = false; } listItem = this.CheckBoxListSalida.Items.FindByText("Venta de Kits Callcenter"); if (listItem != null) { listItem.Selected = false; } listItem = this.CheckBoxListSalida.Items.FindByText("Venta de Kits Salesman"); if (listItem != null) { listItem.Selected = false; } Image2.Visible = true; Image2.ImageUrl = "ImageCSharp.aspx?FileName=f_sal1.jpg"; Image2.DataBind(); } if ((CheckBoxListNumImagen.SelectedItem.Text == "2") || (CheckBoxListNumImagen.SelectedItem.Text == "3") || (CheckBoxListNumImagen.SelectedItem.Text == "4") || (CheckBoxListNumImagen.SelectedItem.Text == "5") || (CheckBoxListNumImagen.SelectedItem.Text == "6")) { ListItem listItem = this.CheckBoxListSalida.Items.FindByText("Pospago"); if (listItem != null) { listItem.Selected = false; } Image2.Visible = true; Image2.ImageUrl = "ImageCSharp.aspx?FileName=f_sal2.jpg"; Image2.DataBind(); } }
protected void ButtonBuscar_Click(object sender, EventArgs e) { TelnetData.TelnetData td = new TelnetData.TelnetData(); TelnetData.ClassParametrosTelnetData cp = new TelnetData.ClassParametrosTelnetData(); NameValueCollection appSettings = ConfigurationManager.AppSettings; cp.Archivo = appSettings["Archivo"].ToString(); cp.Archivo2 = appSettings["Archivo2"].ToString(); cp.CantidadCamposxRegistro = appSettings["CantidadCamposxRegistro"].ToString(); cp.CnnStringSqlServerSinPassword = appSettings["CnnStringSqlServerSinPassword"].ToString(); cp.CuentaUniverse = appSettings["CuentaUniverse"].ToString(); cp.IVA = appSettings["IVA"].ToString(); cp.PasswordSqlServerEncriptado = appSettings["PasswordSqlServerEncriptado"].ToString(); cp.PasswordUniverseEncriptado = appSettings["PasswordUniverseEncriptado"].ToString(); cp.Path = appSettings["Path"].ToString(); cp.Path2 = appSettings["Path2"].ToString(); cp.ServerUniverse = appSettings["ServerUniverse"].ToString(); cp.UsuarioUniverse = appSettings["UsuarioUniverse"].ToString(); // IList<string> l1 = td.fGetImagenesComprobante(cp, "1", "A", "1", "1", "1", "02/02/2005"); // ClassSqlserver cs = new ClassSqlserver(); // DataSet ds = cs.DatosBusqueda(TextBoxFechaDesde.Text,TextBoxFechaHasta.Text,1); string fecha = TextBoxFechaHasta.Text; string salida = CheckBoxListSalida.SelectedValue; string letra = CheckBoxListLetra.SelectedValue; string tipo = CheckBoxListTipo.SelectedValue; string email = CheckBoxListEmail.SelectedValue; string adhesion = CheckBoxListAdhesion.SelectedValue; string sEmpresa; if (RadioButtonListEmpresa.SelectedValue == "Telcom") { sEmpresa = "1"; } else { sEmpresa = "2"; } GridView1.DataSource = td.fGetDataTableComprobante(cp, salida, letra, tipo, email, adhesion, fecha, sEmpresa); GridView1.DataBind(); Image2.Width = 280; Image2.Height = 450; switch (salida) { case "1": Image2.Visible = true; Image2.ImageUrl = "ImageCSharp.aspx?FileName=f_sal1.jpg"; Image2.DataBind(); break; case "2": case "3": case "5": case "6": case "7": Image2.Visible = true; Image2.ImageUrl = "ImageCSharp.aspx?FileName=f_sal2.jpg"; Image2.DataBind(); break; case "4": Image2.Visible = false; break; } }