<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ExhibitorMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>


<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#CurrentPosition").html("相关联系人信息");
            $("#menu24").css("visibility", "visible");
        });

        function Add() {
            window.location = "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/LinkPersonEdit?Type=Add";
        }

        function Delete(id) {
            if (confirm("确认删除？")) {
                $("#ID").val(id);
                $("#Type").val("Delete");
                $("#f1").submit();
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <center>
            <form id="f1" action="" method="post">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="left">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td class="td01" width="20%">姓名</td>
                                <td class="td01" width="20%">职务</td>
                                <td class="td01" width="40%">类型</td>
                                <td class="td01" width="20%">操作</td>
                            </tr>
                        <%
                            System.Data.DataTable dt = ViewData["Data"] as System.Data.DataTable;
                            if (dt.Rows.Count > 0)
                            {
                                foreach (System.Data.DataRow dr in dt.Rows)
                                {
                        %>
                            <tr>
                                <td class="td03" align="center"><%=Server.HtmlEncode(dr["PsjName"].ToString()) %></td>
                                <td class="td03" align="center"><%=Server.HtmlEncode(dr["PsjRank"].ToString()) %></td>
                                <td class="td03" align="center"><%=Server.HtmlEncode(dr["PsjType"].ToString().Trim(',')) %></td>
                                <td class="td03" align="center">
                                    <a href="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/LinkPersonEdit?Type=Edit&ID=<%=dr["PsjID"] %>">编辑</a>&nbsp;
                                    <a href="javascript:Delete(<%=dr["PsjID"] %>);">删除</a>
                                </td>
                            </tr>
                        <%   
                                }
                            }
                            else
                            { 
                        %>
                            <tr>
                                <td colspan="4" class="td03" align="center" valign="middle" height="40" width="100%">暂无信息</td>
                            </tr>    
                        <%
                            } 
                        %>
                        </table>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td>
                        <div class="button" onclick="Add()">新增联系人</div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <script type="text/javascript">
                            var message = "<%=ViewData["Message"] %>";
                            if (message != "") {
                                MsgTip.show({ msg: message, ico: "warning", top: 340 });
                            }
                        </script>
                        <input type="hidden" id="ID" name="ID" />
                        <input type="hidden" id="Type" name="Type" />
                    </td>
                </tr>
            </table>
            </form>
        </center>
    </div>
</asp:Content>
