| | |
| | | } |
| | | |
| | | $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; |
| | | } |
| | | }); |
| | |
| | | name : $rootScope.preventXss($scope.vm.form.name), |
| | | ispId : (function () { // ISP 아이디 |
| | | var ispId = null; |
| | | if ($scope.vm.form.ispName !== "" && $scope.vm.form.ispId !== null && $scope.vm.form.ispId !== null) { |
| | | if ($scope.vm.form.ispName !== "" && $scope.vm.form.ispId !== null && $scope.vm.form.ispId !== -1) { |
| | | ispId = $scope.vm.form.ispId; |
| | | }else if ($scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0) { |
| | | ispId = $scope.vm.form.issueIspFields[0].id; |