Пример #1
0
 private void SetSessionValues()
 {
     //If the value in the page is null then init
     if (ArticleBF.ArticleDto == null)
     {
         Session[articleSessKey] = new dto.Article();
     }
     else
     {
         Session[articleSessKey] = ArticleBF.ArticleDto;
     }
 }
Пример #2
0
        private void GetSessionValues()
        {
            //Get item from session
            dto.Article articleDto = Session[articleSessKey] as dto.Article;

            //If empty then init
            if (articleDto == null)
            {
                ArticleBF.ArticleDto = new dto.Article();
            }
            else
            {
                ArticleBF.ArticleDto = articleDto;
            }
        }
Пример #3
0
        protected void rptrArticles_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType.Equals(ListItemType.Item) || e.Item.ItemType.Equals(ListItemType.AlternatingItem))
            {
                Repeater rptrDocs = (Repeater)e.Item.FindControl("rptrDocs");

                dto.Article articleDto = e.Item.DataItem as dto.Article;

                if (null != articleDto)
                {
                    rptrDocs.DataSource = articleDto.Documents;

                    rptrDocs.DataBind();
                }
            }
        }