WebSessionContext.Current.LoggedUserProfile.UID Response.Write(Navigation.CurrentNode.Owner.ContentName); Response.Write("ContentName = " + Navigation.CurrentNode.Owner.ContentName+"
"); //возрощает корневой путь к странице string getParentIdsFromPage( NavigationNode node ) { var ids = new StringBuilder(); var parents = node.PathFromRoot; for (int i = parents.Count - 1; i >= 0; i--) ids.Append( parents[i].Key ).Append( ',' ); ids.Length--; return ids.ToString(); } DataTable dTable = GetData( string.Format( "Select content_item_id, SpecializationSpecialist from content_945_stage where MainPageID={0}",//проекты настройки Navigation.CurrentNode.Parent.Key)); Response.Write("Key = " + Navigation.CurrentNode.Parent.Key + "
"); Response.Write("Rows = " + dTable.Rows.Count + "
"); if (dTable.Rows.Count > 0) { string myRes = dTable.Rows[0]["SpecializationSpecialist"].ToString(); Response.Write(myRes); } ========================= var timerMulti = window.setInterval("superMonitor();", 1500); string project = ""; long FilterID = 0; //определяем к какому проекту относимся string cmdSQL = string.Format(@" exec zinfo.GetISMedicalProjectIDByStructureSite @IsStage = 1, @Node = '{0}'" , getParentIdsFromPage(Navigation.Main.CurrentNode)); DataTable DT = GetData(cmdSQL); if(DT.Rows.Count>0) { project = DT.Rows[0][0].ToString(); } if (project == "") { //Response.Clear(); return; } //------------------------ //определяем фильтр для связанных тестов long idTest = NumValue("TestOpros.idTest"); string curDate = IsStage && !String.IsNullOrEmpty(StrValue("CurDate")) ? StrValue("CurDate") : ""; cmdSQL = String.Format(@" exec [zinfo].[SetFilterByAssociatedItemID] @IsStage = {0} ,@ItemID = {1} ,@CurDate = '{2}'" , IsStage , project , curDate.Replace("'", "")); DT = GetData(cmdSQL); if (DT.Rows.Count > 0) { FilterID = long.Parse(DT.Rows[0]["FilterID"].ToString()); } if (FilterID==0) { //Response.Clear(); return; } //------------------------ //Вытаскиваем связанные тесты //content_878 - ОТ Опрос cmdSQL = String.Format( @" exec zinfo.GetContentXXXByFilterID @ContentID = 878 ,@FilterID = {0} ,@Fields = 'Content_item_id, Title, Image = C.ImageAuto_52x36, ImageOld = C.shortimage, Url = zinfo.fnGetUrlByContentItemID(''{1}'', C.Content_item_id, 0, 1)' ,@OrderBy = 'C.Content_item_id' ,@Where = 'C.Content_item_id <> {2}' ,@IsStage = 1" , FilterID , getParentIdsFromPage(Navigation.Main.CurrentNode) ,idTest); if (FilterID == 0) { //Response.Clear(); return; } DT = GetData(cmdSQL); if (DT.Rows.Count > 0) { //foreach (DataRow dRow in DT.Rows) //{ // otladka += "Title = " + dRow["Title"] + " Img = " + dRow["Image"] + " Url = " + dRow["Url"]+"
"; //} container.DataSource = DT; } // // content_727 - Слайдшоу Галереи // string query = string.Format(@" // select * from content_727_live // where [Group] = ( // select top 1 [Group] from content_727_live where content_item_id = {0}) // AND content_item_id <> {0}" // , show_id // ); // DataTable DT = GetData(query); // container.DataSource = DT; var aa; $.get("http://ads.adfox.ru/201248/getCode?p1=bjiqd&p2=eqsm&pfc=a&pfb=a&plp=a&pli=a&pop=a&ld=http://stage.zdorovieinfo.ru/programma-zdorovie/health_programe/13638823/", function(data) { aa = data; }); var bb = aa.getElementsByTagName("Extension"); bb[1].getAttribute("type") if (Navigation.CurrentNode.SourceRow["TypeName"].ToString() == "Новости Группы") { AddValue("NewsGroupID", Navigation.CurrentNode.Key); ShowObject("Main Template.InsNewsGroupView", FindControl("NewsViews")); } else if (Navigation.CurrentNode.SourceRow["TypeName"].ToString() == "Новости Статьи") { ShowObject("Main Template.InsNewsViewer", FindControl("NewsViews")); } ================================================================================= Репитер в репитере ================================================================================= DataTable articlesDT; protected void LoadGeneric(Object sender, EventArgs e) { articlesDT = GetData(cmdSQL); } protected void repeaterGroups_OnItemDataBound(Object sender, RepeaterItemEventArgs e) { var repeaterArticles = e.Item.FindControl("repeaterArticles") as Repeater; if (repeaterArticles != null) { var dataView = new DataView(articlesDT) { RowFilter = "GROUP_ITEM_ID=" + Field(e.Item.DataItem as DataRowView, "content_item_id"), Sort = "created DESC" }; var grouparticlesDT = dataView.ToTable(); if (grouparticlesDT.Rows.Count > 0) { if (grouparticlesDT.Rows.Count > LimitArticles) { grouparticlesDT = grouparticlesDT.AsEnumerable().Take(LimitArticles).CopyToDataTable(); var all_articles_link = e.Item.FindControl("container_all_articles_link") as System.Web.UI.WebControls.PlaceHolder; all_articles_link.Visible = true; } repeaterArticles.DataSource = grouparticlesDT; repeaterArticles.DataBind(); } else { var container_articles = e.Item.FindControl("container_articles") as System.Web.UI.WebControls.PlaceHolder; container_articles.Visible = false; } } }

> "><%# Eval("Title")%>

"> "> "><%# Eval("Title")%>
<%#getFormatData(Eval("created"))%><%--getDateAndAuthorText(Eval("Date"), Eval("Author"))--%>
<%# Eval("ShortText")%>

<%#((bool)Eval("IsRoot")) ?"?showArticles=all":""%>">Все статьи
=================================================================================