<%@ 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("接待人员管理");
            $("#menu71").css("visibility", "visible");
        });

        function Treat(id, type) {
            $("#TktID").val(id);
            $("#Type").val(type);
            $("#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" style="text-align: left" cellpadding="0" cellspacing="0" id="main">
                <tr>
                    <td>
                        添加人员信息，请在胸卡申请，展商胸卡申请添加参展商胸卡。
                        <a href="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/ExhiActorCard">点击这里</a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td class="td01">姓名</td>
                                <td class="td01">职务</td>
                                <td class="td01">公司名称</td>
                                <td class="td01">是否接待观众</td>
                                <td class="td01">操作</td>
                            </tr>
                        <% 
                            List<FamousFurnitureExpo.Models.Ticket> li = ViewData["Li"] as List<FamousFurnitureExpo.Models.Ticket>;
                            if (li.Count > 0)
                            {
                                foreach (FamousFurnitureExpo.Models.Ticket ec in li)
                                {
                                    string show = "";
                                    string button = "";
                                    if (ec.TktIfTreat)
                                    {
                                        show = "接待";
                                        button = "<a href=\"javascript:Treat(" + ec.TktID + ",'No');\">取消</a>";
                                    }
                                    else
                                    {
                                        button = "<a href=\"javascript:Treat(" + ec.TktID + ",'Yes');\">接待</a>";
                                    }
                        %>
                            <tr>
                                <td class="td03" width="20%" align="center"><%=Server.HtmlEncode(ec.TktName) %></td>
                                <td class="td03" width="10%" align="center"><%=Server.HtmlEncode(ec.TktRank) %></td>
                                <td class="td03" width="40%" align="center"><%=Server.HtmlEncode(ec.TktComName) %></td>
                                <td class="td03" width="20%" align="center"><%=show %></td>
                                <td class="td03" width="10%" align="center"><%=button %></td>
                            </tr>
                        <%            
                                }
                            }
                            else
                            { 
                        %>
                            <tr>
                                <td colspan="8" class="td03" align="center" valign="middle" height="40" width="100%">暂无信息</td>
                            </tr>
                        <%
                            }    
                        %>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="hidden" id="TktID" name="TktID" />
                        <input type="hidden" id="Type" name="Type" />
                        <script type="text/javascript">
                            var message = "<%=ViewData["Message"] %>";
                            if (message != "") {
                                MsgTip.show({ msg: message, ico: "warning", top: 340 });
                            }
                        </script>
                    </td>
                </tr>
            </table>
            </form>
        </center>
    </div>
</asp:Content>
