public NewsItemPageView(string id)
     : base()
 {
     newsManager = Resolver.GetInstance<INewsManager>();
     commentsManager = Resolver.GetInstance<ICommentsManager>();
     NewsItem = Mapper.Map<NewsItemViewModel, NewsItem>(newsManager.GetById(id));
     Comments = Mapper.Map<CommentViewModel, Comment>(commentsManager.GetList(NewsItem.Id));
 }
 public NewsItemCreatePageView()
     : base()
 {
     NewNewsItem = new NewsItemViewModel();
     var userData = new UserDataContainer();
     groups = new List<Group>();
     if (userData.IsAuthorized)
     {
         if (userData.CurrentUser.Role == Roles.Admin || userData.CurrentUser.Role == Roles.Moderator)
         {
             foreach (var item in Resolver.GetInstance<IGroupsManager>().GetList())
             {
                 groups.Add(item);
             }
         }
         else if (userData.CurrentUser.Role == Roles.Praepostor)
         {
             var group = Resolver.GetInstance<IGroupsManager>().GetById(userData.CurrentUser.GroupId.ToString());
             groups.Add(group);
         }
     }
 }
 public NewsItemPageView()
     : base()
 {
     NewsItem = new NewsItemViewModel();
 }