Exemple #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var page = new Academic.DbEntities.ActivityAndResource.PageResource()
            {
                Id   = UrlResourceId,
                Name = txtName.Text
                ,
                Description = txtDescription.Text
                ,
                DisplayDescriptionOnPage = chkDisplayDescription.Checked
                ,
                DisplayPageName = chkDisplayPageName.Checked
                ,
                DisplayPageDescription = chkDisplayPageDescription.Checked
                ,
                PageContent = txtContent.Text
            };

            var restriction = new Academic.DbEntities.AccessPermission.Restriction()
            {
            };

            using (var helper = new DbHelper.ActAndRes())
            {
                var saved = helper.AddOrUpdatePageResource(page, SectionId, restriction);
                if (saved != null)
                {
                    Response.Redirect(DbHelper.StaticValues.WebPagePath.CourseDetailPage(SubjectId, SectionId));
                    //Response.Redirect("~/Views/Course/Section/Master/CourseSectionListing.aspx?SubId=" + SubjectId + "&edit=1#section_" + SectionId);
                }
            }
        }