Esempio n. 1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (txtTitle.Text.Trim().Length > 0)
        {
            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();
            CourseResources CourseResources = new CourseResources
            {
                classID = Server.UrlDecode(Request["classID"]),
                termTag=Request["termtag"],
                courseNo = Request["courseNo"],
                updateTime = DateTime.Now,
                courseResourceTitle = CommonUtility.JavascriptStringFilter(txtTitle.Text)
            };

            if (hidAttachmentId.Value.CompareTo(string.Empty) != 0)
            {
                CourseResources.attachmentIds = hidAttachmentId.Value;
            }

            DalOperationAboutCourseResources DalOperationAboutCourseResources = new DalOperationAboutCourseResources();
            DalOperationAboutCourseResources.InsertCourseResources(CourseResources);
            Javascript.RefreshParentWindow("添加成功!", "CInfoCourseResource.aspx?courseNo=" + CourseResources.courseNo + "&classID=" + Server.UrlEncode(Server.UrlDecode(Request["classID"].ToString().Trim())) + "&termtag=" + Request["termtag"].ToString().Trim(), Page);
        }
        else
        {
            Javascript.Alert("标题不能为空!", Page);
        }
    }
Esempio n. 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["courseNo"] == null)
        {
            Javascript.GoHistory(-1, Page);
            return;
        }
        if (!IsPostBack)
        {
            if (CommonUtility.SafeCheckByParams<string>(Request["courseResourceId"], ref courseResourceId))
            {
                DalOperationAboutCourseResources DalOperationAboutCourseResources = new DalOperationAboutCourseResources();
                CourseResources CourseResources = DalOperationAboutCourseResources.GetCourseResourcesbyId(courseResourceId);

                txtTitle.Text = CourseResources.courseResourceTitle;

                hidAttachmentId.Value = CourseResources.attachmentIds;

                if (CourseResources.attachmentIds.Length > 0)
                {
                    DalOperationAttachments dalOperationAttachments = new DalOperationAttachments();
                    ltlAttachment.Text = dalOperationAttachments.GetAttachmentsList(CourseResources.attachmentIds, ref iframeCount, true,string.Empty);
                }
            }
            else
            {
                Javascript.GoHistory(-1, Page);
            }
        }
    }
Esempio n. 3
0
    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();
    }
Esempio n. 4
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (txtTitle.Text.Trim().Length != 0)
        {
            UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo();

            CourseResources CourseResources = new CourseResources
            {
                courseResourceId = int.Parse(Request["courseResourceId"]),
                courseNo = Request["courseNo"],
                attachmentIds = hidAttachmentId.Value,
                updateTime = DateTime.Now,
                courseResourceTitle = CommonUtility.JavascriptStringFilter(txtTitle.Text)
            };

            DalOperationAboutCourseResources DalOperationAboutCourseResources = new DalOperationAboutCourseResources();

            DalOperationAboutCourseResources.UpdateCourseResources(CourseResources);
            Javascript.RefreshParentWindow("修改成功!", "CInfoCourseResource.aspx?courseNo=" + CourseResources.courseNo+"&classID="+Server.UrlEncode(Server.UrlDecode(Request["classID"])), Page);
        }
        else
        {
            Javascript.Alert("标题不能为空!", Page);
        }
    }