crmApp.controller('TPHeaderController', TPHeaderController);

function TPHeaderController($scope, $mdDialog, TaxPayerService ) {
    var vm = this;
    vm.TP = TaxPayerService.TP;
    vm.SearchTP = TaxPayerService.SearchTP;
    vm.PopupID = TaxPayerService.PopupID;
    vm.lstTP = []; 
    vm.ShowSearchTPResult = false;
    vm.openDialog = function (e, id) {
        $mdDialog.show({
            contentElement: id,
            parent: angular.element(document.body),
            targetEvent: e,
            clickOutsideToClose: true
        });
    }

    vm.openDialogV2 = function (e, id) {
        $mdDialog.show({
            contentElement: id,
            parent: angular.element(document.body),
            targetEvent: e,
            clickOutsideToClose: false
        });
    }

    vm.close = function () {
        $mdDialog.hide();
    }
   
}