Esempio n. 1
0
        public ActionResult EventSubCategoryDropDown(int?parentEventCategoryID)
        {
            if (parentEventCategoryID.HasValue && parentEventCategoryID.Value != 0)
            {
                var sli = EventsService.GetAllEventSubCategories(parentEventCategoryID.Value).AsEnumerable().Select((item, index) => new SelectListItem()
                {
                    Value = item.EventCategoryID.ToString(), Text = item.EventCategoryName
                }).ToList();
                if (sli.Count > 0)
                {
                    ViewData["result"] = new SelectList(sli, "Value", "Text");
                }
            }

            return(View());
        }