<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintInfo.aspx.cs" Inherits="WorkFlow.FlowPage.WorkFlow_SPPage.PrintInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>打印</title>
    <style media="print" type="text/css">
        .noprint
        {
            visibility: hidden;
        }
    </style>
</head>
<body>
    <form id="myform" name="myform" runat="server">
    <% //获取服务器的地址
        string URL = this.Session["URL"].ToString();
        string ID;
        string DocType;
        string DocTitle = "";
        //起草文件,则ID为NULL,否则为记录的主键
        ID = Request.QueryString["ID"];
        if (ID == null || ID == "")
        {
            //获取新建文件的类型         
            DocType = "doc";
        }
        else
        {
            //获取DocTitle
            DocTitle = Request.QueryString["DocTitle"];
            //获取文件的 类型       
            DocType = "doc";
        }
        
 %>
    <table class="noprint">
        <tr>
            <td>
                <table>
                    <tr>
                        <td>
                            <img alt="" src="../../images/print.png" />
                        </td>
                        <td align="left">
                            <a href="javascript:window.print();" style="color: Blue; font-size: 24px">打印信息</a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left">
                <span style="font-size: 12px; color: red">提示：如打印时出现打印页面地址等特殊信息,请做以下操作浏览器“文件”→“页面设置”→“页眉页脚(内容选为-空-)”</span>
                <br />
                <br />
            </td>
        </tr>
    </table>
    <table width="100%">
        <tr>
            <td align="left" valign="top">
                <div style="margin-bottom: 9px;">
                    系统流水号:<asp:Label ID="lblNumber" runat="server"></asp:Label>
                </div>
                <center>
                    <table style="border: solid 1px black;" cellpadding="4" cellspacing="0">
                        <tr>
                            <td style="border-bottom: solid 1px black;">
                                <div id="User_WorkFlow_View_TitleInfo" runat="server" style="color: #2a6583; font-weight: bold;
                                    font-size: 25px; margin-bottom: 3px">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-bottom: solid 1px black;">
                                <div id="CreateInfo" runat="server" style="font-size: 12px; margin-bottom: 3px">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-bottom: solid 1px black;">
                                <div id="Notes" runat="server" style="font-size: 12px; margin-bottom: 3px">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-bottom: solid 1px black;">
                                <asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound"
                                    RepeatColumns="1">
                                    <ItemTemplate>
                                        <table width="100%">
                                            <tr>
                                                <td align="left">
                                                    <asp:ImageButton ID="ImageButton1" runat="server" />
                                                </td>
                                                <td align="left">
                                                    <span style="font-size: 12px">
                                                        <%#Eval("FileUploadInfo")%></span>
                                                    <asp:HiddenField ID="hifHZ" runat="server" Value=' <%#Eval("HZ")%>' />
                                                </td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:DataList>
                            </td>
                        </tr>
                        <tr>
                            <td style="border-bottom: solid 1px black;">
                                <div style="background-image: url('../icon/left-top.png'); width: 317px; height: 10px">
                                </div>
                                <div style="background-image: url('../icon/left-c.png'); width: 317px; text-align:center">
                                    <table width="98%" style="border-bottom: solid 1px black">
                                        <tr>
                                            <td align="left">
                                                <table>
                                                    <tr>
                                                        <td style="width: 19px">
                                                            <img alt="" src="../../images/ModifyRecord.gif" />
                                                        </td>
                                                        <td>
                                                            审批记录：
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <asp:GridView ID="grvSPList" runat="server" GridLines="None" AutoGenerateColumns="False"
                                        Width="98%" BorderStyle="None" OnRowDataBound="grvSPList_RowDataBound">
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                    <table width="100%" style="border-bottom: 1px dotted #cccccc;">
                                                        <tr>
                                                            <td align="left">
                                                                <%#Eval("SpNote")%>
                                                                <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" BorderStyle="None"
                                                                    Width="100%" GridLines="None" ShowHeader="True" ShowFooter="True">
                                                                    <Columns>
                                                                        <asp:TemplateField>
                                                                            <ItemTemplate>
                                                                                <table>
                                                                                    <tr>
                                                                                        <td align="left">
                                                                                            <span style="font-size: 12px">
                                                                                                <%#Eval("UpLoadFiles")%></span>
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("UserInfoName")%></span>
                                                                        </td>
                                                                        <td>
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("DepartmentName")%></span>
                                                                        </td>
                                                                        <td>
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("PostionName")%></span>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="3">
                                                                            <span style="font-size: 12px">
                                                                                <asp:HiddenField ID="hifSpDate" runat="server" Value='  <%#Eval("SpDate")%>' />
                                                                                <%#Eval("SpDate")%><asp:Label ID="lblWeek" runat="server" Font-Size="12px"></asp:Label>
                                                                            </span>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="3">
                                                                            <span style="font-size: 12px">耗时:<%#Eval("HS")%></span>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                                <div style="background-image: url('../icon/left-dw.png'); width: 317px; height: 10px">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div style="background-image: url('../icon/left-top.png'); width: 317px; height: 10px">
                                </div>
                                <div style="background-image: url('../icon/left-c.png'); width: 317px; text-align:center">
                                    <table width="98%" style="border-bottom: solid 1px black">
                                        <tr>
                                            <td align="left">
                                                <table>
                                                    <tr>
                                                        <td style="width: 19px">
                                                            <img alt="" src="../../images/AllEnoplyee.gif" />
                                                        </td>
                                                        <td>
                                                            沟通记录：
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                    <asp:GridView ID="grvGTList" runat="server" AutoGenerateColumns="False" BorderStyle="None"
                                        Width="100%" GridLines="None" ShowHeader="True" ShowFooter="True">
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                    <table width="100%" style="border-bottom: 1px dotted #cccccc;">
                                                        <tr>
                                                            <td align="left">
                                                                <%#Eval("Notes")%>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("CreateUserName")%></span>
                                                                        </td>
                                                                        <td>
                                                                            <table cellpadding="0" cellspacing="0">
                                                                                <tr>
                                                                                    <td style="font-size: 12px; color: Green;">
                                                                                        发送至
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="center">
                                                                                        <img src="../../images/line_double_arrow_end.png" alt="" width="20px" />
                                                                                    </td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                        <td>
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("Name")%></span>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td colspan="3">
                                                                            <span style="font-size: 12px">
                                                                                <%#Eval("CreateDate")%></span>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </div>
                                <div style="background-image: url('../icon/left-dw.png'); width: 317px; height: 10px">
                                </div>
                            </td>
                        </tr>
                    </table>
                </center>
            </td>
            <td style="width: 68%" align="left" valign="top">

                <script language="javascript" type="text/javascript" for="WebOffice1" event="NotifyCtrlReady">
WebOffice1_NotifyCtrlReady();
</script>

                <input id="User_WorkFlow_Order_ID" type="text" name="User_WorkFlow_Order_ID" style="display: none"
                    runat="server" />

                <script language="javascript" type="text/javascript">
var s = ""
s += "<object id=WebOffice1 height=586  width='99%' style='LEFT: 0px; TOP: 0px'  classid='clsid:E77E049B-23FC-4DB8-B756-60529A35FAD5' codebase=WebOffice.cab#V6,0,2,0>"
s +="<param name='_ExtentX' value='6350'><param name='_ExtentY' value='6350'>"
s +="</OBJECT>"
document.write(s)
                </script>

                <script language="javascript" type="text/javascript">
    function CloseDoc()
    {
       document.all.WebOffice1.Close();
        var win = parent.Ext.getCmp('Window1');if (win) {win.hide();}  
    }
        function window_onunload() {
	        document.all.WebOffice1.Close();
        }
        // -----------------------------== 修订文档 ==------------------------------------ //
        function ProtectRevision() {
	        document.all.WebOffice1.SetTrackRevisions(0) 
        }

        // -----------------------------== 隐藏修订 ==------------------------------------ //
        function UnShowRevisions() {
	        document.all.WebOffice1.ShowRevisions(0);
        }
        // --------------------------== 显示当前修订 ==---------------------------------- //
        function ShowRevisions() {
	        document.all.WebOffice1.ShowRevisions(0);
        }
        // -------------------------== 接受当前所有修订 ------------------------------ //
        function AcceptAllRevisions() {
            document.all.WebOffice1.SetTrackRevisions(0);
        }     
     function WebOffice1_NotifyCtrlReady() 
     { 
        document.all.WebOffice1.ShowToolBar = 0; // 0 隐藏 1 显示
             document.all.WebOffice1.LoadOriginalFile("<%=URL %>/GetPrintCenter.aspx?User_WorkFlow_Order_ID="+myform.User_WorkFlow_Order_ID.value,"doc");
 	         document.all.WebOffice1.SetTrackRevisions(1);
             document.all.WebOffice1.ShowRevisions(0);//隐藏修订
    	document.all.WebOffice1.ProtectDoc(1,1,"222");//设置文档保护
     
   

     }

    </script>

            </td>
        </tr>
    </table>
    <table class="noprint">
        <tr>
            <td>
                <table>
                    <tr>
                        <td>
                            <img alt="" src="../../images/print.png" />
                        </td>
                        <td align="left">
                            <a href="javascript:window.print();" style="color: Blue; font-size: 24px">打印信息</a>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left">
                <span style="font-size: 12px; color: red">提示：如打印时出现打印页面地址等特殊信息,请做以下操作浏览器“文件”→“页面设置”→“页眉页脚(内容选为-空-)”</span>
                <br />
                <br />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
