|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="cart.aspx.cs" Inherits="TradeManage.score.cart" %>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<title>Login</title>
|
|
|
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
|
|
|
<!--theme-style-->
|
|
|
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
|
|
|
<!--//theme-style-->
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
|
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
|
|
|
<!--fonts-->
|
|
|
<link href='http://fonts.useso.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
|
|
|
<!--//fonts-->
|
|
|
<script src="js/jquery.min.js"></script>
|
|
|
<script src="js/jquery.easydropdown.js"></script>
|
|
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$(function () {
|
|
|
ajaxInit(null);
|
|
|
var menu_ul = $('.menu > li > ul'),
|
|
|
menu_a = $('.menu > li > a');
|
|
|
menu_ul.hide();
|
|
|
menu_a.click(function (e) {
|
|
|
e.preventDefault();
|
|
|
if (!$(this).hasClass('active')) {
|
|
|
menu_a.removeClass('active');
|
|
|
menu_ul.filter(':visible').slideUp('normal');
|
|
|
$(this).addClass('active').next().stop(true, true).slideDown('normal');
|
|
|
} else {
|
|
|
$(this).removeClass('active');
|
|
|
$(this).next().stop(true, true).slideUp('normal');
|
|
|
}
|
|
|
});
|
|
|
GetCart();
|
|
|
GetAddr();
|
|
|
$("#SelectAll").live("click", function () {
|
|
|
if ($(this).is(":checked") == true)
|
|
|
{
|
|
|
$("input[mid]").attr("checked", "checked");
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
$("input[mid]").removeAttr("checked");
|
|
|
}
|
|
|
|
|
|
});
|
|
|
$("a[gid]").live("click", function () {
|
|
|
if (window.confirm('Sure to delete?') == false) return;
|
|
|
DeleteBuyCart($(this).attr("cid"), $(this).attr("gid"));
|
|
|
$(this).parent().parent().remove();
|
|
|
});
|
|
|
});
|
|
|
function DeleteBuyCart(Id, GiftId)
|
|
|
{
|
|
|
var param = new Object();
|
|
|
|
|
|
param.Id = Id;
|
|
|
param.GiftId = GiftId;
|
|
|
$.ajax({
|
|
|
url: "ScoreService.asmx/DeleteBuyCart",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
function GetCart()
|
|
|
{
|
|
|
$("#div_cart").empty();
|
|
|
var html = new Sys.StringBuilder();
|
|
|
html.append("<table style='width: 100%;'>");
|
|
|
html.append("<tr>");
|
|
|
html.append("<th style='width: 30px; text-align: center'>");
|
|
|
html.append("<input id='SelectAll' type='checkbox'></th>");
|
|
|
html.append("<th style='cursor: pointer; width: 50%; text-align: center'>Product Information</th>");
|
|
|
html.append("<th style='cursor: pointer; width: 10%; text-align: center'>Score</th>");
|
|
|
html.append("<th style='cursor: pointer; width: 10%; text-align: center'>Number</th>");
|
|
|
html.append("<th style='cursor: pointer; width: 10%; text-align: center'>Total Score</th>");
|
|
|
html.append("<th style='width: 80px; text-align: center'>Operate</th>");
|
|
|
html.append("</tr>");
|
|
|
html.append("</table>");
|
|
|
$.ajax({
|
|
|
url: "ScoreService.asmx/GetBuyCartList",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
|
html.append("<table style='width: 100%; border: solid 1px #add9c0;'>");
|
|
|
html.append("<tr>");
|
|
|
html.append("<td style='width: 30px; text-align: center'>");
|
|
|
html.append("<input type='checkbox' mid='" + this.Id + "' score='" + this.TotalScore + "' num='" + this.Num + "' note='" + this.Note + "' gid='" + this.GiftId + "'></td>");
|
|
|
html.append("<td style='width: 50%; text-align: center'>");
|
|
|
html.append("<img src='../" + this.ImageUrl + "' width='100px' height='100px' /><br />");
|
|
|
html.append(this.GiftName+" "+this.Note+"</td>");
|
|
|
html.append("<td style='width: 10%; text-align: center'>" + this.ChangeScore + "</td>");
|
|
|
html.append("<td style='width: 10%; text-align: center'>" + this.Num + "</td>");
|
|
|
html.append("<td style='width: 10%; text-align: center'>" + this.TotalScore + "</td>");
|
|
|
html.append("<td style='width: 80px; text-align: center'><a cid='" + this.Id + "' gid='"+this.GiftId+"'>Delete</a></td>");
|
|
|
html.append("</tr>");
|
|
|
html.append("</table>");
|
|
|
});
|
|
|
|
|
|
}
|
|
|
$("#div_cart").html(html.toString());
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
var addrmd = new Object();
|
|
|
function GetAddr() {
|
|
|
$.ajax({
|
|
|
url: "ScoreService.asmx/GetAddr",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
if (data.d != null)
|
|
|
{
|
|
|
addrmd = data.d;
|
|
|
$("#txt_Country").val(data.d.CountryCode);
|
|
|
$("#txt_Provice").val(data.d.Provice);
|
|
|
if (data.d.City != null && data.d.City != "")
|
|
|
$("#txt_Provice").val($("#txt_Provice").val()+ " " + data.d.City);
|
|
|
$("#txt_Address").val(data.d.Address);
|
|
|
$("#txt_PostCode").val(data.d.PostCode);
|
|
|
$("#txt_Phone").val(data.d.Phone);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function Login() {
|
|
|
if ($("#txt_username").val() == "") {
|
|
|
alert("Please enter your account number");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
if ($("#txt_password").val() == "") {
|
|
|
alert("Please enter your MemberCode");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
var param = new Object();
|
|
|
param.UserName = $("#txt_username").val();
|
|
|
param.PassWord = $("#txt_password").val();
|
|
|
|
|
|
$.ajax({
|
|
|
url: "ScoreService.asmx/ScoreLogin",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
alert(data.d);
|
|
|
if (data.d == "Login success") {
|
|
|
// window.location.href = "cs.aspx";
|
|
|
$("#div_1").hide();
|
|
|
$("#div_2").show();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
function Change()
|
|
|
{
|
|
|
|
|
|
if (window.confirm('Are you sure?Please make sure the address is correct') == false) return;
|
|
|
if ($("#txt_Country").val() == "")
|
|
|
{
|
|
|
alert("Please enter your Country");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
if ($("#txt_Provice").val() == "") {
|
|
|
alert("Please enter your Provice");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
if ($("#txt_Address").val() == "") {
|
|
|
alert("Please enter your Detailed Address");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
if ($("#txt_PostCode").val() == "") {
|
|
|
alert("Please enter your PostCode");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
if (addrmd == null)
|
|
|
addrmd = new Object();
|
|
|
addrmd.CountryCode = $("#txt_Country").val();
|
|
|
addrmd.Provice = $("#txt_Provice").val();
|
|
|
addrmd.City = "";
|
|
|
addrmd.Address = $("#txt_Address").val();
|
|
|
addrmd.Phone = $("#txt_Phone").val();
|
|
|
addrmd.PostCode = $("#txt_PostCode").val();
|
|
|
var list = new Array();
|
|
|
$("input[mid]:checked").each(function () {
|
|
|
var md = new Object();
|
|
|
md.Id = $(this).attr("mid");
|
|
|
md.GiftId = $(this).attr("gid");
|
|
|
md.TotalScore = $(this).attr("score");
|
|
|
md.Num = $(this).attr("num");
|
|
|
md.Note = $(this).attr("note");
|
|
|
Array.add(list, md);
|
|
|
|
|
|
});
|
|
|
if (list.length == 0)
|
|
|
{
|
|
|
alert("Please choose the gift you want to change");
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
var param = new Object();
|
|
|
param.list = list;
|
|
|
param.model = addrmd;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "ScoreService.asmx/BuyCart",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
|
|
|
alert(data.d);
|
|
|
if (data.d == "success") {
|
|
|
GetCart();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
|
|
|
</head>
|
|
|
<body>
|
|
|
<!--header-->
|
|
|
<div class="header">
|
|
|
<div class="top-header">
|
|
|
<div class="container">
|
|
|
<div class="top-header-left">
|
|
|
<ul class="support">
|
|
|
<li><a href="#">
|
|
|
<label></label>
|
|
|
</a></li>
|
|
|
<li><a href="#"><span class="live">Good Service </span></a></li>
|
|
|
</ul>
|
|
|
<ul class="support">
|
|
|
<li class="van"><a href="#">
|
|
|
<label></label>
|
|
|
</a></li>
|
|
|
<li><a href="#">Fast Shipping</a></li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="top-header-right">
|
|
|
<div class="down-top">
|
|
|
|
|
|
<select tabindex="4" class="dropdown">
|
|
|
<option value="" class="label" value="">English</option>
|
|
|
<option value="1">Japanese</option>
|
|
|
<option value="2">French</option>
|
|
|
<option value="3">German</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="down-top top-down">
|
|
|
|
|
|
<select tabindex="4" class="dropdown ">
|
|
|
<option value="" class="label" value="">Currency :USD</option>
|
|
|
<option value="1">Dollar</option>
|
|
|
<option value="2">Euro</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bottom-header">
|
|
|
<div class="container">
|
|
|
<div class="header-bottom-left">
|
|
|
<div class="logo">
|
|
|
<a href="index.html">
|
|
|
<img src="images/logo.png" alt=" " /></a>
|
|
|
</div>
|
|
|
<div class="search">
|
|
|
<input type="text" value="" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '';}">
|
|
|
<input type="submit" value="SEARCH">
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="header-bottom-right">
|
|
|
<ul class="men-grid">
|
|
|
<li><a href="login.html"><span></span>YOUR ACCOUNT</a></li>
|
|
|
<li class="login"><a href="login.html"><span></span>LOGIN</a></li>
|
|
|
|
|
|
</ul>
|
|
|
<div class="sign-up-right">
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!---->
|
|
|
<div class="container">
|
|
|
|
|
|
<div class="account_grid" >
|
|
|
<div id="div_cart">
|
|
|
<table style="width: 100%;">
|
|
|
|
|
|
<tr>
|
|
|
<th style="width: 30px; text-align: center">
|
|
|
<input id="DataGrid1_Table_SelectAll" type="checkbox"></th>
|
|
|
|
|
|
<th style="cursor: pointer; width: 50%; text-align: center">Product Information</th>
|
|
|
<th style="cursor: pointer; width: 10%; text-align: center">Score</th>
|
|
|
<th style="cursor: pointer; width: 10%; text-align: center">Number</th>
|
|
|
<th style="cursor: pointer; width: 10%; text-align: center">Total Score</th>
|
|
|
|
|
|
|
|
|
<th style="width: 80px; text-align: center">Operate</th>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
<table style="width: 100%; border: solid 1px #add9c0;">
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 30px; text-align: center">
|
|
|
<input type="checkbox"></td>
|
|
|
<td style="width: 50%; text-align: center">
|
|
|
<img src="images/b1 (1).jpg" width="100px" height="100px" /><br />
|
|
|
bag shaasdsad</td>
|
|
|
<td style="width: 10%; text-align: center">250</td>
|
|
|
<td style="width: 10%; text-align: center">2</td>
|
|
|
<td style="width: 10%; text-align: center">500</td>
|
|
|
<td style="width: 80px; text-align: center"><a>Delete</a></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
<table style="width: 100%; border: solid 1px #add9c0;">
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 30px; text-align: center">
|
|
|
<input type="checkbox"></td>
|
|
|
<td style="width: 50%; text-align: center">
|
|
|
<img src="images/b1 (2).jpg" width="100px" height="100px" /><br />
|
|
|
bag shaasdsad</td>
|
|
|
<td style="width: 10%; text-align: center">250</td>
|
|
|
<td style="width: 10%; text-align: center">2</td>
|
|
|
<td style="width: 10%; text-align: center">500</td>
|
|
|
<td style="width: 80px; text-align: center"><a>Delete</a></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
<table style="width: 100%; border: solid 1px #add9c0;">
|
|
|
|
|
|
<tr>
|
|
|
<td style="width: 30px; text-align: center">
|
|
|
<input type="checkbox"></td>
|
|
|
<td style="width: 50%; text-align: center">
|
|
|
<img src="images/b1 (3).jpg" width="100px" height="100px" /><br />
|
|
|
bag shaasdsad</td>
|
|
|
<td style="width: 10%; text-align: center">250</td>
|
|
|
<td style="width: 10%; text-align: center">2</td>
|
|
|
<td style="width: 10%; text-align: center">500</td>
|
|
|
<td style="width: 80px; text-align: center"><a>Delete</a></td>
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
</div>
|
|
|
<table style="width: 100%; border: solid 1px #add9c0;" border="1">
|
|
|
<tr><td colspan="4">Shipping Address:</td></tr>
|
|
|
<tr>
|
|
|
<td style="text-align: center" width="120px">Country:</td><td style="width: 120px; text-align: left">
|
|
|
<input id="txt_Country" type="text" /> </td> <td style="width: 70px; text-align: center">Provice,City:</td><td style="width: 120px; text-align: left">
|
|
|
<input id="txt_Provice" type="text" /> </td></tr>
|
|
|
<tr>
|
|
|
<td style="text-align: center" width="120px">Phone:</td><td style="width: 120px; text-align: left">
|
|
|
<input id="txt_Phone" type="text" /> </td> <td style="width: 70px; text-align: center">PostCode:</td><td style="width: 120px; text-align: left">
|
|
|
<input id="txt_PostCode" type="text" /> </td></tr>
|
|
|
<tr>
|
|
|
<td style="text-align: center" width="120px">Detailed Address:</td><td style="width: 320px; text-align: left;" colspan="3">
|
|
|
<input id="txt_Address" type="text" style="width:400px"/> </td></tr>
|
|
|
</table> <input type="submit" class="logininput" value="Confirm" onclick="Change();">
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
|
|
|
<div class="sub-cate">
|
|
|
<div class=" top-nav rsidebar span_1_of_left">
|
|
|
<h3 class="cate">CATEGORIES</h3>
|
|
|
<ul class="menu">
|
|
|
|
|
|
<li>
|
|
|
<ul class="kid-menu">
|
|
|
<li><a href="product.aspx?SortId=1">Women’s</a></li>
|
|
|
<li><a href="product.aspx?SortId=2">Men’s</a></li>
|
|
|
<li><a href="product.aspx?SortId=3">Bags</a></li>
|
|
|
<li><a href="product.aspx?SortId=4">Small Pieces</a></li>
|
|
|
<li><a href="product.aspx?SortId=5">Shoes</a></li>
|
|
|
<li><a href="product.aspx?SortId=6">Others</a></li>
|
|
|
<li><a href="">Contact US </a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
</div>
|
|
|
<!--initiate accordion-->
|
|
|
|
|
|
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<!---->
|
|
|
<div class="footer">
|
|
|
<div class="footer-top">
|
|
|
<div class="container">
|
|
|
<div class="latter">
|
|
|
<h6>NEWS-LATTER</h6>
|
|
|
<div class="sub-left-right">
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="latter-right">
|
|
|
<p>FOLLOW US</p>
|
|
|
<ul class="face-in-to">
|
|
|
<li><a href="#"><span></span></a></li>
|
|
|
<li><a href="#"><span class="facebook-in"></span></a></li>
|
|
|
<div class="clearfix"></div>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div style="width: 100%; text-align: center">
|
|
|
|
|
|
|
|
|
|
|
|
<p class="footer-class">Copyright @copy; 2015.Company name All rights reserved.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
</html>
|