Example #1
0
 /// <summary>
 /// 获取所有分类
 /// </summary>
 /// <returns></returns>
 public List<CategoryInfo> GetAll()
 {
     List<CategoryInfo> categories = new List<CategoryInfo>();
     for (int i = 0; i < 5; i++)
     {
         CategoryInfo category = new CategoryInfo
         {
             ID = i,
             Name = "通告类别" + i
         };
         categories.Add(category);
     }
     return categories;
 }
Example #2
0
 public List<AnnounceInfo> GetByCategory(CategoryInfo category)
 {
     List<AnnounceInfo> announces = new List<AnnounceInfo>();
     for (int i = 0; i < 10; i++)
     {
         AnnounceInfo announce = new AnnounceInfo
         {
             ID = i,
             Title = category.Name + "的第" + i + "则公告",
             Content = "全体同学明早九点集体做俯卧撑"
         };
         announces.Add(announce);
     }
     return announces;
 }
Example #3
0
 /// <summary>
 /// 添加分类
 /// </summary>
 /// <param name="category"></param>
 public void Add(CategoryInfo category)
 {
     return;
 }