<%@ 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("预约信息");

        });
    </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">
                        <strong>预约信息</strong><br /><br />
                    </td>
                </tr>
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td class="td01" width="10%">姓名</td>
                                <td class="td01" width="15%">公司</td>
                                <td class="td01" width="10%">接待人</td>
                                <td class="td01" width="15%">预约时间</td>
                                <%--<td class="td01" width="15%">见面地点</td>
                                <td class="td01" width="15%">会面主题</td>--%>
                                <td class="td01" width="10%">状态</td>
                                <td class="td01" width="10%">发起方</td>
                            </tr>
                        <%
                            System.Data.DataTable dt = ViewData["DataTable"] as System.Data.DataTable;
                            if (dt != null && dt.Rows.Count > 0)
                            {
                                foreach (System.Data.DataRow dr in dt.Rows)
                                {
                                    string type = dr["Type"].ToString();
                                    string mmiSysState = dr["MmiSysState"].ToString();
                                    string state = "";
                                    string start = "";
                                    if (type == "预约")
                                    {
                                        start = "本方";
                                        if (mmiSysState == "确认")
                                        {
                                            state = "已确认";
                                        }
                                        if (mmiSysState == "申请")
                                        {
                                            state = "已申请，待确认";
                                        }
                                        if (mmiSysState == "重预订")
                                        {
                                            state = "对方建议新时间";
                                        }
                                    }
                                    if (type == "被预约")
                                    {
                                        start = "展商";
                                        if (mmiSysState == "确认")
                                        {
                                            state = "已接受";
                                        }
                                    }
                        %>
                            <tr>
                                <td class="td03"><%=Server.HtmlEncode(dr["PsnName"].ToString()) %></td>
                                <td class="td03"><%=Server.HtmlEncode(dr["PsnComName"].ToString()) %></td>
                                <td class="td03"><%=Server.HtmlEncode(dr["TktName"].ToString() == "" ? "待确定" : dr["TktName"].ToString())%></td>
                                <td class="td03"><%=Convert.ToDateTime(dr["MmiBTime"]).ToString() %></td>
                                <%--<td class="td03"><%=Server.HtmlEncode(dr["MmiInviteArea"].ToString()) %></td>
                                <td class="td03"><%=Server.HtmlEncode(dr["MmiReason"].ToString()) %></td>--%>
                                <td class="td03"><%=state %></td>
                                <td class="td03"><%=start %></td>
                            </tr>
                        <%            
                                }
                            }
                            else
                            { 
                        %>
                            <tr>
                                <td colspan="8" 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="window.history.go(-1)">返回</div>
                    </td>
                </tr>
            </table>
            </form>
        </center>
    </div>
</asp:Content>
