PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/admin/Comments/Pending.aspx.cs

#
C# | 42 lines | 32 code | 7 blank | 3 comment | 0 complexity | 49b876c2a0590b4662687806bd6796df MD5 | raw file
 1namespace Admin.Comments
 2{
 3    using System;
 4    using System.Collections;
 5    using System.Web.Services;
 6    using BlogEngine.Core;
 7    using BlogEngine.Core.Json;
 8    using App_Code;
 9
10    public partial class Pending : System.Web.UI.Page
11    {
12        protected override void OnLoad(EventArgs e)
13        {
14            base.OnLoad(e);
15            WebUtils.CheckRightsForAdminCommentsPages(false);
16        }
17
18        /// <summary>
19        /// Number of comments in the list
20        /// </summary>
21        protected static int CommentCounter { get; set; }
22
23        [WebMethod]
24        public static IEnumerable LoadComments(int page)
25        {
26            WebUtils.CheckRightsForAdminCommentsPages(false);
27
28            var commentList = JsonComments.GetComments(CommentType.Pending, page);
29            CommentCounter = commentList.Count;
30            return commentList;
31        }
32
33        [WebMethod]
34        public static string LoadPager(int page)
35        {
36            WebUtils.CheckRightsForAdminCommentsPages(false);
37
38            return JsonComments.GetPager(page);
39        }
40    }
41
42}