コード例 #1
0
        public void Refresh()
        {
            var manager = new FactoryManager();
            var article = manager.GetArticleManager().Find(Id);

            _name         = article.Name;
            _magazineName = article.MagazineName;
            _releaseDate  = article.ReleaseDate;
        }
コード例 #2
0
        private List <Article> GetArticles()
        {
            var articles = new List <Article>();
            var manager  = new FactoryManager();

            foreach (var article in manager.GetArticleManager().FindByResearcher(this.ResearcherId))
            {
                articles.Add(new Article(article.Id, article.Name, article.MagazineName, article.ReleaseDate));
            }
            return(articles);
        }
コード例 #3
0
        public void DeleteArticle(int articleId)
        {
            var manager = new FactoryManager();

            manager.GetArticleManager().Delete(articleId);
        }
コード例 #4
0
        public void UpdateArticle(Article article)
        {
            var manager = new FactoryManager();

            manager.GetArticleManager().Update(article.Id, article.Name, article.MagazineName, article.ReleaseDate);
        }
コード例 #5
0
        public int AddArticle(string name, string magazineName, DateTime releaseDate)
        {
            var manager = new FactoryManager();

            return(manager.GetArticleManager().Add(name, magazineName, releaseDate, ResearcherId));
        }