Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        IDAL.IAuthor ia          = BllFactory.BllAccess.CreateIAuthorBLL();
        int          recordCount = 0;
        int          pageindex   = Convert.ToInt32(Request["start"]);
        int          pagesize    = Convert.ToInt32(Request["limit"]);

        if (pagesize == 0)
        {
            pagesize = 22;
        }

        int pageNumber = pageindex / pagesize + 1;

        List <Model.UsersInfo> checkAuthorList = ia.getCheckAuthor(pageNumber, pagesize, out recordCount);

        StringBuilder sb = new StringBuilder("{recordCount:" + recordCount + ",result:[");

        foreach (Model.UsersInfo item in checkAuthorList)
        {
            sb.Append("{UserId:")
            .Append(item.UserId)
            .Append(",UserName:'******',UserType:'")
            .Append(item.UserTypeName)
            .Append("',UserAddress:'")
            .Append(item.userAddress)
            .Append("',IdentityCardNumber:'")
            .Append(item.IdentityCardNumber)
            .Append("',UserSex:'");

            if (item.UserSex == 1)
            {
                sb.Append("男'");
            }
            else
            {
                sb.Append("女'");
            }

            sb.Append("},");
        }

        sb.Remove(sb.Length - 1, 1);
        sb.Append("]}");

        Response.Write(sb.ToString());
    }
Example #2
0
 //获取审核作者列表
 public List <Model.UsersInfo> getCheckAuthor(int pageindex, int pagesize, out int recordCount)
 {
     return(IA.getCheckAuthor(pageindex, pagesize, out recordCount));
 }