예제 #1
0
        public ActionResult Edit(int id)
        {
            var viewModel = new CreateDerLayoutViewModel();
            var response  = _derService.GetDerLayout(id);

            viewModel.Id       = response.Id;
            viewModel.Title    = response.Title;
            viewModel.IsActive = response.IsActive;

            return(View(viewModel));
        }
예제 #2
0
        public ActionResult Preview(string secretNumber)
        {
            //if (DerImageController.SecretNumber != secretNumber) {
            //    return HttpNotFound();
            //}
            var activeDer = _derService.GetActiveDer();
            var id        = activeDer.Id;
            var response  = _derService.GetDerLayout(id);
            var viewModel = response.MapTo <DerDisplayViewModel>();

            return(View("Preview2", viewModel));
            //return View("~/Views/Der/Preview2.cshtml",viewModel);
        }