示例#1
0
 public ActionResult Create()
 {
     var viewModel = new CreatePillarViewModel();
     viewModel.Icons = Directory.EnumerateFiles(Server.MapPath(PathConstant.PillarPath)).ToList();
     viewModel.IsActive = true;
     return View(viewModel);
 }
示例#2
0
        public ActionResult Create(CreatePillarViewModel viewModel)
        {
            var request = viewModel.MapTo<CreatePillarRequest>();
            var response = _pillarService.Create(request);
            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"] = response.Message;
            if (response.IsSuccess)
            {
                return RedirectToAction("Index");
            }

            return View("Create", viewModel);
        }
示例#3
0
 public ActionResult Create()
 {
     var viewModel = new CreatePillarViewModel();
     return View(viewModel);
 }