$(document).on('click','.switchery', function () {
const self = $(this);
$('#StatusEmpresa').modal('show');
$('#StatusEmpresa').on('hidden.bs.modal', function (e) {
if ( self.is(':checked') ) {
self.prop("checked", false);
} else {
self.prop("checked", true);
}
});
});