<%@ Page Language="c#" CodeBehind="AdmZatrudnienieWydruk.aspx.cs" AutoEventWireup="True" Inherits="KOLKaP_WEB.KOLKaP.AdmZatrudnienieWydruk" %>

<%@ Register TagPrefix="dx" Namespace="DevExpress.XtraReports.Web" Assembly="DevExpress.XtraReports.v14.2.Web, Version=14.2.10.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Wydruk</title>
    <link href="../Web.css?2" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../Skrypty.js"></script>
    <script type="text/javascript">
                   function init(s) {
                     var createFrameElement = s.viewer.printHelper.createFrameElement;
                     s.viewer.printHelper.createFrameElement = function (name) {
                       var frameElement = createFrameElement.call(this, name);
                       var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
                       if (isChrome) {
                         frameElement.addEventListener("load", function (e) {
                           if (frameElement.contentDocument && frameElement.contentDocument.contentType !== "text/html")
                             frameElement.contentWindow.print();
                         });
                       }
                       return frameElement;
                     }
                   }
    </script>
</head>
<body>
    <form id="Form1" name="form1" method="post" target="_self" runat="server">
        <div>
            <asp:CheckBox ID="cbDrukujRachunek" runat="server" Text="Drukuj rachunek" AutoPostBack="True"
                Checked="True" OnCheckedChanged="cbDrukujRachunek_CheckedChanged"></asp:CheckBox>
            <asp:CheckBox ID="cbDrukujUmowe" runat="server" Text="Drukuj Umowe" Checked="True"
                AutoPostBack="True" OnCheckedChanged="cbDrukujRachunek_CheckedChanged"></asp:CheckBox>
            <asp:CheckBox ID="cbDrukujOswiadczenie" runat="server" Text="Drukuj Oświadczenie"
                Checked="True" Visible="False" AutoPostBack="True" OnCheckedChanged="cbDrukujOswiadczenie_CheckedChanged"></asp:CheckBox>
            <asp:Label ID="lblData" runat="server" Text="Data wypłaty" Visible="False">Data wypłaty (rrrr-mm-dd):</asp:Label>
            <asp:TextBox ID="tbDataWyplaty" runat="server" AutoPostBack="True" OnTextChanged="tbDataWypłaty_TextChanged"></asp:TextBox><br />

            <div style="clear: both">
                <dx:ASPxDocumentViewer ID="dv" runat="server" ToolbarMode="Ribbon">
                  <ClientSideEvents Init="init" />
                </dx:ASPxDocumentViewer>
            </div>
        </div>
    </form>
</body>
</html>
