显示详情

  • 时间:
  • 来源:互联网
  • 文章标签:

@{
ViewData[“Title”] = “Detail”;
}

@显示详情@

$(function () {
    show();
});

function show() {
    var id = location.search.split("?")[1].split("=")[1];
    $.ajax({
        url: "http://localhost:49726/api/shop/ShopDetail?id=" + id,
        dataType: "json",
        success: function (result) {
            $("#shopname").val(result[0].shopName);
            $("#username").val(result[0].userName);
            $("#pwd").val(result[0].userPwd);
            $("#phone").val(result[0].phone);
            $("#type").val(result[0].shopType);
            $("#address").val(result[0].address);
            $("#num").val(result[0].shopNum);
            $("#totalincome").val(result[0].totalSale);
            $("#userreaback").val(result[0].userReback);
        }
    });
}

function Back() {
    location.href = "/home/index";
}





<tr>
    <td>商店名称</td>
    <td><input type="text" id="shopname" /></td>
</tr>
<tr>
    <td>持有人名称</td>
    <td><input type="text" id="username" /></td>
</tr>
<tr>
    <td>用户密码</td>
    <td><input type="password" id="pwd" /></td>
</tr>
<tr>
    <td>电话</td>
    <td><input type="text" id="phone" /></td>
</tr>
<tr>
    <td>商铺类型</td>
    <td>
        <input type="text" id="type" />
    </td>
</tr>
<tr>
    <td>地址</td>
    <td><input type="text" id="address" /></td>
</tr>
<tr>
    <td>店铺数量</td>
    <td><input type="text" id="num" /></td>
</tr>
<tr>
    <td>店铺总收入</td>
    <td><input type="text" id="totalincome" /></td>
</tr>
<tr>
    <td>客户退款</td>
    <td><input type="text" id="userreaback" /></td>
</tr>
<tr>
    <td></td>
    <td><input type="button" onclick="Back()" value="返回" /></td>
</tr>

本文链接http://www.taodudu.cc/news/show-82899.html