Ejemplo n.º 1
0
        public PartialViewResult GetSelections()
        {
            ViewBag.homeid = "Story";

            StoryModel story = new StoryModel();

            StoryCategoryBL           _StoryCATBL        = new StoryCategoryBL();
            List <StoryCategoryModel> _StoreCategoryList = _StoryCATBL.GetAll();

            StorySubCategoryBL           _StorySubCATBL   = new StorySubCategoryBL();
            List <StorySubCategoryModel> _SubCategoryList = _StorySubCATBL.GetAll();

            StoryRatingBL           _StoryRatingBL   = new StoryRatingBL();
            List <StoryRatingModel> _StoreRatingList = _StoryRatingBL.GetAll();

            story.CategoryList    = _StoreCategoryList;
            story.SubCategoryList = _SubCategoryList;
            story.RatingList      = _StoreRatingList;
            return(PartialView("_Selections", story));
        }
            public StoryRatingListProvider(string defaultText = null)
            {
                if (!string.IsNullOrEmpty(defaultText))
                {
                    Add(string.Empty, defaultText);
                }

                StoryRatingBL _storerating = new StoryRatingBL();

                List <StoryRatingModel> lst = _storerating.GetAll();

                for (int i = 0; i < lst.Count; i++)
                {
                    StoryRatingModel item = new StoryRatingModel()
                    {
                        SEQ_ID      = lst.ElementAt(i).SEQ_ID,
                        RATING_NAME = lst.ElementAt(i).RATING_NAME
                    };
                    Add(item.SEQ_ID.ToString(), item.RATING_NAME);
                }
            }