コード例 #1
0
        public ActionResult DenyRegistration(DealerDto input)
        {
            var dealer           = _dealerAppService.GetDealer(input.Id);
            var DealerActivities = _dealerActivityAppService.GetDealerActivities(dealer);

            if (input.Remark != null && dealer != null)
            {
                _dealerAppService.DenyRegistration(input);
                TempData["success"] = string.Format(@"The application has been rejected!");
                return(RedirectToAction("OnlineRegApplications"));
            }
            else
            {
                ViewBag.DealerActivities = DealerActivities;
                TempData["danger"]       = string.Format(@"Failed to reject the selected application, remarks field should not be empty!");
                return(View(dealer));
            }
        }