public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = base.getQuery(param);
            string json = this.superService.FindPageList_JqueryTable<PsdBox>(param.iDisplayStart, param.iDisplayLength, query);//SuperManager.Instance.FindPageList_JqueryTable<PsdBox>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<PsdBox> data = JsonConvert.DeserializeObject<List<PsdBox>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           WhereToUse = p.WhereToUse,
                           Psd = RobinCore.Instance.EncodePassword(p.Psd),
                           LoginKey = string.IsNullOrWhiteSpace(p.LoginKey) ? string.Empty : RobinCore.Instance.EncodePassword(p.LoginKey)
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //针对个人用户,需要加上用户过滤
            QueryModel query = base.getAndQuery(param, "ScheduleContent", "like", param.sSearch, "ScheduleStartDate", "desc", new QueryInfo("RecordUser", "=", base.CurrentLoginUser().UserName));
            string json = this.superService.FindPageList_JqueryTable<Schedule>(param.iDisplayStart, param.iDisplayLength, query);//SuperManager.Instance.FindPageList_JqueryTable<Schedule>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<Schedule> data = JsonConvert.DeserializeObject<List<Schedule>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           ScheduleContent = p.ScheduleContent,
                           //Status = (p.ScheduleStartDate.Date.ToLocalTime() - DateTime.Now.Date).TotalDays,//p.ScheduleDate.ToLocalTime() > DateTime.Now ? 0 : 1,
                           ScheduleStartDate = p.ScheduleStartDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           ScheduleEndDate = p.ScheduleEndDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss")
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = base.getQuery(param, "NoticeTitle", "like", param.sSearch, "NoticeDate", "desc");
            //if (base.CurrentLoginUser().RoleLevel > 1)//管理员等级(1)的可以看所有
            //    query.AddQuery("NoticeUser", "=", base.CurrentLoginUser().UserName);
            string json = this.superService.FindPageList_JqueryTable<NoticeAnnouncement>(param.iDisplayStart, param.iDisplayLength, query);//NoticeAnnouncementManager.Instance.FindPageList_JqueryTable<NoticeAnnouncement>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<NoticeAnnouncement> data = JsonConvert.DeserializeObject<List<NoticeAnnouncement>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           NoticeDate = p.NoticeDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           RecordDate = p.RecordDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           NoticeUserDisplayName = p.NoticeUserDisplayName,
                           NoticeTitle = p.NoticeTitle,
                           Status = p.Status
                           //other field
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = base.getQuery(param, "DetailPlanNote", "like", param.sSearch, "DetailPlanStartDate", "desc");
            query.AddQuery("RecordUser", "=", base.CurrentLoginUser().UserName);
            string json = this.superService.FindPageList_JqueryTable<DetailPlan>(param.iDisplayStart, param.iDisplayLength, query);////SuperManager.Instance.FindPageList_JqueryTable<DetailPlan>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<DetailPlan> data = JsonConvert.DeserializeObject<List<DetailPlan>>(jobject["result"].ToString());
            //----------------------------------------------date类型的过滤比较特殊------------------------------------------
            //if (param.sSearch != null)
            //    data.RemoveAll(item => !item.DetailPlanDate.ToLocalTime().ToString("yyyy-MM-dd").Contains(param.sSearch));
            //-----------------------------------------------------------------------------------------------------------------------------
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           DetailPlanStartDate = p.DetailPlanStartDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           DetailPlanEndDate = p.DetailPlanEndDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           DetailPlanTimeperiod = p.DetailPlanTimeperiod,
                           DetailPlanNote = p.DetailPlanNote
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //只配给管理员,这里不用加上过滤用户
            QueryModel query = base.getQuery(param, "DisplayName", "like", param.sSearch, "DisplayName", "asc");
            string json = this.superService.FindPageList_JqueryTable<User>(param.iDisplayStart, param.iDisplayLength, query);// SuperManager.Instance.FindPageList_JqueryTable<User>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<User> data = JsonConvert.DeserializeObject<List<User>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           UserName = p.UserName,
                           CreateDate = p.CreateDate.ToLocalTime().ToString(),
                           LastLoginDate = p.LastLoginDate.ToLocalTime().ToString(),
                           DisplayName = p.DisplayName,
                           Email = p.Email,
                           Sex = p.Sex,
                           PicPath = p.PicPath,
                           Address = p.Address,
                           CultrueType = p.CultrueType,
                           Status = p.IsEnabled,
                           UserRightLevel = p.Level == 1 ? "超级用户" : "普通用户"
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param, string parentId)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //只配给管理员,这里不用加上过滤用户
            QueryModel query = base.getAndQuery(param, "Title", "like", param.sSearch, "SortIndex", "asc", new QueryInfo("ParentId", "=", parentId));
            string json = this.superService.FindPageList_JqueryTable<Menu>(param.iDisplayStart, param.iDisplayLength, query);//SuperManager.Instance.FindPageList_JqueryTable<Menu>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<Menu> data = JsonConvert.DeserializeObject<List<Menu>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           ParentId = p.ParentId,
                           Title = p.Title,
                           ActionName = p.ActionName,
                           AreaName = p.AreaName,
                           ControllerName = p.ControllerName,
                           MenuType = p.MenuType,
                           SortIndex = p.SortIndex,
                           Status = p.IsEnabled
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //只配给管理员,这里不用加上过滤用户
            QueryModel query = base.getQuery(param, "CultureKey", "like", param.sSearch, "CultureKey", "asc");
            string json = this.superService.FindPageList_JqueryTable<GloablCulture>(param.iDisplayStart, param.iDisplayLength, query); //GloablCultureManager.Instance.FindPageList_JqueryTable<GloablCulture>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<GloablCulture> data = JsonConvert.DeserializeObject<List<GloablCulture>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           CultureKey = p.CultureKey,
                           CultureEn = p.CultureEN,
                           CultureCn = p.CultureCN
                           //other field
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //针对个人用户,需要加上用户过滤
            QueryModel query = base.getAndQuery(param, "SexualLifeDate", "like", param.sSearch, "SexualLifeDate", "desc", new QueryInfo("RecordUser", "=", base.CurrentLoginUser().UserName));
            string json = this.superService.FindPageList_JqueryTable<SexualLife>(param.iDisplayStart, param.iDisplayLength, query);// SuperManager.Instance.FindPageList_JqueryTable<SexualLife>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<SexualLife> data = JsonConvert.DeserializeObject<List<SexualLife>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           SexualLifeDate = p.SexualLifeDate.ToLocalTime().ToString("yyyy-MM-dd ") + " &nbsp; " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(p.SexualLifeDate.ToLocalTime().DayOfWeek),
                           SexualLifeCount = p.SexualLifeCount.ToString(),
                           SexualLifeContent = JsonArrayToString(p.SexualLifeContent)
                           //other field
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = base.getQuery(param, "RecordUserDisplayName", "like", param.sSearch, "RecordDate", "desc");
            if (base.CurrentLoginUser().RoleLevel > 1)//管理员等级的可以看所有
                query.AddAndQuery("RecordUser", "=", base.CurrentLoginUser().UserName);
            string json = this.superService.FindPageList_JqueryTable<OperationRecord>(param.iDisplayStart, param.iDisplayLength, query);// SuperManager.Instance.FindPageList_JqueryTable<OperationRecord>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<OperationRecord> data = JsonConvert.DeserializeObject<List<OperationRecord>>(jobject["result"].ToString());

            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           RecordUser = p.RecordUser,
                           RecordUserDisplayName = p.RecordUserDisplayName, //RobinCore.Instance.GetUserDisplayName(p.RecordUser),
                           ControllerName = p.ControllerName,
                           AreaName = p.AreaName,
                           RecordDate = p.RecordDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           ActionName = p.ActionName,
                           OperateResult = p.OperateResult,
                           MessageContent = p.MessageContent
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //针对个人用户,需要加上用户过滤
            QueryModel query = base.getAndQuery(param, "RecordDate", "like", param.sSearch, "RecordDate", "desc", new QueryInfo("RecordUser", "=", base.CurrentLoginUser().UserName));
            string json = this.superService.FindPageList_JqueryTable<Health>(param.iDisplayStart, param.iDisplayLength, query); //HealthManager.Instance.FindPageList_JqueryTable<Health>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<Health> data = JsonConvert.DeserializeObject<List<Health>>(jobject["result"].ToString());
            //----------------------------------------------date类型的过滤比较特殊------------------------------------------
            if (param.sSearch != null)
                data.RemoveAll(item => !item.RecordDate.ToLocalTime().ToString( ).Contains(param.sSearch));
            //-----------------------------------------------------------------------------------------------------------------------------
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           RecordDate = p.RecordDate.ToLocalTime().ToString("yyyy-MM-dd "),
                           WeightValue = p.WeightValue,
                           WalkingCountValue = p.WalkingCountValue,
                           HealthNote = p.HealthNote//,
                           //RecordUser = RobinCore.Instance.GetUserDisplayName(p.RecordUser),
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            //针对个人用户,需要加上用户过滤
            QueryModel query = base.getAndQuery(param, "DisplayName", "like", param.sSearch, "DisplayName", "asc",new QueryInfo("RecordUser", "=", base.CurrentLoginUser().UserName));
            string json = this.superService.FindPageList_JqueryTable<VideoTypeConfig>(param.iDisplayStart, param.iDisplayLength, query);//SuperManager.Instance.FindPageList_JqueryTable<VideoTypeConfig>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<VideoTypeConfig> data = JsonConvert.DeserializeObject<List<VideoTypeConfig>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           DisplayName = p.DisplayName
                           //other field
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param, string parentId)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = new QueryModel("RecordUser", base.CurrentLoginUser().UserName);
            string json = this.superService.FindList<AlbumTypeConfig>(query);// SuperManager.Instance.FindList<AlbumTypeConfig>(query);
            List<AlbumTypeConfig> AlbumTypeConfigs = JsonConvert.DeserializeObject<List<AlbumTypeConfig>>(json);
            //针对个人用户,需要加上用户过滤
            query = base.getAndQuery(param, "DisplayName", "like", param.sSearch, "RecordDate", "desc", new QueryInfo("ParentId", "=", parentId), new QueryInfo("RecordUser", "=", base.CurrentLoginUser().UserName));
            json = this.superService.FindPageList_JqueryTable<AlbumFolder>(param.iDisplayStart, param.iDisplayLength, query);// SuperManager.Instance.FindPageList_JqueryTable<Album>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<AlbumFolder> data = JsonConvert.DeserializeObject<List<AlbumFolder>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           ParentId = p.ParentId,
                           DisplayName = p.DisplayName,
                           Path = p.Path,
                           FolderType = p.FolderType,
                           RecordDate = p.RecordDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           AlbumType = GetDisplayName(p.AlbumType, AlbumTypeConfigs)
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel query = base.getQuery(param, "WeightDate", "desc");
            string jsonString = this.superService.FindPageList_JqueryTable<Weight>(param.iDisplayStart, param.iDisplayLength, query);// SuperManager.Instance.FindPageList_JqueryTable<Weight>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(jsonString);
            List<Weight> data = JsonConvert.DeserializeObject<List<Weight>>(jobject["result"].ToString());
            //----------------------------------------------date类型的过滤比较特殊------------------------------------------
            if (param.sSearch != null)
                data.RemoveAll(item => !item.WeightDate.ToLocalTime().ToString("yyyy-MM-dd").Contains(param.sSearch));
            //-----------------------------------------------------------------------------------------------------------------------------
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           WeightDate = p.WeightDate.ToLocalTime().ToString("yyyy-MM-dd"),
                           WeightValue = p.WeightValue,
                           RecordUser = p.RecordUser
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel queryModel = new QueryModel();
            if (!string.IsNullOrWhiteSpace(param.sSearch))
                queryModel = base.getQuery(param, "SendDate", "desc", new List<QueryInfo>() { new QueryInfo("SendUserDisplayName", "like", param.sSearch), new QueryInfo("RecUserDisplayName", "like", param.sSearch) });

            //    QueryModel query = base.getQuery(param, "SendUser", "like", param.sSearch, "SendDate", "desc");
            if (base.CurrentLoginUser().RoleLevel > 1)//管理员等级的可以看所有
                queryModel.AddAndQuery("RecUser", "=", base.CurrentLoginUser().UserName);
            string json = this.superService.FindPageList_JqueryTable<ChatMessage>(param.iDisplayStart, param.iDisplayLength, queryModel);// SuperManager.Instance.FindPageList_JqueryTable<UserMessage>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<ChatMessage> data = JsonConvert.DeserializeObject<List<ChatMessage>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           SendUser = p.SendUser,
                           RecUser = p.RecUser,
                           SendUserDisplayName = p.SendUserDisplayName,
                           RecUserDisplayName = p.RecUserDisplayName,
                           SendDate = p.SendDate.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           MessageContent = p.MessageContent,
                           ReceiveStatus = p.ReceiveStatus == 0 ? "<font color=red>未接收</font>" : "<font color=green>已接收</font>",
                           ChatMsgType = Enum.GetName(typeof(ChatMessageype), p.ChatMsgType)
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AjaxHandler(jQueryDataTableParamModel param)
        {
            //http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part#Sorting
            QueryModel queryModel = new QueryModel();
            if (!string.IsNullOrWhiteSpace(param.sSearch))
                queryModel = base.getQuery(param, "DebtDate", "desc", new List<QueryInfo>() { new QueryInfo("DebtFromUser", "like", param.sSearch), new QueryInfo("DebtToUser", "like", param.sSearch) });
            //针对个人用户,需要加上用户过滤
            queryModel.AddAndQuery("RecordUser", "=", base.CurrentLoginUser().UserName);
            string json = this.superService.FindPageList_JqueryTable<Debt>(param.iDisplayStart, param.iDisplayLength, queryModel);//DebtManager.Instance.FindPageList_JqueryTable<Debt>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<Debt> data = JsonConvert.DeserializeObject<List<Debt>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           DebtDate = p.DebtDate.ToLocalTime().ToString("yyyy-MM-dd"),
                           DebtFromUser = p.DebtFromUser,
                           DebtToUser = p.DebtToUser,
                           DebtType = p.DebtType,
                           DebtContent = p.DebtContent,
                           DebtProgress = p.DebtProgress,
                           DebtNum = p.DebtNum//,
                           //RecordUser = RobinCore.Instance.GetUserDisplayName(p.RecordUser)
                           //other field
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }
        public JsonResult AlbumListTableAjaxHandler(jQueryDataTableParamModel param, string parentId)
        {
            QueryModel query = base.getAndQuery(param, "FileName", "like", param.sSearch, "FileSize", "desc", new QueryInfo("FolderId", "=", parentId));
            string json = this.superService.FindPageList_JqueryTable<Album>(param.iDisplayStart, param.iDisplayLength, query); //SuperManager.Instance.FindPageList_JqueryTable<Video>(param.iDisplayStart, param.iDisplayLength, query);

            JObject jobject = JObject.Parse(json);
            List<Album> data = JsonConvert.DeserializeObject<List<Album>>(jobject["result"].ToString());
            int i = param.iDisplayStart;
            var linq = from p in data
                       select new
                       {
                           RowId = ++i,
                           Id = p.Id,
                           FileName = p.FileName,
                           FilePath = p.FilePath,
                           FileExtention = p.FileExtention.ToLower(),
                           CreationTime = p.CreationTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           LastAccessTime = p.LastAccessTime.ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"),
                           Evaluation = p.Evaluation + "星",
                           FileSize = FileExtention.Instance.GetFileSizeDescription(p.FileSize)
                       };
            return Json(new
            {
                sEcho = param.sEcho,
                iTotalRecords = (Int32)jobject["iTotalRecords"],
                iTotalDisplayRecords = (Int32)jobject["iTotalDisplayedRecords"],
                aaData = linq
            }, JsonRequestBehavior.AllowGet);
        }