protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Master.ShowLiControl(this.Page, "liFragment5");
            //删除课程资源
            int resourseId = 0;
            if (CommonUtility.SafeCheckByParams<string>(Request["resourceId"], ref resourseId))
            {
                DalOperationAboutCourseNotifyInfo dalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
                if (Request["op"] == "delete")
                {
                    DalOperationAboutCourseResources dalOperationAboutCourseResources = new DalOperationAboutCourseResources();

                    dalOperationAboutCourseResources.DelCourseResourcesbyId(resourseId);
                }
            }
        }
        UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
        DalOperationAboutCourses DalOperationAboutCourses = new DalOperationAboutCourses();
        DataSet coursesInfo = null;
        coursesInfo = DalOperationAboutCourses.GetCoursesInfo(Master.courseNo.ToString().Trim(), Master.classID, Master.termtag, "5");

        dlstCourseResource.DataSource = coursesInfo.Tables[0];
        dlstCourseResource.DataBind();
    }
Example #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (txtNotifyTitle.Text.Trim().Length != 0)
     {
         UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
         CoursesNotifyInfo CoursesNotifyInfo1 = new CoursesNotifyInfo
         {
             courseNotifyInfoId = courseNotifyId,
             courseNo = Request["courseNo"].ToString().Trim(),
             classID = Server.UrlDecode(Request["classId"].Trim()),
             termTag = Request["termtag"].Trim(),
             courseNotifyInfoTitle = CommonUtility.JavascriptStringFilter(txtNotifyTitle.Text),
             courseNotifyInfoContent = Textarea1.Value,
             isTop = 0,
             notifyType = 0,//默认是通知类型
             publishUserNo = UserCookiesInfo.userName,
             updateTime = DateTime.Now,
             attachmentIds = hidAttachmentId.Value
         };
         DalOperationAboutCourseNotifyInfo DalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
         DalOperationAboutCourseNotifyInfo.UpdateCourseNotifyInfo(CoursesNotifyInfo1);
         Javascript.RefreshParentWindow("修改成功!", "CInfoCourseNotify.aspx?page="+pageIndex+"&courseNo=" + CoursesNotifyInfo1.courseNo+"&classID="+Server.UrlEncode(Server.UrlDecode(Request["classID"])), Page);
     }
     else { Javascript.Alert("标题不能为空!", Page); }
 }
Example #3
0
    protected void btnNotifyAdd_Click(object sender, EventArgs e)
    {
        if (txtNotifyTitle.Text.Trim().Length != 0)
        {

            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
            CoursesNotifyInfo CoursesNotifyInfo = new CoursesNotifyInfo
            {
                courseNo = Request["courseNo"],
                termTag = Request["termtag"],
                classID = Server.UrlDecode(Request["classID"]),
                courseNotifyInfoTitle = CommonUtility.JavascriptStringFilter(txtNotifyTitle.Text),
                courseNotifyInfoContent = Textarea1.Value,
                isTop = 0,
                notifyType = 0,//通知与作业已分开,这里为了不为空,默认存值为0
                publishUserNo = UserCookiesInfo.userName,
                updateTime = DateTime.Now,
                attachmentIds = hidAttachmentId.Value
            };
            DalOperationAboutCourseNotifyInfo DalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
            DalOperationAboutCourseNotifyInfo.InsertCourseNotifyInfo(CoursesNotifyInfo);
            Javascript.RefreshParentWindow("添加成功!", "CInfoCourseNotify.aspx?courseNo=" + CoursesNotifyInfo.courseNo + "&classID=" + Server.UrlEncode(Server.UrlDecode(Request["classID"].ToString().Trim())) + "&termtag=" + Request["termtag"].Trim(), Page);
        }
        else
        {
            Javascript.Alert("请提交标题!", Page);
        }
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int courseNotifyId = -1;
        if (CommonUtility.SafeCheckByParams<string>(Request["courseNotifyId"], ref courseNotifyId))
        {
            DalOperationAboutCourseNotifyInfo DalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();

            DataSet ds = DalOperationAboutCourseNotifyInfo.GetCourseNotifyInfobyId(courseNotifyId);
            dlstcNotify.DataSource = ds.Tables[0];
            dlstcNotify.DataBind();

            DalOperationAboutCourseNotifyInfo.AddScanCount(courseNotifyId);

        }
        else
        {
            Javascript.GoHistory(-1, Page);
        }
    }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!CommonUtility.SafeCheckByParams<string>(Request["courseNotifyId"], ref courseNotifyId))
        {
            Javascript.GoHistory(-1, Page);
            return;
        }
        if (!IsPostBack)
        {
            DalOperationAboutCourseNotifyInfo DalOperationAboutCourseNotifyInfo = new DalOperationAboutCourseNotifyInfo();
            CoursesNotifyInfo = DalOperationAboutCourseNotifyInfo.GetCourseNotifyInfoById(courseNotifyId);
            txtNotifyTitle.Text = CoursesNotifyInfo.courseNotifyInfoTitle;
            Textarea1.Value = CoursesNotifyInfo.courseNotifyInfoContent;

            hidAttachmentId.Value = CoursesNotifyInfo.attachmentIds;
            if (CoursesNotifyInfo.attachmentIds.Length > 0)
            {
                DalOperationAttachments dalOperationAttachments = new DalOperationAttachments();
                ltlAttachment.Text = dalOperationAttachments.GetAttachmentsList(CoursesNotifyInfo.attachmentIds, ref iframeCount, true, string.Empty);
            }

        }
    }
Example #6
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();
        }
    }