public ActionResult Videos(int? page, string sortdir, string searchstring)
{
if (!String.IsNullOrEmpty(searchstring))
{
Session["videosearchstring"] = searchstring;
}
else
{
Session["videosearchstring"] = String.Empty;
}
var pageIndex = page ?? 0;
if ((CodeFirstSecurity.IsAuthenticated) && (CodeFirstRoleServices.IsUserInRole(CodeFirstSecurity.CurrentUserName, BgResources.Security_PremiumRole)))
{
return View(MediaServices.FindVideosForRole(true, pageIndex, Session["videosearchstring"].ToString()));
}
else
{
return View(MediaServices.FindVideosForRole(false, pageIndex, Session["videosearchstring"].ToString()));
}
}