Example #1
0
        public ActionResult Create(CreateGroupViewModel viewModel)
        {
            var request = viewModel.MapTo<CreateGroupRequest>();
            var response = _groupService.Create(request);
            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"] = response.Message;
            if (response.IsSuccess)
            {
                return RedirectToAction("Index");
            }

            return View("Create", viewModel);
        }
Example #2
0
 public ActionResult Create()
 {
     var viewModel = new CreateGroupViewModel();
     return View(viewModel);
 }
Example #3
0
 public ActionResult Create()
 {
     var viewModel = new CreateGroupViewModel();
     viewModel.IsActive = true;
     return View(viewModel);
 }