﻿function getWaterfrontsByCountyID(CountyID, ctrl) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "/Services/Waterfronts.asmx/RetrieveWaterfrontstringByCountyID",
        data: "{'CountyID':'" + CountyID + "'}",
        dataType: "json",
        async: true,
        success: function(msg) {
            document.getElementById(ctrl).innerHTML = "";
            $("#" + ctrl).append(msg.d);
        }
    });
}

function getWaterfrontsByCountyIDandWaterfrontTypeNoFL(CountyID,WaterfrontTypeID, ctrl) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "/Services/Waterfronts.asmx/RetrieveWaterfrontstringByCountyIDandWaterfrontTypeNoFL",
        data: "{'CountyID':'" + CountyID + "','WaterfrontTypeID':'" + WaterfrontTypeID + "'}",
        dataType: "json",
        async: true,
        success: function(msg) {
            document.getElementById(ctrl).innerHTML = "";
            $("#" + ctrl).append(msg.d);
        }
    });
}


function getWaterfrontsByCountyIDandWaterfrontType(CountyID, WaterfrontTypeID, IsFingerLake, ctrl) {
    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "/Services/Waterfronts.asmx/RetrieveWaterfrontstringByCountyIDandWaterfrontType",
        data: "{'CountyID':'" + CountyID + "','WaterfrontTypeID':'" + WaterfrontTypeID + "','IsFingerLake':'" + IsFingerLake + "'}",
        dataType: "json",
        async: false,
        success: function(msg) {
            document.getElementById(ctrl).innerHTML = "";
            $("#" + ctrl).append(msg.d);
        }
    });
}

