public ActionResult List(DateTime bDate, DateTime eDate, string SearchType = "", int MinistryID = 0, string code = "", int codeID2 = 0, string CallerType = "") { ViewBag.CallerType = CallerType; IEnumerable <video> VideoList; if (SearchType == "MinistrySearch") { VideoList = VideoRepository.GetVideoByMinistry(MinistryID, bDate.Date, eDate.Date); } else if (SearchType == "MinistryStatusSearch") { VideoList = VideoRepository.GetVideoByMinistryStatus(MinistryID, code); } else if (SearchType == "StatusSearch") { VideoList = VideoRepository.GetVideoByStatus(code); } else { VideoList = VideoRepository.GetVideoByDateRange(bDate.Date, eDate.Date); } ViewBag.RecordCount = VideoList.Count(); return(PartialView(VideoList)); }
public ActionResult LatestVideo(int ministryID = 0, string Requestor = "") { ViewBag.Requestor = Requestor; ViewBag.MinistryID = ministryID; IEnumerable <video> VideoList; // if ((ViewBag.Supervisor == true) || (ViewBag.Supervisor2 == true)) if (Requestor == "Officer") { VideoList = VideoRepository.GetMinistryVideo(ministryID).Take(15); } else { VideoList = VideoRepository.GetVideoByMinistryStatus(ministryID, "Active").Take(7); } ViewBag.RecordCount = VideoList.Count(); return(PartialView(VideoList)); }