Exemplo n.º 1
0
        public ActionResult ConfirmUnassignCoordinator(int id)
        {
            var clusterCoordinator = _clusterCoordinatorService.GetCoordinator(id);
            var vm = new UnassignClusterCoordinatorViewModel
            {
                DisasterId      = clusterCoordinator.DisasterId,
                CoordinatorId   = id,
                CoordinatorName = clusterCoordinator.Person.FullName,
                ClusterName     = clusterCoordinator.Cluster.Name,
            };

            return(View(vm));
        }
        public ActionResult ConfirmUnassignCoordinator(int id, int disasterId)
        {
            var clusterCoordinator = _clusterCoordinatorService.GetCoordinatorForUnassign(id);

            if (clusterCoordinator == null)
            {
                return(RedirectToAction("Index", new { id = disasterId }));
            }

            var vm = new UnassignClusterCoordinatorViewModel
            {
                DisasterId      = clusterCoordinator.DisasterId,
                CoordinatorId   = id,
                CoordinatorName = clusterCoordinator.Person.FullName,
                ClusterName     = clusterCoordinator.Cluster.Name,
            };

            return(View(vm));
        }