コード例 #1
0
        // GET: Admin/ContentVideo/Draft/<ModuleID>
        public ActionResult Draft(Guid id)
        {
            ContentVideo ct = new ContentVideo(id);
            ContentVideoDraftViewModel contentText = new ContentVideoDraftViewModel(ct);

            return(View(contentText));
        }
コード例 #2
0
        public ActionResult Draft(ContentVideoDraftViewModel contentTextDraftViewModel)
        {
            try {
                if (ModelState.IsValid)
                {
                    ContentVideo contentText = new ContentVideo(contentTextDraftViewModel);
                    contentText.SaveChanges(contentTextDraftViewModel);
                }

                return(RedirectToAction("content", "pages", new { id = contentTextDraftViewModel.PageID }));
            } catch {
                return(View());
            }
        }