Esempio n. 1
0
        public CascadingDropDownNameValue[] ObtenerGestores(string knownCategoryValues, string category)
        {
            StringDictionary loSucursales = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
            int lnClaveSucursal           = 0;

            if (!loSucursales.ContainsKey("CLAVE") || !int.TryParse(loSucursales["CLAVE"], out lnClaveSucursal))
            {
                return(null);
            }

            Catalogos loCatalogos = new Catalogos();
            DataTable loGestores  = loCatalogos.ObtenerGestores((Sesion)HttpContext.Current.Session["Sesion"], lnClaveSucursal.ToString(), 0);

            return((
                       from DataRow loGestor in loGestores.Rows
                       select new CascadingDropDownNameValue(
                           loGestor["DESCRIPCION"].ToString(),
                           loGestor["CLAVE"].ToString()
                           )
                       ).ToArray());
        }