function save() {
    var data = getJsonValue("");
    var error = checkValidation('');
    var code = getQuery("code");
    if (error === '') {
        ajax({
            loading: true,
            url: "GeneralApi/" + (code === "" ? "InsertCurrencyRate" : "UpdateCurrencyRate"),
            data: data ,
            success: function () {
                showMsgModal(2, (code === "" ? window.top.savedSuccessfully : window.top.editedSuccessfully));
                refreshParent('loadGrid();');
                closeTopModal();
            }
        });
    }
    else {
        showMsgModal(0, error);
    }
}
async function getEventLookupCombo($combo, search, code) {
    await ajax({
        url: "GeneralApi/GetCurrencyList",
        data: {
            search: search,
            pageNo: 1,
            selectedCode: code
        },
        success: function (result) {
            $.each(result,
                function () {
                    this.Code = this.Code + "|" + this.DecimalCount;
                });
            $combo.lookupBuilder().bindData(result);
        }
    });
}