Пример #1
0
        public override string ToString()
        {
            CategoryService cats = new CategoryService();
            List<CategoryGroup> catg = cats.GetCategories();
            Category.Category cat = catg.Where(p => p.Categories.Count(q => q.Id == CategoryId) > 0).Select(p=>p.Categories.Where(q=>q.Id==CategoryId).First()).First();
            StringBuilder s = new StringBuilder();

            s.Append(User);
            s.AppendLine();
            s.Append(Location);
            s.AppendLine();
            s.AppendLine(cat.Name);
            s.Append(Parameters);
            s.AppendLine(Title);
            s.AppendLine(Body);
            s.Append(Price);

            return s.ToString();
        }
Пример #2
0
		public List<CategoryGroup> GetCat()
		{
			if (catg == null)
			{
				CategoryService cats = new CategoryService();
				catg = cats.GetCategories();
			}
			return catg;
		}