protected void Page_Load(object sender, EventArgs e) { try { string CultureCode = (Page as DotNetNuke.Framework.PageBase).PageCulture.Name; string Title = ((DotNetNuke.Framework.CDefault)this.Page).Title; if(Title[0]=='C') { Title = Title.Replace("C", ""); int CourseId = Convert.ToInt32(Title); CourseContainer cc = new CourseContainer(CultureCode, CourseId); if(cc.TheCourse.CreatedInCultureCode != CultureCode) { cc.LoadTitle(); lblTitle.Text = cc.TheTitle.Text; } } else { int PluggId = Convert.ToInt32(Title); PluggContainer pc = new PluggContainer(CultureCode, PluggId); if (pc.ThePlugg.CreatedInCultureCode != CultureCode) { pc.LoadTitle(); lblTitle.Text = pc.TheTitle.Text; } } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }
protected void Page_Load(object sender, EventArgs e) { try { string CourseTitle = ((DotNetNuke.Framework.CDefault)this.Page).Title;//get Course from page title CourseTitle = CourseTitle.Replace("C", ""); if (!string.IsNullOrEmpty(CourseTitle)) { Courseid = Convert.ToInt32(CourseTitle); } curlan = (Page as DotNetNuke.Framework.PageBase).PageCulture.Name; cc = new CourseContainer(curlan, Courseid); CallLocalization(); EditStr = Page.Request.QueryString["edit"]; IsAuthorized = (cc.TheCourse.WhoCanEdit == EWhoCanEdit.Anyone || cc.TheCourse.CreatedByUserId == this.UserId || UserInfo.IsInRole("Administator")); if (this.UserId == -1) { IsAuthorized = false; } IsCase3 = (EditStr == "1" && IsAuthorized); IsCase2 = (EditStr == "2" && IsAuthorized); BaseHandler bh = new BaseHandler(); if (cc.TheDescription == null) cc.LoadDescription(); if (cc.TheTitle == null) cc.LoadTitle(); LoadRichRichText(); lblDescription.Text = Server.HtmlDecode(cc.TheDescription.Text); lblTitle.Text = Server.HtmlDecode(cc.TheTitle.Text); lblRichRichTxt.Text = Server.HtmlDecode(cc.TheRichRichText.Text); BindTree(cc.TheCourse.SubjectId); PageLoadFun(); } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); } }