Пример #1
0
 public List<CategoryWrapper> GetCategoryList()
 {
     List<CategoryWrapper> retval = new List<CategoryWrapper>();
     foreach (string category in _QuoteList.Categories)
     {
         CategoryWrapper wrapper = new CategoryWrapper();
         wrapper.Text = category;
         retval.Add(wrapper);
     }
     return retval;
 }
        private void InitializeControl()
        {
            string QuoteId = GetQuoteId();

            QuoteListWrapper wrapper = new QuoteListWrapper();
            IQuote quote = wrapper.GetQuoteById(QuoteId);

            List<CategoryWrapper> catList = new List<CategoryWrapper>();
            foreach (string category in quote.Categories)
            {
                CategoryWrapper wrap = new CategoryWrapper();
                wrap.Text = category;
                catList.Add(wrap);
            }

            ListView1.DataSource = catList;
            ListView1.DataBind();
        }