/// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string courTableID = Request.QueryString["courTableID"];

            CourseTableBLL ctBLL = new CourseTableBLL();
            TeacherBLL teacherBLL = new TeacherBLL();
            CourseBLL courBLL = new CourseBLL();
            ClassBLL classBLL = new ClassBLL();

            CourseTable ct = ctBLL.get(courTableID);
            Class clazz = classBLL.get(ct.ClassID);

            #region 页面数据绑定
            className.Text = clazz.Name;
            courseName.Text = courBLL.get(ct.CourId).Name;
            teacherName.Text = teacherBLL.get(ct.TeachID).Name;
            week.Text = "第" + ct.Week + "周";
            weekDay.Text = ct.WeekDay;
            classtTime.Text = ct.CourseTime;
            classAddress.Text = ct.Place;

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getAbsentStudent(courTableID,false);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
            #endregion
        }
示例#2
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            int punishType = Convert.ToInt32(Request.QueryString["punishType"]);

            string filter = "";

            int min = 0;
            int max = 0;
            switch (punishType)
            {
                case 1:
                    min = 1;
                    max = 8;
                    filter += "truancy>=" + min + " and truancy<=" + max;
                    break;
                case 2:
                    filter += "truancy=9";
                    break;
                case 3:
                    min = 10;
                    max = 19;
                    filter += "truancy>=" + min + " and truancy<=" + max;
                    break;
                case 4:
                    min = 20;
                    max = 29;
                    filter += "truancy>=" + min + " and truancy<=" + max;
                    break;
                case 5:
                    min = 30;
                    max = 39;
                    filter += "truancy>=" + min + " and truancy<=" + max;
                    break;
                case 6:
                    min = 40;
                    max = 49;
                    filter += "truancy>=" + min + " and truancy<=" + max;
                    break;
                case 7:
                    filter += "truancy>=50";
                    break;
                case 8:
                    filter += "truancy>=1";
                    break;
            }

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = PageUtil.getProcessedDataTable(commBLL.getStudentAttendStatistics(false), filter);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            User user = Session["User"] as User;

            TeacherBLL teacherBLL = new TeacherBLL();
            Teacher teacher = teacherBLL.getByUserId(user.Id);

            CommonBLL commBLL = new CommonBLL();
            GridView1.DataSource = commBLL.getClassesByTeacherId(teacher.Id);
            GridView1.DataBind();
        }
示例#4
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            User user = Session["User"] as User;

            Student stud = new StudentBLL().getByUserId(user.Id);

            Label_name.Text = stud.Name;

            CommonBLL commBLL = new CommonBLL();

            GridView1.DataSource = commBLL.getSingleStudentAttendStatistics(stud.Id,true);
            GridView1.DataBind();
        }
示例#5
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            CommonBLL commonBLL = new CommonBLL();

            DataTable dt = commonBLL.getTeachers();

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;

            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 页面数据绑定
        /// </summary>
        private void bind()
        {
            CommonBLL commBLL = new CommonBLL();

            string filter = "1=1 ";
            filter += DropDownList_week.SelectedValue.Equals("全部周次") ? "" : " and week='" + DropDownList_week.SelectedValue + "'"; ;
            DataTable dt = PageUtil.getProcessedDataTable(commBLL.getComparedAttendance(), filter);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#7
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getSemesterAttendaceRate(false);

            Label_attendRate.Text =dt.Rows.Count!=0? FormatUtil.doubleToPercent(CommonBLL.calculateAverageAttendRate(dt, "semesterAttendaceRate")):"0";

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string studID = Request.QueryString["studID"].ToString();

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getDetailStudentAttendStatistics(studID, false);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        public void bind()
        {
            User user = (User)Session["user"];
            TeacherBLL teacherBll = new TeacherBLL();
            Teacher teacher = teacherBll.getByUserId(user.Id);
            CommonBLL commonBll = new CommonBLL();

            DataTable dt = commonBll.getAllRecordByRecordId(teacher.Id);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string id = Request.QueryString["ID"];

            CommonBLL commonBLL = new CommonBLL();

            DataTable dt = commonBLL.getDetailCourseTables(id);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;

            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string classID = Request.QueryString["classID"].ToString();

            Label_className.Text = new ClassBLL().get(classID).Name;

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getClassStudentAttendStatistics(classID, null, true);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#12
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string classId = Request.QueryString["classId"];

            string week = Request.QueryString["week"];

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getWeekDetailAttendaceRate(week[1].ToString(), classId, false);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#13
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string filter = "1=1 ";
            filter += DropDownList_class.SelectedValue.Equals("全院") ? "" : " and className='" + DropDownList_class.SelectedValue + "'";

            Label_className.Text = DropDownList_class.SelectedValue;

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = PageUtil.getProcessedDataTable(commBLL.getStudentAttendStatistics(false), filter);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#14
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string classId = Request.QueryString["classID"];

            ClassBLL classBLL = new ClassBLL();
            CommonBLL commBLL = new CommonBLL();

            Label_className.Text = classBLL.get(classId).Name;

            DataTable dt = commBLL.getWeekAverageAttendaceRateByClassID(classId, false);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#15
0
        private void bind()
        {
            User user = (User)Session["user"];

            TeacherBLL teachBll = new TeacherBLL();
            Teacher teacher = teachBll.getByUserId(user.Id);
            CommonBLL commonBll = new CommonBLL();
            // 根据教师ID得到课程信息
            string filter = "1=1";
            filter += weekId.SelectedIndex == 0 ? "" : " and week='" + weekId.SelectedValue + "'";
            DataTable dt = PageUtil.getProcessedDataTable(commonBll.getWorkAttendanceByTeachID(teacher.Id), filter);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#16
0
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string studID = Request.QueryString["studID"].ToString();

            CommonBLL commBLL = new CommonBLL();

            User user = (User)Session["user"];
            TeacherBLL teacherBll = new TeacherBLL();
            Teacher teacher = teacherBll.getByUserId(user.Id);

            string filter = "teacherID='" + teacher.Id + "'";

            DataTable dt = PageUtil.getProcessedDataTable(commBLL.getDetailStudentAttendStatistics(studID, true), filter);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#17
0
        public void bind()
        {
            string teachId = Request.QueryString["teachID"];
            string classId = Request.QueryString["classID"];
            string courseId = Request.QueryString["courId"];

               // ClassBLL classBll = new ClassBLL();
            CourseBLL courseBll = new CourseBLL();

            CommonBLL commonBll = new CommonBLL();

            //courseName.Text = classBll.get(classId).Name;
            courseName.Text = courseBll.get(courseId).Name;

            DataTable dt = commonBll.getCourseDetailAttendaceRate(teachId, classId, courseId, true);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        public void bind()
        {
            User user = (User)Session["user"];

            ClassBLL classBLL = new ClassBLL();
            StudentBLL studBll = new StudentBLL();
            Student stud = studBll.getByUserId(user.Id);

            Class clazz = classBLL.get(stud.ClassID);

            className.Text = clazz.Name;

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getClassStudentAttendStatistics(clazz.Id, stud.Id, false);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        public void bind()
        {
            string classID = Request.QueryString["classID"].ToString();

            string courID = Request.QueryString["courId"].ToString();

            //courseName.Text = new CourseBLL().get(courID).Name;//courseName改成className
            className.Text = new ClassBLL().get(classID).Name;

            User user = (User)Session["user"];
            TeacherBLL teacherBll = new TeacherBLL();
            Teacher teacher = teacherBll.getByUserId(user.Id);
            CommonBLL commBLL = new CommonBLL();

            DataTable dt = commBLL.getClassStudentAttendStatistics(classID,teacher.Id, true);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
        /// <summary>
        /// 绑定数据源
        /// </summary>
        private void bind()
        {
            string filter = "1=1 ";
            filter += DropDownList_class.SelectedValue.Equals("全部班级") ? "" : " and className='" + DropDownList_class.SelectedValue + "'";
            filter += DropDownList_course.SelectedValue.Equals("全部课程") ? "" : " and courseName='" + DropDownList_course.SelectedValue + "'";
            filter += DropDownList_teacher.SelectedValue.Equals("全部教师") ? "" : " and teacherName='" + DropDownList_teacher.SelectedValue + "'";
            filter += DropDownList_week.SelectedValue.Equals("周次") ? "" : " and week='" + DropDownList_week.SelectedValue + "'";
            filter += DropDownList_weekDay.SelectedValue.Equals("星期") ? "" : " and weekDay='" + DropDownList_weekDay.SelectedValue + "'";
            filter += DropDownList_courseTime.SelectedValue.Equals("上课时间") ? "" : " and courseTime='" + DropDownList_courseTime.SelectedValue + "'";

            string sort = "";
            switch (RadioButtonList1.SelectedIndex)
            {
                case 0:
                    if (RadioButtonList2.SelectedIndex == 0)
                        sort += "className asc ";
                    else
                        sort += "className desc ";
                    break;
                case 1:
                    if (RadioButtonList2.SelectedIndex == 0)
                        sort += "teacherName asc ";
                    else
                        sort += "teacherName desc ";
                    break;
                case 2:
                    if (RadioButtonList2.SelectedIndex == 0)
                        sort += "week asc ";
                    else
                        sort += "week desc ";
                    break;
                case 3:
                    if (RadioButtonList2.SelectedIndex == 0)
                        sort += "attendaceRate asc ";
                    else
                        sort += "attendaceRate desc ";
                    break;

            }

            CommonBLL commBLL = new CommonBLL();

            DataTable dt = PageUtil.getProcessedDataTable(commBLL.getAttendaceRate(true), filter, sort);

            AspNetPager1.RecordCount = dt.Rows.Count;

            int from = (AspNetPager1.CurrentPageIndex - 1) * AspNetPager1.PageSize + 1;
            int to = from + AspNetPager1.PageSize - 1 > AspNetPager1.RecordCount ? AspNetPager1.RecordCount : from + AspNetPager1.PageSize - 1;

            GridView1.DataSource = PageUtil.getPaged(dt, from, to);
            GridView1.DataBind();
        }
示例#21
0
 private void BindType()
 {
     DataTable dt = new CommonBLL().GetObjectType();
     ddl_Type.DataSource = dt;
     ddl_Type.DataTextField = "TypeName";
     ddl_Type.DataValueField = "TypeCode";
     ddl_Type.DataBind();
 }