function SetDig(ModelId, Id, FieldName, loading, App) {
    if (loading == "1") {
        document.getElementById("Span_Dig_" + ModelId + "_" + Id + "_" + FieldName + "").innerHTML = "<img src='" + App + "/images/loading.gif'/>";
    }

    D.BLL.B_Dig.SetDig(ModelId, Id, FieldName, DigCallBack);
}

function SetGroupDig(ModelId, Id, FieldName,GroupName, loading, App) {
    if (loading == "1") {
        document.getElementById("Span_GroupDig_" + ModelId + "_" + Id + "_" + GroupName + "").innerHTML = "<img src='" + App + "/images/loading.gif'/>";
    }

    D.BLL.B_Dig.SetGroupDig(ModelId, Id, FieldName, GroupName, GroupDigCallBack);
}

function DigCallBack(res) {
    if (res.value != null) {
        if (res.value.Rows[0]["Type"] == "1") {
            document.getElementById("Span_Dig_" + res.value.Rows[0]["ModelId"] + "_" + res.value.Rows[0]["Id"] + "_" + res.value.Rows[0]["FieldName"] + "").innerHTML = res.value.Rows[0]["Content"];
        }
        else {
            document.getElementById("Span_Dig_" + res.value.Rows[0]["ModelId"] + "_" + res.value.Rows[0]["Id"] + "_" + res.value.Rows[0]["FieldName"] + "").innerHTML = res.value.Rows[0]["Content1"];
            alert(res.value.Rows[0]["Content"]);
        }
    }
}

function GroupDigCallBack(res) {
    if (res.value != null) {
        if (res.value.Rows[0]["Type"] == "1") {
                document.getElementById("Span_GroupDig_" + res.value.Rows[0]["ModelId"] + "_" + res.value.Rows[0]["Id"] + "_" + res.value.Rows[0]["GroupName"] + "").innerHTML = res.value.Rows[0]["Content"];
        }
        else {
            document.getElementById("Span_GroupDig_" + res.value.Rows[0]["ModelId"] + "_" + res.value.Rows[0]["Id"] + "_" + res.value.Rows[0]["GroupName"] + "").innerHTML = res.value.Rows[0]["Content1"];
            alert(res.value.Rows[0]["Content"]);
        }
    }
}