Exemplo n.º 1
0
        /// <summary>
        /// 获取部门下的用户(分页)
        /// </summary>
        public string GetPagerDepartmentUser(string departmentIds, string order, int pageSize, int pageIndex)
        {
            if (AchieveCommon.SqlInjection.GetString(departmentIds))   //简单sql防注入
            {
                departmentIds = "";
            }
            if (AchieveCommon.SqlInjection.GetString(order))
            {
                order = "CreateTime asc";
            }
            int       totalCount = dal.GetDepartmentUserCount(departmentIds);
            DataTable dt         = dal.GetPagerDepartmentUser(departmentIds, order, pageSize, pageIndex);

            string strjson = AchieveCommon.JsonHelper.ToJson(dt);

            return("{\"total\": " + totalCount.ToString() + ",\"rows\":" + strjson + "}");
        }