//交易信息联动
function ConnType() {
    language = $("#ContentPlaceHolder1_hidLanguage").val();
    var bect = document.getElementById("ContentPlaceHolder1_rblCottonType");
    var dnn = $("#hidWarehouse").val(bect);
    if (bect.value!="-1") {
        //取得交易类型为远期船货的仓库信息
        $.ajax({
            url: "../Sell/GetData.aspx?Type=GetTypeByCottonWarehouse&rblCottonTypeId=" + bect.value,
            type: "post",
            dataType: "json",
            success: function (msg) {
                $("#ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>"));
                $("#ContentPlaceHolder1_drpCottonWarehouse").attr("disabled", true);
                retMsg = msg;
                GetTypeByCottonWarehouse(msg);
                error: function () { 
                    
                }
            }
        });
    }
    else {
        $.ajax({
            url: "../Sell/GetData.aspx?Type=GetTypeByCottonWarehouseAll",
            type: "post",
            dataType: "json",
            success: function (msg) {
                retMsg = msg;
                GetTypeByCottonWarehouseAll(retMsg);
                error: function () { 
                }
            }
        });
    }
}
//根据交易方式查询仓库数据
function GetTypeByCottonWarehouse(data) {
    $("ContentPlaceHolder1_drpCottonWarehouse").html("");
    if (data.length > 0) {
        if(language.indexOf('zh') > -1){
            $("ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val("-1").html("全部"));
            for (var i = 0; i < data.length; i++) {
                $("ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val(data[i].ChildrenId).html(data[i].SysName));
            };
        }
        else {
            $("#ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val("-1").html("ALL"));
            for (var i = 0; i < data.length; i++) {
                $("#ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val(data[i].ChildrenId).html(data[i].SysNameEN));
            };
        }
    }
    else {
        if (language.indexOf('zh')) {
            $("#ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val("-1").html("全部"));
        }
        else {
            $("#ContentPlaceHolder1_drpCottonWarehouse").append($("<option></option>").val("-1").html("ALL"));
        }
    }
    $("#ContentPlaceHolder1_drpCottonWarehouse").removeAttr("disabled");
    return
}这样写有什么问题吗?