예제 #1
0
        public ActionResult Create(BlogEntry entry = null)
        {
            if (entry.CRUD)
            {
                entry.CreatedBy = "David Harvey";
                entry.DateCreated = DateTime.Now;
                BlogService.Add(entry);

                return new RedirectResult("~//Home/Blogs");
            }
            else
            {
                ServiceManager myManager = new ServiceManager();
                return View(myManager.BlogEntry);
            }
        }
예제 #2
0
        public ActionResult Update_List()
        {
            ServiceManager myManager = new ServiceManager();
            IBlogView myBlogView = new BlogView();
            myBlogView.Entries = BlogService.GetRows(null, IMAGE_PATH).OrderByDescending(p => p.DateCreated);

            return View(myBlogView);
        }