<%@ 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("展商日程表");
            $("#mainmenu8").css("visibility", "visible");
        });

        function GoTo(str) {
            window.location = "<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/" + str;
        }

        function printBadge(id_s) {
            var head = "<html><head><title></title></head><body><table width=100% bgcolor=#FFFFFF height=600><tr><Td>";
            var foot = "</td></tr></table></body></html>";
            var newstr = $("#" + id_s).html();
            var oldstr = $("body").html();
            document.body.innerHTML = head + newstr + foot;
            window.print();
            document.body.innerHTML = oldstr;
        }
    </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 align="left">
                        <table border='0' cellpadding="0" cellspacing="0" width="100%" align="left">
                            <tr>
                                <td class="tdMenuSelect" onclick="GoTo('ScheduleActor')">
                                    展商日程
                                </td>
                                <td class="tdMenuWidth">&nbsp;</td>
                                <td class="tdMenu" onclick="GoTo('ScheduleReceiver')">
                                    接待人日程
                                </td>
                                <td>&nbsp;</td>
                            </tr>
                            <tr>
                                <td class="tdMenuLine" colspan="4"></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td>
                        以下是您的活动安排：
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="ShowDiv">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td class="td01" width="15%" align="center">
                                    日期
                                </td>
                                <td class="td01" width="85%" align="center">
                                    活动
                                </td>
                            </tr>
                        <%
                            Dictionary<DateTime, List<FamousFurnitureExpo.Models.Activity>> di = ViewData["Dict"] as Dictionary<DateTime, List<FamousFurnitureExpo.Models.Activity>>;
                            foreach (DateTime dt in di.Keys)
                            {   
                        %>
                            <tr>
                                <td class="td03" align="center" valign="top">
                                    <%=dt.ToShortDateString()%>
                                </td>
                                <td class="td03" align="left" style="padding-left:10px; padding-right:10px;">
                                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <%
                                List<FamousFurnitureExpo.Models.Activity> li=di[dt];
                                if (li.Count > 0)
                                {
                                    foreach (FamousFurnitureExpo.Models.Activity aty in li)
                                    {
                                        string str = "";
                                        if (aty.AtySource == "展商")
                                        {
                                            str = "您要举办活动";
                                        }
                                        if (aty.AtySource == "主办")
                                        {
                                            str = "您要参加主办活动";
                                        }
                        %>
                                        <tr>
                                            <td width="10%" align="left">
                                                <%=aty.AtyBTime %>
                                            </td>
                                            <td width="90%" align="left">
                                                <%=str %>&nbsp;<a title="<%=Server.HtmlEncode(aty.AtyContent) %>" href="<%=FamousFurnitureExpo.Models.Helper.VRoot %>/Exhibitor/ActivityShow/<%=aty.AtyID %>"><%=aty.AtyTheme %></a>
                                            </td>
                                        </tr>
                        <%   
                                    }
                                }
                                else
                                {
                                    Response.Write("<tr><td>没有日程安排</td></tr>");
                                }
                        %>              
                                    </table>
                                </td>
                            </tr>
                        <%
                            }
                        %>
                        </table>
                        </div>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td>
                        <div class="button" onclick="printBadge('ShowDiv')">打印</div>
                    </td>
                </tr>
            </table>
            </form>
        </center>
    </div>
</asp:Content>

