| | |
| | | } |
| | | |
| | | $scope.$on("ispFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.ispId = result[0].id; |
| | | } |
| | | }); |
| | | |
| | | $scope.$on("hostingFieldEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.hostingId = result[0].id; |
| | | } |
| | | }); |
| | | |
| | | $scope.$on("companyTypeEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.companyTypeId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("parentSectorEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.parentSectorId = result[0].id; |
| | | } |
| | | $scope.vm.form.childSectorId = ""; |
| | |
| | | $scope.vm.form.childSectors = []; |
| | | }); |
| | | $scope.$on("childSectorEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.childSectorId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("regionEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.regionId = result[0].id; |
| | | } |
| | | }); |
| | | $scope.$on("statusEvent", function (event, result) { |
| | | if ($rootScope.isDefined(result[0])) { |
| | | if ($rootScope.isDefined(result) && $rootScope.isDefined(result[0])) { |
| | | $scope.vm.form.statusId = result[0].id; |
| | | } |
| | | }); |