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 PrintStory(int id) { StoryBL _storybl = new StoryBL(); StoryModel _story = new StoryModel(); _story = _storybl.getStoriesBySEQID(id); ProfileModel pModel = new ProfileBL().GetProfileByStarzId(Session["StarsIdProfile"].ToString()); _story.Profile = pModel; return(this.ViewPdfLandscape(" ", "PrintStory", _story)); }