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

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>GrupyMailowePracownicyLista</title>
    <link href="../Web.css?2" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="../jquery/themes/ui-lightness/jquery-ui-1.11.2.min.css" />
    <script src="../jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../jquery/ui/jquery-ui-1.11.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        $(function () {

            $("#btnOdswiez").button({ icons: { primary: 'ui-icon-refresh' } });
            $("#btnDodaj").button({ icons: { primary: 'ui-icon-plusthick' } });
            $("#btnUsun").button({ icons: { primary: 'ui-icon-trash' } });
            $("#btnDrukuj").button({ icons: { primary: 'ui-icon-print' } });
            $("#btnExportExcel").button({ icons: { primary: 'ui-icon-disk' } });
            $("#btnPowrot").button({ icons: { primary: 'ui-icon-arrowreturnthick-1-w' } });
        })
    </script>
</head>
<body class="Body" style="margin-left: 0px; margin-right: 5px">
    <form id="Form1" method="post" runat="server">
        <div style="padding-bottom: 5px;">
            <asp:Label ID="lblOpis" runat="server" Font-Bold="True" Font-Size="Medium">Grupa\lista mailowa: pracownicy</asp:Label>
        </div>
        <asp:Label ID="lblError" runat="server" EnableViewState="False"></asp:Label>
        <table class="Body" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td valign="bottom" style="width: 33%">
                    <small>Nazwisko</small><br />
                    <asp:TextBox ID="tbNazwisko" runat="server" Width="98%"></asp:TextBox>
                </td>
                <td valign="bottom" style="width: 33%">
                    <small>Imię</small><br />
                    <asp:TextBox ID="tbImie" runat="server" Width="98%"></asp:TextBox>
                </td>
                <td valign="bottom" style="width: 34%; text-align: right">
                    <asp:LinkButton ID="btnOdswiez" runat="server" Width="90px" Text="Odśwież" CssClass="Button"
                        OnClick="btnOdswiez_Click"></asp:LinkButton>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width: 66%">
                    <asp:LinkButton ID="btnDodaj" runat="server" Width="110px" Text="Dodaj" CssClass="aspButton" OnClick="btnDodaj_Click"></asp:LinkButton>
                    <asp:LinkButton ID="btnUsun" runat="server" Width="110px" Text="Usuń" CssClass="aspButton" Enabled="False" OnClick="btnUsun_Click"></asp:LinkButton>
                    <asp:LinkButton ID="btnDrukuj" runat="server" Width="110px" Text="Drukuj" CssClass="aspButton" OnClick="btnDrukuj_Click"></asp:LinkButton>
                <asp:LinkButton ID="btnExportExcel" runat="server" Width="140px" CssClass="aspButton" Text="Eksport do Excel" OnClick="btnExportExcel_Click" ></asp:LinkButton>
                </td>
                <td align="right" style="width: 34%">
                    <asp:LinkButton ID="btnPowrot" runat="server" Width="90px" Text="Powrót" CssClass="Button" OnClick="btnPowrot_Click"></asp:LinkButton>
                </td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;</td>
            </tr>
        </table>
        <asp:Label ID="lblGrupyListyMailowe" runat="server" Font-Bold="True" Font-Size="11px"
            Width="100%" Font-Names="Tahoma,Arial,Helvetica"></asp:Label>
        <asp:DataGrid ID="dgPracownicy" runat="server" Width="100%" CssClass="aspGrid" AllowSorting="True" DataSource="<%# dvPracownicy %>" AutoGenerateColumns="False" OnItemDataBound="dgPracownicy_ItemDataBound">
            <AlternatingItemStyle CssClass="TableItemAlt"></AlternatingItemStyle>
            <ItemStyle CssClass="TableItem"></ItemStyle>
            <HeaderStyle HorizontalAlign="Center" ForeColor="White" CssClass="TableHeader" VerticalAlign="Top"></HeaderStyle>
            <Columns>
                <asp:TemplateColumn HeaderText="Wybierz">
                    <HeaderStyle Width="10px"></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="ceWybierzUmowe" AutoPostBack="False" Visible='<%# (Eval("Z_FIRMY").ToString() == "T" ? true : false) %>'/>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn Visible="False" DataField="ID_KONTRAHENTA" SortExpression="ID_KONTRAHENTA"
                    HeaderText="ID_KONTRAHENTA"></asp:BoundColumn>
                <asp:BoundColumn DataField="WWW_LOGIN" SortExpression="WWW_LOGIN" HeaderText="Login">
                    <HeaderStyle Width="18%"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="IMIE" SortExpression="IMIE" HeaderText="Imie">
                    <HeaderStyle Width="18%"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="NAZWISKO" SortExpression="NAZWISKO" HeaderText="Nazwisko">
                    <HeaderStyle Width="18%"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="STANOWISKO" SortExpression="STANOWISKO" HeaderText="Stanowisko">
                    <HeaderStyle Width="18%"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="JEDNOSTKA" SortExpression="JEDNOSTKA" HeaderText="Jednostka">
                    <HeaderStyle Width="18%"></HeaderStyle>
                </asp:BoundColumn>
                <asp:BoundColumn Visible="False" DataField="Z_FIRMY" SortExpression="Z_FIRMY" HeaderText="Z firmy">
                    <HeaderStyle></HeaderStyle>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundColumn>
                <asp:TemplateColumn HeaderText="Z firmy">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:CheckBox runat="server" ID="ceZFirmy" AutoPostBack="False" Enabled="false" Checked='<%# (Eval("Z_FIRMY").ToString() == "T" ? true : false) %>' />
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
            <PagerStyle HorizontalAlign="Left" Position="Top" BackColor="LightGray" CssClass="Pager"
                Mode="NumericPages"></PagerStyle>
        </asp:DataGrid>
    </form>
</body>
</html>
