Exemplo n.º 1
0
        public ActionResult GetAuthorVideos([DataSourceRequest] DataSourceRequest request)
        {
            var user = GetCurrentUser();
            var list = new List <UserVideoDto>();

            if (user == null)
            {
                return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
            }

            list = BaseAuthorServices.GetAuthorVideos(user.userId).OrderBy(x => x.addon).ToList();

            return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public ActionResult GetAuthorVideosReport([DataSourceRequest] DataSourceRequest request)
        {
            var list = new List <UserVideoDto>();

            try
            {
                //var interfaced = BaseAuthorServices.GetAuthorUnporcessedVideos(CurrentUserId);

                list = BaseAuthorServices.GetAuthorVideos(CurrentUserId).OrderByDescending(x => x.addon).ThenBy(x => x.title).ToList();

                return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
            }
        }