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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>AdmPracownicyWybierzWielu</title>
    
    <meta name="CODE_LANGUAGE" content="C#" />
    <meta name="vs_defaultClientScript" content="JavaScript" />
    
    <link rel="stylesheet" type="text/css" href="../Web.css?2" />
    <style type="text/css">.DataGridFixedHeader { POSITION: relative; ; TOP: expression(this.offsetParent.scrollTop) }
    </style>
</head>
<body oncontextmenu="return false" class="Body" style="margin-left: 0px; margin-right:0px">

    <script type="text/javascript">
    window.onload = function() {
      
      if (document.getElementById('ceZObowiazujacaUmowaDla').checked)
        document.getElementById('ddlJednostka').disabled = false;
      else
        document.getElementById('ddlJednostka').disabled = true;
        
      document.getElementById('ceZObowiazujacaUmowaDla').onclick = function() {
        if(this.checked) 
          document.getElementById('ddlJednostka').disabled = false;
        else if(!this.checked) 
          document.getElementById('ddlJednostka').disabled = true;
      }
      
      if (document.getElementById('ceZakonczone').checked)
        document.getElementById('ddlJednostkaZakonczone').disabled = false;
      else
        document.getElementById('ddlJednostkaZakonczone').disabled = true;
      
      document.getElementById('ceZakonczone').onclick = function() {
        if(this.checked) 
          document.getElementById('ddlJednostkaZakonczone').disabled = false;
        else if(!this.checked) 
          document.getElementById('ddlJednostkaZakonczone').disabled = true;
      }
    }
    </script>

    <form id="Form1" method="post" runat="server">
        <table class="Body" border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td colspan="5">
                    <asp:Label ID="lblOpis" runat="server" Font-Size="Medium" Font-Bold="True">Wybierz pracowników</asp:Label></td>
            </tr>
            <tr>
                <td colspan="5">
                    <asp:Label ID="lblError" runat="server" EnableViewState="False"></asp:Label></td>
            </tr>
            <tr>
                <td valign="bottom" style="width:20%">
                    <small>Nazwisko</small><asp:TextBox ID="tbNazwisko" runat="server" Width="100%"></asp:TextBox></td>
                <td valign="bottom" style="width:20%">
                    <small>Imię</small>
                    <asp:TextBox ID="tbImie" runat="server" Width="100%"></asp:TextBox></td>
                <td valign="bottom" style="width:20%">
                    <small>Pesel</small><asp:TextBox ID="tbPesel" runat="server" Width="100%"></asp:TextBox></td>
                <td valign="bottom" style="width:20%">
                    <small>Nr kartoteki</small>
                    <asp:TextBox ID="tbNrKartoteki" runat="server" Width="100%"></asp:TextBox></td>
                <td valign="bottom" style="width:20%">
                    <asp:Button ID="btnOdswiez" runat="server" Width="90px" CssClass="Button" Text="Odśwież"
                        OnClick="btnOdswiez_Click"></asp:Button></td>
            </tr>
            <tr>
                <td valign="bottom" style="width:20%">
                    <asp:CheckBox ID="ceZObowiazujacaUmowaDla" runat="server" Text="Z obowiązującą umową dla"
                        Checked="True"></asp:CheckBox></td>
                <td valign="bottom" style="width:20%" colspan="2">
                    <asp:Label ID="lblJednostka" runat="server">
              <small>Jednostka</small></asp:Label><asp:DropDownList ID="ddlJednostka" runat="server"
                  Width="100%" Enabled="False">
              </asp:DropDownList></td>
                <td valign="bottom" style="width:20%">
                    <asp:CheckBox ID="ceBezUmowy" runat="server" Text="Bez umowy"></asp:CheckBox></td>
                <td valign="bottom" style="width:20%">
                    <asp:Button ID="btnWybierz" runat="server" Width="90px" CssClass="Button" Text="Wybierz"
                        OnClick="btnWybierz_Click"></asp:Button></td>
                <td style="width:20%" align="left">
                </td>
            </tr>
            <tr>
                <td valign="bottom" style="width:20%">
                    <asp:CheckBox ID="ceZakonczone" runat="server" Text="Z zakończoną umową dla"></asp:CheckBox></td>
                <td valign="bottom" style="width:20%" colspan="2">
                    <asp:Label ID="lblJednostaZakonczone" runat="server">
              <small>Jednostka</small></asp:Label><asp:DropDownList ID="ddlJednostkaZakonczone"
                  runat="server" Width="100%" Enabled="False">
              </asp:DropDownList></td>
                <td valign="bottom" style="width:20%">
                </td>
                <td valign="bottom" style="width:20%">
                    <asp:Button ID="btnPowrot" runat="server" Width="90px" CssClass="Button" Text="Powrót"
                        OnClick="btnPowrot_Click"></asp:Button></td>
                <td style="width:20%" align="left">
                </td>
            </tr>
        </table>
        <br />
        <table border="0" cellspacing="0" cellpadding="0" width="100%" >
            <tr>
                <td style="height:9px; width:941px" valign="bottom" colspan="2">
                    <asp:Label ID="lblPracownicy" runat="server" Font-Size="11px" Font-Bold="True" Width="100%"
                        Visible="False" Font-Names="Tahoma,Arial,Helvetica"></asp:Label></td>
            </tr>
            <tr>
                <td valign="top" colspan="2" style="width: 941px">
                    <asp:DataGrid ID="dgPracownicy" runat="server" Width="100%" CssClass="aspGrid" AllowSorting="True"
                        PageSize="15" DataSource="<%# dvPracownicy %>" AutoGenerateColumns="False">
                        <AlternatingItemStyle CssClass="TableItemAlt"></AlternatingItemStyle>
                        <ItemStyle CssClass="TableItem"></ItemStyle>
                        <HeaderStyle HorizontalAlign="Center" ForeColor="White" CssClass="TableHeader" VerticalAlign="Top">
                        </HeaderStyle>
                        <Columns>
                            <asp:TemplateColumn>
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbWybor" runat="server"></asp:CheckBox>
                                </ItemTemplate>
                            </asp:TemplateColumn>
                            <asp:BoundColumn Visible="False" DataField="ID_PRACOWNIKA" SortExpression="ID_PRACOWNIKA"
                                HeaderText="ID_PRACOWNIKA"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="ID_KTH_ALT" SortExpression="ID_KTH_ALT"
                                HeaderText="ID_KTH_ALT"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="DATA_URODZENIA" SortExpression="DATA_URODZENIA"
                                HeaderText="DATA_URODZENIA"></asp:BoundColumn>
                            <asp:BoundColumn DataField="NAZWISKO" SortExpression="NAZWISKO" HeaderText="Nazwisko">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="IMIE" SortExpression="IMIE" HeaderText="Imie"></asp:BoundColumn>
                            <asp:BoundColumn DataField="JEDNOSTKA" SortExpression="JEDNOSTKA" HeaderText="Jednostka">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="STANOWISKO" SortExpression="STANOWISKO" HeaderText="Stanowisko">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="DATA_ROZP_WSP" SortExpression="DATA_ROZP_WSP" HeaderText="Rozpoczęcie wsp&#243;łpracy">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="DATA_DO" SortExpression="DATA_DO" HeaderText="Zatrudniony do">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="PESEL" SortExpression="PESEL" HeaderText="PESEL"></asp:BoundColumn>
                            <asp:BoundColumn DataField="NAZWA_SKR" SortExpression="NAZWA_SKR" HeaderText="Nazwa skr.">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="NR_KARTOTEKI" SortExpression="NR_KARTOTEKI" HeaderText="Nr kartoteki">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="ID_KONTRAHENTA" SortExpression="ID_KONTRAHENTA" HeaderText="Id kontrahenta">
                            </asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="NIP" SortExpression="NIP" HeaderText="NIP">
                            </asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="NAZWISKO_IMIE" SortExpression="NAZWISKO_IMIE"
                                HeaderText="NAZWISKO_IMIE"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="PRACOWNIK" SortExpression="PRACOWNIK"
                                HeaderText="PRACOWNIK"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="WSPOLPRACOWNIK" SortExpression="WSPOLPRACOWNIK"
                                HeaderText="WSPOLPRACOWNIK"></asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="ID_MPZ" SortExpression="ID_MPZ" HeaderText="ID_MPZ">
                            </asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="ID_UMOWY" SortExpression="ID_UMOWY" HeaderText="ID_UMOWY">
                            </asp:BoundColumn>
                            <asp:BoundColumn Visible="False" DataField="AKTUALNA" SortExpression="AKTUALNA" HeaderText="AKTUALNA">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="WWW_LOGIN" SortExpression="WWW_LOGIN" HeaderText="Login">
                            </asp:BoundColumn>
                            <asp:BoundColumn DataField="EMAIL" SortExpression="EMAIL" HeaderText="Email"></asp:BoundColumn>
                        </Columns>
                        <PagerStyle BackColor="LightGray" CssClass="Pager"></PagerStyle>
                    </asp:DataGrid></td>
            </tr>
        </table>
    </form>
</body>
</html>
