private void GetNewsList() { ContentTypeManager<NewDevTraining.News> newsManager = new ContentTypeManager<NewDevTraining.News>(); ContentManager cMgr = new ContentManager(); ContentTaxonomyCriteria criteria = new ContentTaxonomyCriteria(); criteria.AddFilter(ContentTaxonomyProperty.Id, CriteriaFilterOperator.EqualTo, 91); List<ContentType<NewDevTraining.News>> contentDataList = newsManager.GetList(criteria); lstNews.DataSource = contentDataList; lstNews.DataBind(); }
private void GetHolidayList() { ContentTypeManager<HolidayOffers> holidayOfferManager = new ContentTypeManager<HolidayOffers>(); string folderid = Resources.ID.HolidayOfferFolderId; long holidayFolderId = 0; bool isFolderId = long.TryParse(folderid, out holidayFolderId); if (isFolderId) { ContentCriteria criteria = new ContentCriteria(); criteria.AddFilter(ContentProperty.FolderId, CriteriaFilterOperator.EqualTo, holidayFolderId); List<ContentType<HolidayOffers>> holidayOffers = holidayOfferManager.GetList(criteria); lstOffers.DataSource = holidayOffers; lstOffers.DataBind(); } }