<%@ Page Language="c#" Codebehind="AdmZatrudnienieUrzedySkarbowe.aspx.cs" AutoEventWireup="True" Inherits="KOLKaP_WEB.KOLKaP.AdmZatrudnienieUrzedySkarbowe" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>Urzedy Skarbowe</title>
  
  <meta name="CODE_LANGUAGE" content="C#" />
  <meta name="vs_defaultClientScript" content="JavaScript" />
  
  <link href="../Web.css?2" type="text/css" rel="stylesheet" />
  <script type="text/javascript" language="javascript">
    function KeyDownHandler(btn)
    {
        // process only the Enter key
        if (event.keyCode == 13)
        {
            // cancel the default submit
            event.returnValue=false;
            event.cancel = true;
            // submit the form by programmatically clicking the specified button
            btn.click();
        }
    }
  </script>
</head>
<body class="Table" oncontextmenu="return false" style="margin-left:0; margin-right:0; margin-top:0">
  <form id="Form1" method="post" runat="server">
    <table cellspacing="0" cellpadding="0" width="100%">
      <tr>
        <td style="height: 20px; width:25%">
          <asp:Button ID="btnPowrot" runat="server" Text="Powrót" CssClass="aspButton" OnClick="btnPowrot_Click">
          </asp:Button>
        </td>
        <td style="height: 20px; width:25%; text-align:right">
          <small>Nazwa</small>
          <asp:TextBox ID="tbNazwa" runat="server" onKeyDown="KeyDownHandler(btnOdswiez)"></asp:TextBox>
        </td>
        <td style="height: 20px; width:25%; text-align:right">
          <small>Miasto</small>
          <asp:TextBox ID="tbMiasto" runat="server" onKeyDown="KeyDownHandler(btnOdswiez)"></asp:TextBox>
        </td>
        <td style="height: 20px; width:25%; text-align:right">
          <asp:Button ID="btnOdswiez" runat="server" CssClass="aspButton" Text="Odśwież" OnClick="btnOdswiez_Click">
          </asp:Button>
        </td>
      </tr>
      <tr>
        <td colspan="4">
          <asp:DataGrid ID="dgUrzedySkarbowe" Width="100%" runat="server" CssClass="aspGrid "
            DataSource="<%# dvUrzedySkarbowe %>" AutoGenerateColumns="False" AllowSorting="True">
            <AlternatingItemStyle CssClass="TableItemAlt"></AlternatingItemStyle>
            <ItemStyle CssClass="TableItem"></ItemStyle>
            <HeaderStyle CssClass="TableHeader"></HeaderStyle>
            <Columns>
              <asp:ButtonColumn Text="Wybierz" ButtonType="PushButton" CommandName="Select"></asp:ButtonColumn>
              <asp:BoundColumn Visible="False" DataField="ID_URZEDU" SortExpression="ID_URZEDU"
                HeaderText="ID_URZEDU"></asp:BoundColumn>
              <asp:BoundColumn DataField="SKROT" SortExpression="SKROT" HeaderText="Skr&#243;t">
                <HeaderStyle Width="20%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="NAZWA" SortExpression="NAZWA" HeaderText="Nazwa">
                <HeaderStyle Width="30%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="ADRES_1" SortExpression="ADRES_1" HeaderText="Adres">
                <HeaderStyle Width="25%"></HeaderStyle>
              </asp:BoundColumn>
              <asp:BoundColumn DataField="ADRES_2" SortExpression="ADRES_2" HeaderText="Adres 2">
                <HeaderStyle Width="25%"></HeaderStyle>
              </asp:BoundColumn>
            </Columns>
            <PagerStyle Position="Top" BackColor="LightGray" CssClass="Pager" Mode="NumericPages">
            </PagerStyle>
          </asp:DataGrid></td>
      </tr>
      <tr>
        <td colspan="4"><asp:Label ID="lblError" runat="server"></asp:Label></td>
      </tr>
    </table>
  </form>
</body>
</html>
