<%@ Page Title="" Language="C#" MasterPageFile="~/VEtterem.Master" AutoEventWireup="true"
    CodeBehind="ActiveOrders.aspx.cs" Inherits="VEtterem.Pultos.ActiveOrders" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPHMain" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <asp:Panel ID="PanelRendelesek" runat="server" CssClass="panel">
        <asp:GridView ID="RendelesekGridView" runat="server" AutoGenerateColumns="False"
            DataSourceID="AktivRendelesekSqlDataSource" AllowPaging="True" PageSize="20"
            DataKeyNames="RendelesID,UgyfelID" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
            AllowSorting="True" OnDataBound="RendelesekGridView_DataBound" CssClass="gw">
            <RowStyle CssClass="gwRStyle" />
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Label ID="RID" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "RendelesID") %>'
                            Visible="false" />
                        <asp:CheckBox ID="FolyamatbanCheckBox" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Készítik">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBoxKeszitik" runat="server" Enabled="false" ToolTip="Ha be van pipálva épp készül a rendelés" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Futárnál">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBoxFutarnal" runat="server" Enabled="false" ToolTip="Ha be van pipálva épp viszi a futár a rendelést" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FELADVA" HeaderText="Feladva" ReadOnly="True" SortExpression="FELADVA" />
                <asp:BoundField DataField="TELJESNEV" HeaderText="Teljes név" ReadOnly="True" SortExpression="TELJESNEV" />
                <asp:BoundField DataField="CIM" HeaderText="Cím" ReadOnly="True" SortExpression="CIM" />
                <asp:BoundField DataField="RENDELESID" HeaderText="RENDELESID" ReadOnly="True" SortExpression="RENDELESID"
                    Visible="False" />
                <asp:BoundField DataField="UGYFELID" HeaderText="UGYFELID" SortExpression="UGYFELID"
                    Visible="False" />
                <asp:CommandField ShowSelectButton="True" SelectText="Részletek" />
            </Columns>
            <FooterStyle CssClass="gwFooter" />
            <HeaderStyle CssClass="gwHeader" />
            <AlternatingRowStyle CssClass="gwAltRStyle" />
        </asp:GridView>
        <br />
        <asp:Button ID="ButtonKeszitik" runat="server" Text="Készítik" ToolTip="Kijelölt rendelések folyamatban státuszúra állítása"
            CommandName="Kesz" OnCommand="Button_Click" />
        <asp:Button ID="ButtonFutarnal" runat="server" CommandName="Futarnal" OnCommand="Button_Click"
            Text="Futárnál" />
        <asp:Button ID="TeljesitveButton" runat="server" CommandName="Telj" OnCommand="Button_Click"
            Text="Teljesítve!" />
        <asp:Button ID="TorlesButton" runat="server" Text="Törlés!" OnCommand="Button_Click"
            CommandName="Del" />
        <asp:ConfirmButtonExtender ID="TorlesButton_ConfirmButtonExtender" runat="server"
            ConfirmText="Biztos törli a kijelölteket?" Enabled="True" TargetControlID="TorlesButton">
        </asp:ConfirmButtonExtender>
        <asp:SqlDataSource ID="AktivRendelesekSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:VCS %>"
            ProviderName="<%$ ConnectionStrings:VCS.ProviderName %>" SelectCommand="SELECT RENDELES.FELADVA, UGYFEL.TELJESNEV, UGYFEL.CIM, RENDELES.RENDELESID, UGYFEL.UGYFELID, RENDELES.KESZITIK, RENDELES.FUTARNAL FROM UGYFEL INNER JOIN RENDELES ON UGYFEL.UGYFELID = RENDELES.UGYFEL WHERE (RENDELES.TELJESITVE IS NULL) ORDER BY RENDELES.FELADVA DESC">
        </asp:SqlDataSource>
    </asp:Panel>
</asp:Content>
