@{
    ViewBag.Title = "";
    Layout = "~/Views/Shared/_LayoutTable.cshtml";
}
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
    </div>
    <div class="ibox-content">
        <table class="table table-bordered table-striped table-hover">
            <tr>
                <td><span>照片类型：</span></td>
                <td><input id="photoType" type="text"   /></td>
                <td><button id="btnSave" class="btn btn-info btn-w-m" style="margin-top:5px;" onclick="saveImgType()">保存</button></td>
            </tr>
        </table>
    </div>
</div>
<script type="text/javascript">
    function saveImgType() {
        var typename = $("#photoType").val();
        if (!typename) {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
            return;
        }
        $.ajax({
            url: "../DataQuery/AddImgType",
            data: {
                typename: typename
            },
            datatype: "text",
            type: "post",
            success: function (data) {
                parent.layer.msg("保存成功", { icon: 1, tiem: 2000 });
                parent.$('#businessTable').bootstrapTable('refresh');
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }, error: function () {
                layer.msg("连接超时", { icon: 2, time: 2000 });
            }
        })
    }
</script>
