private void createLanguageDD() { int selLang = -1; if (Request["catid"] != null) { tblImageCategories cat = new tblImageCategories(); cat.LoadByPrimaryKey(Convert.ToInt32(Request["catid"])); selLang = cat.LanguageId; } tblLanguages lang = new tblLanguages(); lang.LoadAll(); do { ddLanguages.Items.Add(new ListItem(lang.LanguageTitle, lang.LanguageId.ToString())); if (selLang == lang.LanguageId) { ddLanguages.Items[ddLanguages.Items.Count - 1].Selected = true; } } while (lang.MoveNext()); if (ddLanguages.Items.Count == 1) { trLang.Visible = false; } }
private void createLanguageDD() { int selLang = -1; if (Request["catid"] != null) { tblImageCategories cat = new tblImageCategories(); cat.LoadByPrimaryKey(Convert.ToInt32(Request["catid"])); selLang = cat.LanguageId; } tblLanguages lang = new tblLanguages(); lang.LoadAll(); do { ddLanguages.Items.Add(new ListItem(lang.LanguageTitle, lang.LanguageId.ToString())); if (selLang == lang.LanguageId) ddLanguages.Items[ddLanguages.Items.Count - 1].Selected = true; } while (lang.MoveNext()); if (ddLanguages.Items.Count == 1) trLang.Visible = false; }
private void getLang() { tblLanguages lang = new tblLanguages(); lang.LoadAll(); do { ListItem li = new ListItem(lang.LanguageTitle, lang.LanguageId.ToString()); DropDownList1.Items.Add(li); } while (lang.MoveNext()); if (DropDownList1.Items.Count == 0) DropDownList1.Visible = false; }
private void getLang() { tblLanguages lang = new tblLanguages(); lang.LoadAll(); do { ListItem li = new ListItem(lang.LanguageTitle, lang.LanguageId.ToString()); DropDownList1.Items.Add(li); } while (lang.MoveNext()); if (DropDownList1.Items.Count == 0) { DropDownList1.Visible = false; } }
private void placeData() { tblLanguages lang = new tblLanguages(); lang.Where.SiteId.Value = Int32.Parse(Request["siteId"]); lang.Query.Load(); do { tblPagesXLanguage pxl = new tblPagesXLanguage(); pxl.Where.LanguageId.Value = lang.LanguageId; pxl.Sort = "SortOrder ASC"; pxl.Query.Load(); do { tblPageXControl pxc = new tblPageXControl(); pxc.Where.PageId.Value = pxl.PageId; pxc.Query.Load(); pxc.Sort = "CmsSortOrder ASC"; if (pxc.RowCount > 0) { pxc.Rewind(); do { tblControls ctls = new tblControls(); ctls.LoadByPrimaryKey(pxc.ControlId); HyperLink hl = new HyperLink(); hl.Text = ctls.ControlFriendlyName; PlaceHolder1.Controls.Add(hl); } while (pxc.MoveNext()); } } while (pxl.MoveNext()); } while (lang.MoveNext()); }
private void fillPages() { ViewState["_id"] = Convert.ToInt32(Request["id"]); int id = (int)ViewState["_id"]; tblLanguages langs = new tblLanguages(); langs.Where.SiteId.Value = (int)Session["siteid"]; langs.Query.Load(); do { tblPagesXLanguage lang = new tblPagesXLanguage(); lang.Where.LanguageId.Value = langs.LanguageId; lang.Where.ShowInCMS.Value = true; lang.Query.Load(); lang.Sort = "SortOrder ASC"; TableRow tr = new TableRow(); TableCell tc2 = new TableCell(); tc2.ColumnSpan = 3; Image img = new Image(); //lb.Text = langs.LanguageTitle; img.ImageUrl = epicCMSLib.Navigation.SiteRoot + "rendertext.aspx?textval=" + langs.LanguageTitle + "&fc=FF0000&bc=FFFFFF&size=16&font=Verdana&style=regular"; //tc2.Controls.Add(img); //tr.Cells.Add(tc2); Table1.Rows.Add(tr); tr = new TableRow(); if (lang.RowCount > 0) { lang.Rewind(); do { tblUserPageAccess access = new tblUserPageAccess(); CheckBox cb = new CheckBox(); cb.Text = ""; cb.ID = lang.PageXLanguageId.ToString(); if (id != null) { access.Where.PageXLanguageId.Value = lang.PageXLanguageId; access.Where.UserId.Value = id; access.Query.Load(); if (access.RowCount > 0) { access.Rewind(); if (access.AccessLevel == (int)epicCMSLib.epicCMSAccessLevels.CmsUpdate) cb.Checked = true; } } else { cb.Checked = true; } TableCell tc = new TableCell(); tc.VerticalAlign = VerticalAlign.Top; //tc.Width = 125; HyperLink lb2 = new HyperLink(); if (lang.PageFriendlyName == "Legal Resources -> LawClips Newsletter") lb2.Text = "Legal Resources -> LawClips"; else if (lang.PageFriendlyName == "Welcome!") lb2.Text = "Meta Tags"; else if (lang.PageFriendlyName == "Legal Resources -> LawClips Newsletter -> Details") lb2.Text = "Legal Resources -> LawClips -> Signups"; else if (lang.PageFriendlyName == "Contact Information") lb2.Text = "Contact Submissions"; else if (lang.PageFriendlyName == "About Us -> Our Facility") lb2.Text = "About Us -> Timeline"; else if (lang.PageFriendlyName == "Attorneys & Staff -> Details") lb2.Text = "Attorneys & Staff -> Badge Images"; else lb2.Text = lang.PageFriendlyName; lb2.NavigateUrl = epicCMSLib.Navigation.SiteRoot + langs.CultureTag + "/" + lang.PageTitle; lb2.Target = "_blank"; tc.Controls.Add(cb); tc.Controls.Add(lb2); if (lang.PageFriendlyName != "What's New" && lang.PageFriendlyName != "Products" && lang.PageFriendlyName != "Career Opportunities") tr.Cells.Add(tc); if (tr.Cells.Count > 0) { Table1.Rows.Add(tr); tr = new TableRow(); } } while (lang.MoveNext()); } if (tr.Cells.Count > 0) Table1.Rows.Add(tr); } while (langs.MoveNext()); }
private void fillPages() { ViewState["_id"] = Convert.ToInt32(Request["id"]); int id = (int)ViewState["_id"]; tblLanguages langs = new tblLanguages(); langs.Where.SiteId.Value = (int)Session["siteid"]; langs.Query.Load(); do { tblPagesXLanguage lang = new tblPagesXLanguage(); lang.Where.LanguageId.Value = langs.LanguageId; lang.Where.ShowInCMS.Value = true; lang.Query.Load(); lang.Sort = "SortOrder ASC"; TableRow tr = new TableRow(); TableCell tc2 = new TableCell(); tc2.ColumnSpan = 3; Image img = new Image(); //lb.Text = langs.LanguageTitle; img.ImageUrl = epicCMSLib.Navigation.SiteRoot + "rendertext.aspx?textval=" + langs.LanguageTitle + "&fc=FF0000&bc=FFFFFF&size=16&font=Verdana&style=regular"; //tc2.Controls.Add(img); //tr.Cells.Add(tc2); Table1.Rows.Add(tr); tr = new TableRow(); if (lang.RowCount > 0) { lang.Rewind(); do { tblUserPageAccess access = new tblUserPageAccess(); CheckBox cb = new CheckBox(); cb.Text = ""; cb.ID = lang.PageXLanguageId.ToString(); if (id != null) { access.Where.PageXLanguageId.Value = lang.PageXLanguageId; access.Where.UserId.Value = id; access.Query.Load(); if (access.RowCount > 0) { access.Rewind(); if (access.AccessLevel == (int)epicCMSLib.epicCMSAccessLevels.CmsUpdate) { cb.Checked = true; } } } else { cb.Checked = true; } TableCell tc = new TableCell(); tc.VerticalAlign = VerticalAlign.Top; //tc.Width = 125; HyperLink lb2 = new HyperLink(); if (lang.PageFriendlyName == "Legal Resources -> LawClips Newsletter") { lb2.Text = "Legal Resources -> LawClips"; } else if (lang.PageFriendlyName == "Welcome!") { lb2.Text = "Meta Tags"; } else if (lang.PageFriendlyName == "Legal Resources -> LawClips Newsletter -> Details") { lb2.Text = "Legal Resources -> LawClips -> Signups"; } else if (lang.PageFriendlyName == "Contact Information") { lb2.Text = "Contact Submissions"; } else if (lang.PageFriendlyName == "About Us -> Our Facility") { lb2.Text = "About Us -> Timeline"; } else if (lang.PageFriendlyName == "Attorneys & Staff -> Details") { lb2.Text = "Attorneys & Staff -> Badge Images"; } else { lb2.Text = lang.PageFriendlyName; } lb2.NavigateUrl = epicCMSLib.Navigation.SiteRoot + langs.CultureTag + "/" + lang.PageTitle; lb2.Target = "_blank"; tc.Controls.Add(cb); tc.Controls.Add(lb2); if (lang.PageFriendlyName != "What's New" && lang.PageFriendlyName != "Products" && lang.PageFriendlyName != "Career Opportunities") { tr.Cells.Add(tc); } if (tr.Cells.Count > 0) { Table1.Rows.Add(tr); tr = new TableRow(); } } while (lang.MoveNext()); } if (tr.Cells.Count > 0) { Table1.Rows.Add(tr); } } while (langs.MoveNext()); }