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));
        }
        public ActionResult Index(int?id)
        {
            StoryModel story = new StoryModel();

            if (id != null)
            {
                int pID = (int)id;
                story = _storybl.getStoriesBySEQID(pID);
            }
            ViewBag.homeid = "story";
            PrepareProfile(Session["StarsIdProfile"].ToString());
            IPagedList <StoryModel> lstModel = _storybl.GetAll(Session["StarsIdProfile"].ToString(), 1, 1000, "", "");

            story.StoryList  = lstModel;
            currentMode      = (id == 0 ? "C" : "E");
            ViewBag.ViewMode = false;

            return(View(story));
        }