﻿function MountChange()
{
    $("#Amount").text(0);
    $("#Times").text(0);
    AjaxMethodPL.GetMarkPriceInfo
    (
        parseInt($("input[id$='hdServiceConfigID']").val()),
        parseInt($("select[id$='DDL_Mount'] option:selected").val()),
        function(result){
             if(null==result.error){
                if(result.value!=null){
                    var princeInfo=eval(result.value);
                    $("span[mark='currencyMark']").text(princeInfo.CurrencyMark);
                    //$("#currencyMark").text(princeInfo.CurrencyMark);
                    $("#Amount").text(princeInfo.Amount);
                    $("#Times").text(princeInfo.Days);
                    $("#VipAmount").text(princeInfo.VipAmount);
                }
            }
        }
    )
}

function MarkChange()
{
    AjaxMethodPL.GetMountInfo
    (
        parseInt($("input[id$='hdServiceConfigID']").val()),
        parseInt($("select[id$='DDL_TypeOfMark'] option:selected").val()),
        function(result){
              if(null==result.error){
                if(result.value!=null){
                    var dt = result.value;
                    var sel_Mount=$("select[id$='DDL_Mount']")[0];
                    sel_Mount.options.length = 0;
                    for(i=0;i<dt.Rows.length;i++){
                        sel_Mount.options.add(new Option(dt.Rows[i].GearsName,dt.Rows[i].GearsID)); 
                    }
                }
            }
            MountChange();
        }
    )
}

function Add()
{     
    AjaxMethodPL.AddMarkOrder
    (
        parseInt($("input[id$='hdServiceConfigID']").val()),
        parseInt($("select[id$='DDL_TypeOfMark'] option:selected").val()),
        parseInt($("select[id$='DDL_Mount'] option:selected").val()),
        function(result){                
            //函数在common文件里
            AddTemp_CallBack(result);
        }
    )
}
