Example #1
0
        public CascadingDropDownNameValue[] getZonas(string knownCategoryValues)
        {
            clsZone       oCls = new clsZone();
            DataTable     dt;
            StringBuilder strHTML = new StringBuilder();

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

            string Id = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues)["Id"];

            dt = oCls.dtGetZoneByDivision_Dll(Id);

            if (dt == null)
            {
                return(values.ToArray());
            }
            else
            {
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow row in dt.Rows)
                    {
                        values.Add(new CascadingDropDownNameValue
                        {
                            name  = row[1].ToString(),
                            value = row[0].ToString()
                        });
                    }
                    return(values.ToArray());
                }
                else
                {
                    return(values.ToArray());
                }
            }
        }