コード例 #1
0
        private void GetNofinishedStudent(HttpContext context)
        {
            var ds = new DataSet();
            var courBll = new BLL.Course();
            ds = courBll.GetAllList();

            var courseId = context.Request["coId"];
            if (!string.IsNullOrEmpty(courseId))
            {
                var page = Convert.ToInt32(context.Request["page"]);
                var rows = Convert.ToInt32(context.Request["rows"]);
                var startIndex = (page - 1) * rows + 1;
                var endIndex = startIndex + rows - 1;

                var questionbll = new BLL.Questionnaire();
                ds = questionbll.GetNofinishedStuListByPage(courseId, "School", startIndex, endIndex);
                var num = questionbll.GetNofinishedStuNum(courseId);
                var str = JsonConvert.SerializeObject(new { total = num, rows = ds.Tables[0] });
                context.Response.Write(str);
            }
        }