﻿
function eagleAjax(typeName, methodName, data, dataType, success, error, start, async, cache) {
   
    $.ajax({
        url: "/EagleAjax/AjaxResult?typeName=" + typeName + "&methodName=" + methodName + "&dataType=" + dataType + "",
        type: "POST",
        data: data,
        dataType: dataType == "" ? "json" : dataType,
        cache: cache == undefined ? false : true,
        async: async == undefined ? true : false,
        error: function (XMLHttpRequest, textStatus, errorThrown) {

            if (error != undefined)
                error(XMLHttpRequest, textStatus, errorThrown);
        },
        beforeSend: function (XMLHttpRequest) {

            if (start != undefined)
                start(XMLHttpRequest);

        },
        success: function (data, textStatus) {

            if (success != undefined)
                success(data, textStatus)
        }

    });
    //alert()

}


function eagleAjaxObject() {
    this._objectType = "Entity";
}

