示例#1
0
 public ActionResult Edit(ScenarioViewModel viewModel)
 {
     var request = viewModel.MapTo<SaveScenarioRequest>();
     var response = _scenarioService.SaveScenario(request);
     TempData["IsSuccess"] = response.IsSuccess;
     TempData["Message"] = response.Message;
     if (response.IsSuccess)
     {
         return RedirectToAction("Index");
     }
     return View("Edit", viewModel);
 }
示例#2
0
 public ActionResult Create()
 {
     var viewModel = new ScenarioViewModel();
     viewModel.IsActive = true;
     return View(viewModel);
 }