<%@ Page Language="c#" Codebehind="BadaniaLekarskieLista.aspx.cs" AutoEventWireup="True" Inherits="KOLKaP_WEB.KOLKaP.BadaniaLekarskieLista" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>BadaniaLekarskieLista</title>
  <meta content="True" name="vs_showGrid" />
  
  <meta content="C#" name="CODE_LANGUAGE" />
  <meta content="JavaScript" name="vs_defaultClientScript" />
  
  <link href="../Web.css?2" type="text/css" rel="stylesheet" />
  <style type="text/css">
    .DataGridFixedHeader { POSITION: relative; ; TOP: expression(this.offsetParent.scrollTop) }
  </style>
</head>
<body class="Body" oncontextmenu="return false" style="margin-left:0; margin-right:0">
  <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;
      }
    }
  </script>
  <form id="Form1" method="post" runat="server">
    <table class="Body" cellspacing="0" cellpadding="0" width="100%" border="0">
      <tr>
        <td colspan="5">
          <asp:Label ID="lblOpis" runat="server" Font-Bold="True" Font-Size="Medium">Badania lekarskie</asp:Label>
        </td>
      </tr>
      <tr>
        <td colspan="5">&nbsp;<br />&nbsp;</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" Text="Odśwież" CssClass="Button" 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="cbOstatniebadanie" runat="server" Text="Tylko ostatnie badania" Checked="True"></asp:CheckBox>
        </td>
        <td valign="bottom" style="width:20%"></td>
        <td style="width:20%"></td>
      </tr>
      <tr>
        <td colspan="5"></td>
      </tr>
      <tr>
        <td style="width:20%" colspan="5">
          <asp:Button ID="btnDrukuj" runat="server" Text="Raport z badań lekarskich" CssClass="aspButton" OnClick="btnDrukuj_Click"></asp:Button>
        </td>
      </tr>
    </table>
    <br />
    <table cellspacing="0" cellpadding="0" width="100%" border="0">
      <tr style="width:100%">
        <td valign="top" style="width:100%">
          <asp:DataGrid ID="dgBadania" runat="server" CssClass="aspGrid" Width="100%" AutoGenerateColumns="False"
            DataSource="<%# dvBadaniaLekarskie %>" PageSize="15" AllowSorting="True">
            <AlternatingItemStyle CssClass="TableItemAlt"></AlternatingItemStyle>
            <ItemStyle CssClass="TableItem"></ItemStyle>
            <HeaderStyle HorizontalAlign="Center" ForeColor="White" CssClass="TableHeader" VerticalAlign="Top">
            </HeaderStyle>
            <Columns>
              <asp:BoundColumn Visible="False" DataField="ID_BADANIA" SortExpression="ID_BADANIA"
                HeaderText="ID_BADANIA"></asp:BoundColumn>
              <asp:BoundColumn DataField="IMIE" SortExpression="IMIE" HeaderText="Imie">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="NAZWISKO" SortExpression="NAZWISKO" HeaderText="Nazwisko">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="NAZWA" SortExpression="NAZWA" HeaderText="Nazwa">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn Visible="False" DataField="KOD" SortExpression="KOD" HeaderText="Kod">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="DATA_OD" SortExpression="DATA_OD" HeaderText="Data od"
                DataFormatString="{0:yyyy-MM-dd}">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="DATA_DO" SortExpression="DATA_DO" HeaderText="Data do"
                DataFormatString="{0:yyyy-MM-dd}">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn Visible="False" DataField="PLACOWKA" SortExpression="PLACOWKA" HeaderText="Plac&#243;wka">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn Visible="False" DataField="LEKARZ" SortExpression="LEKARZ" HeaderText="Lekarz">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn Visible="False" DataField="OPIS" SortExpression="OPIS" HeaderText="Opis">
                <HeaderStyle Width="11%"></HeaderStyle>
              </asp:BoundColumn>
            </Columns>
            <PagerStyle BackColor="LightGray" CssClass="Pager"></PagerStyle>
          </asp:DataGrid>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
