async function getEventLookupCombo($combo, search, code) {
    var id = $combo.attr('id');
    var url = "";
    var data = null;
    switch (id) {
        case "drpBankAccount":
            url = "TreasuryApi/GetBankAccountList";
            data = { bank: true, search: search, pageNo: 1, selectedCode: code };
            break;
        case "drpChekPrint":
            url = "TreasuryApi/GetChequeReport";
            break;
    }
    await ajax({
        url: url,
        data: data,
        success: function (result) {
            $combo.lookupBuilder().bindData(result);
        }
    });
}
function save() {
    var data = getJsonValue();
    var exceptionText = checkValidation('');
    if (exceptionText === '') {
        var code = getQuery("code");
        if (code)
            data['Code'] = code;
        ajax({
            loading: true,
            url: "TreasuryApi/" + (code ? "UpdateChequeBook" : "InsertChequeBook"),
            data: data,
            success: function (result) {
                showMsgModal(2, result.FinalMessage.join("<br />"));
                refreshParent('loadGrid()');
                closeTopModal();
            }
        });
    }
    else {
        showMsgModal(0, exceptionText);
    }
}
function openPrint() {
    var title = window.top.printCheck;
    var src = "Report/Default?GrpName=PrintChak";
    openInModal('', src, title,"","",false);
}

