Ejemplo n.º 1
0
        public ActionResult MessageDetail(string serId, string msgDate)
        {
            TRCSeriesList = TRC_Mobile.Models.SeriesModel.SeriesList(urlSeriesList);
            var SelectedSeries = (from s in TRCSeriesList
                                  where s.FBCode == serId
                                  select s).LastOrDefault();

            //if no Series was found (ie, when "All Messages" was clicked)
            //- create new instance and set some defaults
            if (SelectedSeries == null)
            {
                SelectedSeries = new SeriesListModel();
                SelectedSeries.Title = "All Messages";
                SelectedSeries.Description = "List of All Message...";
                SelectedSeries.DescriptionHTML = "<p></p>";
            }

            ViewData.Add("SerId", serId);
            ViewData.Add("MsgDate", msgDate);
            ViewData.Add("SerTitle", SelectedSeries.Title);

            var mDet = new MessageModel();

            var serMsgs = SeriesModel.SeriesMessages(mDet.feedURLBase + serId);
            foreach (var m in serMsgs)
            {
                m.ThumbnailURL = SelectedSeries.ImageURL;
            }

            mDet = (from md in serMsgs
                          where (md.PublishedDate[2] + md.PublishedDate[1]).ToString() == msgDate
                          select md).First();

            return View(mDet);
        }
Ejemplo n.º 2
0
        public ActionResult Series(string id)
        {
            TRCSeriesList = TRC_Mobile.Models.SeriesModel.SeriesList(urlSeriesList);
            var SelectedSeries = (from s in TRCSeriesList
                              where s.FBCode == id
                              select s).LastOrDefault();

            //if no Series was found (ie, when "All Messages" was clicked)
            //- create new instance and set some defaults
            if (SelectedSeries == null)
            {
                SelectedSeries = new SeriesListModel();
                SelectedSeries.Title = "All Messages";
                SelectedSeries.Description = "List of All Message...";
                SelectedSeries.DescriptionHTML = "<p></p>";
            }

            ViewData.Add("FBCode", id);
            ViewData.Add("DescriptionHTML", SelectedSeries.DescriptionHTML);
            ViewData.Add("SeriesImageURL", SelectedSeries.ImageURL);
            ViewBag.Title = SelectedSeries.Title + " | TRC Mobile";
            ViewBag.Message = SelectedSeries.Description;

            var sm = SeriesModel.SeriesMessages(SelectedSeries.feedURLBase + id);

            //return View(TRC_Mobile.Models.SeriesModel.SeriesMessages(selSeries.feedURLBase + id));
            return View(sm);
        }