Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.ShowLiControl(this.Page, "liFragment3");

            //课程通知
            int notifyId = 0;
            if (CommonUtility.SafeCheckByParams<string>(Request["notifyId"], ref notifyId))
            {
                DalOperationAboutCourseNotifyInfo dalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
                if (Request["op"] == "delete")
                {
                    dalOperationAboutCourseNotifyInfo.DelCourseNotifyInfoById(notifyId);
                }
                else if (Request["op"] == "toTop")
                {
                    DalOperationAboutCourses doac = new DalOperationAboutCourses();

                    CoursesNotifyInfo coursesNotify = doac.FindCourseNotifyById(notifyId);
                    if (coursesNotify.isTop > 0)
                        doac.Canceltop(notifyId);
                    else
                        doac.Addtop(notifyId);
                }
            }

            DataListBindCourseNotify();
        }
    }