示例#1
0
    private void showstudents()
    {
        int Sgrade = Int32.Parse(DDLgrade.SelectedValue.ToString());
        int Sclass = Int32.Parse(DDLclass.SelectedValue.ToString());

        LearnSite.BLL.Students stus = new LearnSite.BLL.Students();
        GVCourse.DataSource = stus.GetListTerm(Sgrade, Sclass);
        GVCourse.DataBind();
        Btnape.ToolTip = "开始自动评价汇总:" + DDLA.SelectedValue + "%为A优秀," + DDLE.SelectedValue + "%为E待合格,其余为合格,并保存当前学期成绩表";
    }
示例#2
0
    private void ListImportCourse()
    {
        string cids = LabelnewCids.Text;

        if (!string.IsNullOrEmpty(cids))
        {
            LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses();
            GVCourse.DataSource = cbll.getCidsCourses(cids);
            GVCourse.DataBind();
        }
    }
示例#3
0
 private void CoursesOld()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();
         LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
         int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
         int Cterm = Int32.Parse(DDLterm.SelectedValue);
         GVCourse.DataSource = course.GetOldHidList(Cobj, Cterm, Int32.Parse(Hid));
         GVCourse.DataBind();
     }
 }
示例#4
0
 private void ShowLession()
 {
     if (HttpContext.Current.Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         if (Session["lessongrade"] != null && Session["lessonterm"] != null && Session["lessonhid"] != null)
         {
             int Cobj  = int.Parse(Session["lessongrade"].ToString());
             int Cterm = int.Parse(Session["lessonterm"].ToString());
             int Chid  = int.Parse(Session["lessonhid"].ToString());
             LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
             GVCourse.DataSource = bll.GetListLession(Cterm, Cobj, Chid);
             GVCourse.DataBind();
         }
     }
 }
示例#5
0
 private void CoursesLimit()
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string Hid = tcook.Hid.ToString();
         LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
         int Cobj  = Int32.Parse(DDLgrade.SelectedValue);
         int Cterm = Int32.Parse(DDLterm.SelectedValue);
         GVCourse.DataSource = course.GetLimitHidList(Cobj, Cterm, Int32.Parse(Hid));
         if (Session[Hid + "pageindex"] != null)
         {
             GVCourse.PageIndex = Int32.Parse(Session[Hid + "pageindex"].ToString());
         }
         GVCourse.DataBind();
     }
 }
示例#6
0
    private void CourseList()
    {
        string Hid = tcook.Hid.ToString();

        LearnSite.BLL.Courses course = new LearnSite.BLL.Courses();
        string Sgrade = DDLgrade.SelectedValue;

        if (LearnSite.Common.WordProcess.IsNum(Sgrade))
        {
            int grade = Int32.Parse(Sgrade);
            int term  = Int32.Parse(Session["term"].ToString());
            int Chid  = Int32.Parse(Hid);
            GVCourse.DataSource = course.GetLimitHidList(grade, term, Chid);
            if (Session[Hid + "pageindex"] != null)
            {
                GVCourse.PageIndex = Int32.Parse(Session[Hid + "pageindex"].ToString());
            }
            GVCourse.DataBind();
        }
    }
示例#7
0
    protected void GVCourse_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView theGrid      = sender as GridView; // refer to the GridView
        int      newPageIndex = 0;

        if (-2 == e.NewPageIndex)
        { // when click the "GO" Button
            TextBox txtNewPageIndex = null;

            GridViewRow pagerRow = theGrid.BottomPagerRow;

            if (null != pagerRow)
            {
                txtNewPageIndex = pagerRow.FindControl("txtNewPageIndex") as TextBox;   // refer to the TextBox with the NewPageIndex value
            }

            if (null != txtNewPageIndex)
            {
                newPageIndex = int.Parse(txtNewPageIndex.Text) - 1; // get the NewPageIndex
            }
        }
        else
        {  // when click the first, last, previous and next Button
            newPageIndex = e.NewPageIndex;
        }

        // check to prevent form the NewPageIndex out of the range
        newPageIndex      = newPageIndex < 0 ? 0 : newPageIndex;
        newPageIndex      = newPageIndex >= theGrid.PageCount ? theGrid.PageCount - 1 : newPageIndex;
        theGrid.PageIndex = newPageIndex;
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        Session[Hid + "pageindex"] = theGrid.PageIndex;
        CourseList();
        GVCourse.DataBind();
    }