Exemple #1
0
    public static CascadingDropDownNameValue[] GetPlantPageMethod(string knownCategoryValues, string category)
    {
        List <Plant> plantList = GlobalService.GetPlants();

        List <CascadingDropDownNameValue> values =
            new List <CascadingDropDownNameValue>();

        values.Add(new CascadingDropDownNameValue(Consts.DROPDOWN_UNSELECTED_TEXT, string.Empty));
        foreach (var plant in plantList)
        {
            values.Add(new CascadingDropDownNameValue(plant.PlantCode, plant.PlantID.ToString()));
        }

        // Perform a simple query against the data document
        return(values.ToArray());// AjaxControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(doc, PlantHierarchy, knownCategoryValuesDictionary, category);
    }