$(document).ready(function(){
	BindClick('btn_insert_wd_sheet_master');
	BindClick('btn_vip_webtopos');
	BindClick('btn_update_product_storage');
	BindClick('btn_update_orders_status');
});

function BindClick(name){
	$('#' + name).click(function(){
		$.ajax({
			type:"get",
			url:'DataExport.aspx?NoCopyRight=1',
			data:'type=ajax&Action=' + name,
			cache:false,
			async:false,
			success:function(msg){
				if(msg == 'OK')
				{
					alert('操作成功！')
				}
				else
				{
					alert('操作失败！')
				}
			},
			error:function(XMLHttpRequest,textStatus){if(textStatus == 'parsererror'){alert('身份已过期,请重新登陆!')}else{alert('error')};}
		});
		return false;
	});
}