コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <string>        listaUbica     = Auxiliar.ConsultarTipoReporte();
                IEnumerable <string> listaUbicacion = listaUbica.Skip(5);
                foreach (string datosUbica in listaUbicacion)
                {
                    lstReportes.Items.Add(datosUbica.ToString());
                }


                RutaServicesClient servRuta = new RutaServicesClient();
                try
                {
                    lstDepto.DataSource     = servRuta.ConsultaDepartamento();
                    lstDepto.DataValueField = "Id_Departamento";
                    lstDepto.DataTextField  = "Nombre_Departamento";
                    lstDepto.DataBind();
                }
                catch (Exception ex)
                {
                    Response.Redirect("~/About.aspx");
                }
                finally
                {
                    servRuta.Close();
                }
            }
        }