protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.ShowLiControl(this.Page, "liFragment6");
            //删除实验
            int erid = 0;
            if (Request["op"] == "delete")
            {

                if (CommonUtility.SafeCheckByParams<string>(Request["experimentResourceId"], ref erid))
                {

                    DalOperationAboutExperimentResources daloAexper = new DalOperationAboutExperimentResources();

                    daloAexper.DelExperimentResources(erid);

                }
            }

        UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
        DalOperationAboutCourses DalOperationAboutCourses = new DalOperationAboutCourses();
        DataSet coursesInfo = null;
        coursesInfo = DalOperationAboutCourses.GetCoursesInfo(Master.courseNo.ToString().Trim(),Master.classID,Master.termtag, "6");

        dlstExperimentResource.DataSource = coursesInfo.Tables[0];
        dlstExperimentResource.DataBind();
        }
    }
Exemplo n.º 2
0
    protected void DataListBindCourseNotify()
    {
        DalOperationAboutCourses doac = new DalOperationAboutCourses();
        DataView dv = doac.GetCoursesInfo(Master.courseNo,Master.classID,Master.termtag, "3").Tables[0].DefaultView;//第3个标签,绑定课程通知信息

        this.AspNetPager2.RecordCount = dv.Count;

        PagedDataSource pds = new PagedDataSource();    //定义一个PagedDataSource类来执行分页功
        pds.DataSource = dv;
        pds.AllowPaging = true;

        pds.CurrentPageIndex = pageIndex - 1;
        pds.PageSize = CommonUtility.pageSize; ;

        this.dlstCourseNotify.DataSource = pds;
        this.dlstCourseNotify.DataBind();

        if (this.dlstCourseNotify.Items.Count == 0)
        {
            btnDelete.Visible = false;
        }
        else
        {
            btnDelete.Visible = true;
        }

        if (pds.Count > 0)
        {
            this.dlstCourseNotify.ShowFooter = false;
        }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.ShowLiControl(this.Page, "liFragment7");
            //删除课程作业
            int schoolworkNotifyId = 0;
            if (CommonUtility.SafeCheckByParams<string>(Request["schoolworkNotifyId"], ref schoolworkNotifyId))
            {
                //DalOperationAboutCourseNotifyInfo dalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
                if (Request["op"] == "delete")
                {
                    DalOperationAboutSchoolWorks dalOperationAboutCourseResources = new DalOperationAboutSchoolWorks();

                    dalOperationAboutCourseResources.DeleteSchoolworkNotify(schoolworkNotifyId);
                }
            }

            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
            DalOperationAboutCourses DalOperationAboutCourses = new DalOperationAboutCourses();
            DataSet coursesInfo = null;
            coursesInfo = DalOperationAboutCourses.GetCoursesInfo(Master.courseNo.ToString().Trim(),Master.classID,Master.termtag, "7");

            dlstSchoolworkNotify.DataSource = coursesInfo.Tables[0];
            dlstSchoolworkNotify.DataBind();
        }
    }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DalOperationAboutCourses DalOperationAboutCourses = new DalOperationAboutCourses();
        Master.ShowLiControl(this.Page, "liFragment4");
        UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
        DataSet coursesInfo = null;
        if (UserCookiesInfo.userType == (int)UserType.StudentRole)
        {
            coursesInfo = DalOperationAboutCourses.GetCoursesInfo( Master.courseNo.ToString().Trim(),Master.classID,Master.termtag, "5");
        }
        else
        {
            coursesInfo = DalOperationAboutCourses.GetCoursesInfo(Master.courseNo.ToString().Trim(), Master.classID, Master.termtag, "5");
        }

        dlstCourseResource.DataSource = coursesInfo.Tables[0];
        dlstCourseResource.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.ShowLiControl(this.Page, "liFragment6");
        UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
        DalOperationAboutCourses DalOperationAboutCourses = new DalOperationAboutCourses();
        DataSet coursesInfo = null;
        coursesInfo = DalOperationAboutCourses.GetCoursesInfo(UserCookiesInfo.userNo, Master.courseNo.ToString().Trim(), Master.classID.Trim(), Master.termtag.Trim(), "6");

        dlstExperimentResource.DataSource = coursesInfo.Tables[0];
        dlstExperimentResource.DataBind();
    }