示例#1
0
 public NewsViewModel()
 {
     Initialize();
     ArticleItemList = new ArticleItemServices().GetNewsList();
     Article_Count   = ArticleItemList.Count();
     ListType        = MapTitle.First().Key.ToString();
 }
示例#2
0
        public NewsViewModel(string subType)
        {
            Initialize();
            String subTypeId = MapRef.Select(x => x.Value).Where(x => x.CD == subType).First().ID.ToString();

            ArticleItemList = String.Equals(subType, MapTitle.First().Key.ToString()) ?
                              new ArticleItemServices().GetNewsList() : new ArticleItemServices().GetNewsList(subTypeId);
            Article_Count = ArticleItemList.Count();
            ListType      = subType;
        }