Exemple #1
0
        public ActionResult Index(int page = 1)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleIndexModel model = articleModelFactory.LoadIndex(page);

            return CheckViewModel(model);
        }
Exemple #2
0
        public ActionResult Create(ArticleCreateModel request)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleCreateModel model = ModelState.IsValid ? articleModelFactory.ArticleCreate(request) : articleModelFactory.LoadCreate();

            return CheckViewModel(model);
        }
Exemple #3
0
        public ActionResult Delete(long articleID)
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleDeleteModel model = articleModelFactory.DeleteArticle(articleID);

            return CheckViewModel(model);
        }
Exemple #4
0
        public ActionResult Create()
        {
            ArticleModelFactory articleModelFactory = new ArticleModelFactory();
            ArticleCreateModel model = articleModelFactory.LoadCreate();

            return View(model);
        }