Ejemplo n.º 1
0
        // Lista de Municipios por Entidad federativa
        private void PoblarDropDownListMposXEntFed()
        {
            try
            {
                this.DropDownListMpo.DataTextField  = "Descripcion";
                this.DropDownListMpo.DataValueField = "IdValue";
                this.DropDownListMpo.DataSource     = AdministradorCatalogos.ObtenerMunicipios(Convert.ToInt32(this.DropDownListEdo.SelectedValue));
                this.DropDownListMpo.DataBind();

                //agregar un elemento para representar a todos
                this.DropDownListMpo.Items.Add("--");
                this.DropDownListMpo.Items.FindByText("--").Selected = true;
            }
            catch (Exception ex)
            {
                Msj = "Ha ocurrido un error al cargar la lista de Municipios. Contacta al área de sistemas.";
                this.LabelInfoGridResult.Text = "<div class='alert alert-danger'> " + Msj + "</div>";
                MostrarMensajeJavaScript(Msj);

                BitacoraExcepcion BitacoraExcepcionAplictivo = new BitacoraExcepcion
                {
                    CadenaconexionBD = System.Configuration.ConfigurationManager.ConnectionStrings["cnArrendamientoInmueble"].ConnectionString,
                    Aplicacion       = "ContratosArrto",
                    Modulo           = MethodInfo.GetCurrentMethod().DeclaringType.ToString() + ".aspx",
                    Funcion          = MethodBase.GetCurrentMethod().Name + "()",
                    DescExcepcion    = ex.InnerException == null ? ex.Message : ex.InnerException.Message,
                    Usr = ((SSO)Session["Contexto"]).UserName.ToString()
                };
                BitacoraExcepcionAplictivo.RegistrarBitacoraExcepcion();
                BitacoraExcepcionAplictivo = null;
            }
        }
Ejemplo n.º 2
0
        private void PoblarDropDownListMposXEntFed()
        {
            this.DropDownListMpo.DataTextField  = "Descripcion";
            this.DropDownListMpo.DataValueField = "IdValue";
            this.DropDownListMpo.DataSource     = AdministradorCatalogos.ObtenerMunicipios(Convert.ToInt32(this.DropDownListEdo.SelectedValue));
            this.DropDownListMpo.DataBind();

            //agregar un elemento para representar a todos
            this.DropDownListMpo.Items.Add("--");
            this.DropDownListMpo.Items.FindByText("--").Selected = true;
        }
Ejemplo n.º 3
0
        //obtener catalogo dependiente de municipios con entidad federativa
        private void PoblarDropDownListMposXEntFed()
        {
            this.DropDownListMunicipio.Items.Clear();
            this.DropDownListMunicipio.DataTextField  = "Descripcion";
            this.DropDownListMunicipio.DataValueField = "IdValue";
            this.DropDownListMunicipio.DataSource     = AdministradorCatalogos.ObtenerMunicipios(Convert.ToInt32(this.DropDownListEstado.SelectedValue));
            this.DropDownListMunicipio.DataBind();

            this.DropDownListMunicipio.Items.Add("TODAS");
            this.DropDownListMunicipio.Items.FindByText("TODAS").Selected = true;
        }