Exemple #1
0
        public ActionResult Create(DerViewModel viewModel)
        {
            var request = viewModel.MapTo<CreateOrUpdateDerRequest>();
            var response = _derService.CreateOrUpdate(request);
            if (response.IsSuccess)
            {
                return RedirectToAction("Config");
            }

            return base.ErrorPage(response.Message);
        }
Exemple #2
0
 //public ActionResult Index()
 //{
 //    var response = _derService.GetActiveDer();
 //    var viewModel = response.MapTo<DerIndexViewModel>();
 //    return View(viewModel);
 //}
 //public ActionResult Config()
 //{
 //    var response = _derService.GetDers();
 //    var viewModel = new DerConfigViewModel();
 //    viewModel.Ders = response.Ders.MapTo<DerViewModel>();
 //    return View(viewModel);
 //}
 public ActionResult Create()
 {
     var viewModel = new DerViewModel();
     return View(viewModel);
 }