function getDataAsync(url, method, param, args, successFunc, errorFunc ) {
    $.ajax({
        url    : url,
        method : method,
        dataType : 'JSON',
        data : param,
        success : function (req) {
            if (successFunc) {
                successFunc(req, args);
            }
        },
        error : function (request, status, error) {
            if (errorFunc) {
                errorFunc(request, status, error);
            }
            else {
                console.log(error);
            }
        }
    });
}

function textFormat(text) {
    return isNull(text) ? '-' : text;
}

function isNull(value) {
    if (value === null || value === "" || value === undefined) {
        return true;
    }

    if (value.toString().trim() === "") {
        return true;
    }
    return false;
}
