Exemplo n.º 1
0
        public ActionResult AdminStoriesExcel(string category, string subcategory, string rating, string market, string events, string searchname)
        {
            StoryBL            _storybl = new StoryBL();
            IList <StoryModel> stories  = _storybl.GetAll(category, subcategory, rating, market, events, searchname);

            StoryCategoryBL       _storycatbl = new StoryCategoryBL();
            StoryCategoryModel    _storycat;
            StorySubCategoryBL    _storysubcatbl = new StorySubCategoryBL();
            StorySubCategoryModel _storysubcat;
            StoryRatingBL         _ratingbl = new StoryRatingBL();
            StoryRatingModel      _rating;
            ProfileBL             _profilebl = new ProfileBL();
            ProfileModel          _profile;

            foreach (StoryModel m in stories)
            {
                decimal dCategory    = (m.STORY_CATEGORY == null ? 0 :(decimal)m.STORY_CATEGORY);
                decimal dsubCategory = (m.STORY_SUBCATEGORY == null ? 0 : (decimal)m.STORY_SUBCATEGORY);
                decimal dRating      = (m.STORY_RATING == null ? 0 : (decimal)m.STORY_RATING);

                _storycat     = _storycatbl.GetStoryCategoryModelByID(dCategory);
                _storysubcat  = _storysubcatbl.GetStorySubCategoryModelByID(dsubCategory);
                _rating       = _ratingbl.GetStoryRatingModelByID(dRating);
                _profile      = _profilebl.GetProfileByStarzId(m.STARS_ID);
                m.Category    = _storycat;
                m.SubCategory = _storysubcat;
                m.Rating      = _rating;
                m.Profile     = _profile;
            }
            return(PartialView(stories));
        }
Exemplo n.º 2
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 StoryCategoryListProvider(string defaultText = null)
            {
                if (!string.IsNullOrEmpty(defaultText))
                {
                    Add(string.Empty, defaultText);
                }

                StoryCategoryBL _storecategory = new StoryCategoryBL();

                List <StoryCategoryModel> lst = _storecategory.GetAll();

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