<%@ Page Language="VB" AutoEventWireup="false" Inherits="SGHweb.SIG_frm_cargaPedido" Codebehind="frm_cargaPedido.aspx.vb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/noty/jquery.noty.js"></script>
    <script type="text/javascript" src="../Scripts/noty/themes/default.js"></script>
    <script type="text/javascript" src="../Scripts/noty/layouts/center.js"></script>
    <link rel="stylesheet" type="text/css" href="../Scripts/noty/buttons.css" />

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script language="javascript" type="text/javascript">
            function Button1_onclick() {
                $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("cajaTextoSuma");
                return false;
            }
            function Button37_onclick() {
                $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("cajaTextoResta");
                return false;
            }

            function restaSilla_onclick() {
                $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("sillaResta");
                return false;
            }

            function sumaSilla_onclick() {
                $find("<%= RadAjaxManager1.ClientID%>").ajaxRequest("sillaSuma");
                return false;
            }

            function GenerarAlerta(type, texto) {
                var n = noty({
                    text: texto,
                    type: type,
                    dismissQueue: true,
                    layout: 'center',
                    modal: true,
                    theme: 'defaultTheme',
                    buttons: [
                    { addClass: 'btn btn-primary', text: 'Ok', onClick: function ($noty) {
                        $noty.close();
                    }
                    },
                  ]
                });
                console.log(type + ' - ' + n.options.id);
                return n;
            }

            //function HandleOnclose() {
            //    alert("Close Session");
            //    PageMethods.AbandonSession();
            //}
            //window.onbeforeunload = HandleOnclose;
                
        </script>
    </telerik:RadCodeBlock>
    <style type="text/css">
        .wrap 
        { 
            white-space: normal; 
        }
        .btnTipo
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .btnProducto
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .btnClase
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .btnMasVendido
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .btnCombos
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .btnProductoDetCombo
        {
            white-space : pre-line;
            width : 100%;
            height : 70%;
        }
        .wrappp
        {
            text-wrap:none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <center>
        <asp:Panel ID="panelEncabezado" runat="server">
            <table border="0px" width="100%"  cellpadding="0" cellspacing="0" 
                    style="border-right:#3c7fb1 1px solid; border-left:#3c7fb1 1px solid; border-bottom:#3c7fb1 1px solid; border-top:#3c7fb1 1px solid; font-family: Arial, Helvetica, sans-serif; color: #006699; font-weight: bold; font-size: 16px;">
                <tr>
                    <td  style="background-color:#ecf4ff; text-align: left; padding-right:10px; padding-left:10px; padding-bottom:5px; padding-top:5px;" valign="middle" class="gridtextgray" >
                        <asp:Panel ID="PanelComandasxId" runat="server">
                            <table width="100%" border="0px">
                                <tr>
                                    <td style="width:40%">
                                        P.V :&nbsp;
                                        <asp:Label ID="puntoVentaLB" runat="server" Text="" style="color: #990066;"></asp:Label>
                                        <%--<asp:Label ID="puntoVentaLBB" runat="server" Text="" style="color: #990066;"></asp:Label>--%>
                                    </td>
                                    <td >
                                        Mesa :&nbsp;
                                        <asp:Label ID="mesaLB" runat="server" Text=""></asp:Label>
                                    </td>
                                    <td style="width:20%">
                                        Mozo :&nbsp;
                                        <asp:Label ID="mozoLB" runat="server" Text=""></asp:Label>
                                    </td>
                                    <td style="width:110px; text-align: right;">
                                        T.C. : &nbsp;<asp:Label ID="lblTipoCambio" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
            </table>
        </asp:Panel>
            <table width="100%" border="0px" 
                style="font-family: Arial, Helvetica, sans-serif; font-size: 18px;">
                <tr>
                    <td style="width:45%" rowspan="3" valign="top">
                        <table width="100%">
                            <tr>
                                <td colspan="2" valign="middle" >
                                    <table width="100%" border="0">
                                        <tr>
                                            <td style="width:30%">
                                                Cantidad : 
                                            </td>
                                            <td style="width:10%; text-align:right; ">
                                                <input id="Button37" type="button" value="-" onclick="return Button37_onclick()"
                                                style="font-size: 20px; width: 50px; height: 29px; font-style: inherit; font-weight: bold; font-family: Arial, Helvetica, sans-serif;" onclick="return Button37_onclick()" />
                                            </td>
                                            <td style="width:30%; text-align:center;">
                                                <table width="50%" border="0" style="text-align:center">
                                                    <tr>
                                                        <td align="center">
                                                            <telerik:RadNumericTextBox ID="cantidadProductoRNTB" runat="server" Font-Size="13pt" 
                                                            style="text-align: center; padding:0px;" Value="1" MaxValue="100" MinValue="0" 
                                                                ViewStateMode="Enabled" Height="30px" DataType="System.Int32">
                                                                <NegativeStyle Resize="None"></NegativeStyle>
                                                                <NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
                                                                <EmptyMessageStyle Resize="None"></EmptyMessageStyle>
                                                                <ReadOnlyStyle Resize="None"></ReadOnlyStyle>
                                                                <FocusedStyle Resize="None"></FocusedStyle>
                                                                <DisabledStyle Resize="None"></DisabledStyle>
                                                                <InvalidStyle Resize="None"></InvalidStyle>
                                                                <HoveredStyle Resize="None"></HoveredStyle>
                                                                <EnabledStyle Resize="None"></EnabledStyle>
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td style="width:10%; text-align:left; ">
                                                <input id="Button1" type="button" value="+" onclick="Button1_onclick()" 
                                                style="font-size: 20px; width: 50px; height: 29px; font-style: inherit; font-weight: bold; font-family: Arial, Helvetica, sans-serif;" />            
                                            </td>
                                            <td style="width:20%; text-align:right; ">
                                                <asp:CheckBox ID="incluidoCHB" runat="server" Text="Incluido" />            
                                            </td>
                                        </tr>
                                        
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                  <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="SDS_tablaTemp" Width="100%" 
                                        GridLines="None" CellSpacing="0" Culture="es-ES" ShowFooter="True">
                                        <ClientSettings>
                                            <Selecting CellSelectionMode="None" AllowRowSelect="True" />
                                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                        </ClientSettings>
                                        <MasterTableView AutoGenerateColumns="False" DataKeyNames="tablaTempId" 
                                            DataSourceID="SDS_tablaTemp" Name="productosX"
                                            NoMasterRecordsText="No Existen Productos en Lista." GridLines="None" >
                                            <DetailTables>
                                                <telerik:GridTableView runat="server" DataSourceID="SDS_terminoX" 
                                                    ShowHeader="False" Width="80%" NoDetailRecordsText="No hay Terminos." 
                                                    NoMasterRecordsText="No hay Terminos." 
                                                    Name="terminosX" 
                                                    ItemStyle-HorizontalAlign="Right" 
                                                    HorizontalAlign="Center" DataKeyNames="tablaTempTerminos" Dir="LTR" 
                                                    CommandItemSettings-AddNewRecordText="Nuevo" AutoGenerateColumns="False" 
                                                    CommandItemDisplay="Top" BorderColor="Black" BorderStyle="Solid" 
                                                    BorderWidth="1px" >
                                                    <ParentTableRelation>
                                                        <telerik:GridRelationFields DetailKeyField="tablaTempIdx" MasterKeyField="tablaTempId" />
                                                    </ParentTableRelation>

                                                    <CommandItemSettings ExportToPdfText="Export to PDF" 
                                                        AddNewRecordText="AGREGAR NUEVA OBSERVACION" RefreshText="Actualizar" 
                                                        ShowRefreshButton="False"></CommandItemSettings>
                                                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                                                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="tablaTempTerminos" DataType="System.Int32" 
                                                            HeaderText="tablaTempTerminos" SortExpression="tablaTempTerminos" 
                                                            UniqueName="tablaTempTerminos" Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn DataField="terminos" HeaderText="Terminos" 
                                                            SortExpression="terminos" UniqueName="terminos" Visible="true">
                                                            <HeaderStyle HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                                                            UniqueName="column" HeaderText="Elim.">
                                                            <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                    <EditFormSettings EditFormType="WebUserControl" UserControlName="frm_cargaTerminos.ascx">
                                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                        </EditColumn>
                                                    </EditFormSettings>
                                                    <ItemStyle HorizontalAlign="Right"></ItemStyle>
                                                    <AlternatingItemStyle HorizontalAlign="Right" VerticalAlign="Middle"></AlternatingItemStyle>
                                                    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                                    <FilterItemStyle HorizontalAlign="Right"></FilterItemStyle>
                                                </telerik:GridTableView>
                                            </DetailTables>
                                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                                            <ExpandCollapseColumn Visible="True" 
                                                FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                                            <Columns>
                                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"
                                                    UniqueName="column" HeaderText="Elim.">
                                                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridButtonColumn>
                                                <%--<telerik:GridEditCommandColumn ButtonType="ImageButton" CancelText="Cancelar" EditText="Editar"
                                                    FilterImageToolTip="Filtrar" InsertText="Insertar" HeaderText="Edita">
                                                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridEditCommandColumn>--%>
                                                <telerik:GridBoundColumn DataField="tablaTempId" DataType="System.Int32" 
                                                    HeaderText="tablaTempId" ReadOnly="True" SortExpression="tablaTempId" 
                                                    UniqueName="tablaTempId" Display="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="puntoVentaId" DataType="System.Int32" 
                                                    HeaderText="puntoVentaId" SortExpression="puntoVentaId" 
                                                    UniqueName="puntoVentaId" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="comandaID" DataType="System.Int32" 
                                                    HeaderText="comandaID" SortExpression="comandaID" UniqueName="comandaID" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <%--<telerik:GridBoundColumn DataField="silla" DataType="System.Decimal" 
                                                    HeaderText="Silla" SortExpression="silla" UniqueName="silla" 
                                                    DataFormatString="{0:F}">
                                                    <HeaderStyle HorizontalAlign="Center" Width="15%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <FooterStyle HorizontalAlign="Right" />
                                                </telerik:GridBoundColumn>--%>
                                                <%--<telerik:GridBoundColumn DataField="cantidad" DataType="System.Decimal" 
                                                    HeaderText="Cant." SortExpression="cantidad" UniqueName="cantidad1" 
                                                    DataFormatString="{0:F}">
                                                    <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridBoundColumn>--%>  
                                                <telerik:GridTemplateColumn DataField="silla" DataType="System.Int32" 
                                                    FilterControlAltText="Filter silla column" HeaderText="Silla" 
                                                    SortExpression="silla" UniqueName="silla">
                                                    <ItemTemplate>
                                                        <asp:TextBox ID="sillaTextBox" runat="server" style="text-align: center" 
                                                            Text='<%# Eval("silla", "{0:G}")%>' Width="35px"></asp:TextBox>
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn DataField="productoVenta" HeaderText="Producto" 
                                                    SortExpression="productoVenta" UniqueName="productoVenta">
                                                    <HeaderStyle HorizontalAlign="Center" Width="23%" />
                                                    <ItemStyle HorizontalAlign="Left" />
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="noMoneda" HeaderText="Mon." 
                                                    SortExpression="noMoneda" UniqueName="noMoneda" >
                                                    <HeaderStyle HorizontalAlign="Center" Width="7%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridBoundColumn>
                                                <%--<telerik:GridBoundColumn DataField="precio" DataType="System.Decimal" 
                                                    HeaderText="Precio" SortExpression="precio" UniqueName="precio" 
                                                    DataFormatString="{0:F}">
                                                    <HeaderStyle HorizontalAlign="Center" Width="7%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                    <FooterStyle HorizontalAlign="Right" />
                                                </telerik:GridBoundColumn>--%>
                                                <telerik:GridTemplateColumn DataField="precio" DataType="System.Decimal" 
                                                    FilterControlAltText="Filter precio column" HeaderText="Precio" 
                                                    SortExpression="precio" UniqueName="precio">
                                                    <ItemTemplate> 
                                                        <asp:Label ID="precioLabel" runat="server" 
                                                            Text='<%# Eval("precio", "{0:F}") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="60px" HorizontalAlign="Center" />
                                                    <ItemStyle HorizontalAlign="Right" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn DataField="cantidad" DataType="System.Decimal" 
                                                    FilterControlAltText="Filter cantidad1 column" HeaderText="Cant." 
                                                    SortExpression="cantidad" UniqueName="cantidad1">
                                                    <ItemTemplate>
                                                        <asp:Button ID="Button2" runat="server" Text="-" CommandName="RestaGrilla" 
                                                            style="font-weight: 700; font-style: italic" Width="10px" />
                                                        <asp:TextBox ID="cantidadTextBox" runat="server"
                                                            Text='<%# Eval("cantidad")%>' Width="35px" 
                                                            style="text-align: center"></asp:TextBox>
                                                        <%--, "{0:F}"--%>
                                                        <asp:Button ID="B_masCantG" runat="server" Text="+" CommandName="SumaGrilla" 
                                                            style="font-weight: 700" Width="10px"/>
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" Width="18%" />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridTemplateColumn>
                                                <%--<telerik:GridBoundColumn Aggregate="Sum" DataField="subTotal" DataType="System.Decimal" 
                                                    HeaderText="SubTotal" SortExpression="subTotal" UniqueName="subTotal"
                                                    DataFormatString="{0:F}" FooterText="Total: ">
                                                    <HeaderStyle HorizontalAlign="Right" Width="10%" />
                                                    <ItemStyle HorizontalAlign="Right" />
                                                    <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                                </telerik:GridBoundColumn>--%>
                                                <telerik:GridTemplateColumn Aggregate="Sum" DataField="subTotal" 
                                                    DataType="System.Decimal" FilterControlAltText="Filter subTotal column" 
                                                    FooterText="Total: " HeaderText="SubTotal" SortExpression="subTotal" 
                                                    UniqueName="subTotal">
                                                    <ItemTemplate>
                                                        <asp:Label ID="subTotalLabel" runat="server" 
                                                            Text='<%# Eval("subTotal", "{0:N}") %>'></asp:Label>
                                                    </ItemTemplate>
                                                    <HeaderStyle Width="60px" />
                                                    <ItemStyle HorizontalAlign="Right" />
                                                    <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridBoundColumn DataField="moneda" DataType="System.Int32" 
                                                    HeaderText="moneda" SortExpression="moneda" UniqueName="moneda" Visible="false">
                                                </telerik:GridBoundColumn>
                                                
                                                <telerik:GridBoundColumn DataField="Observacion" HeaderText="Observacion" 
                                                    SortExpression="Observacion" UniqueName="Observacion" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridBoundColumn DataField="ProductoID" DataType="System.Int32" 
                                                    HeaderText="ProductoID" SortExpression="ProductoID" UniqueName="ProductoID" Visible="false">
                                                </telerik:GridBoundColumn>
                                                <telerik:GridTemplateColumn FilterControlAltText="Filter Temp_Termino column" 
                                                    UniqueName="Temp_Termino" HeaderText="Term.">
                                                    <ItemTemplate>
                                                        <asp:Button ID="B_terminoGrilla" runat="server" commandname="Select" onclick="B_terminoGrilla_Click" 
                                                            Text="T" style="font-weight: 700; font-size: small;" />
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" Width="12%"  />
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridTemplateColumn>
                                                <telerik:GridTemplateColumn FilterControlAltText="Filter Temp_Termino column" 
                                                    UniqueName="Temp_Termino" HeaderText="Combo" Visible="false">
                                                    <ItemTemplate>
                                                        <asp:Button ID="B_ComboGrilla" runat="server" commandname="Select" 
                                                            Text="C" style="font-weight: 700; font-size: small;" 
                                                            onclick="B_ComboGrilla_Click" />
                                                    </ItemTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" Width="11%"/>
                                                    <ItemStyle HorizontalAlign="Center" />
                                                </telerik:GridTemplateColumn>
                                            </Columns>
                                            <EditFormSettings EditFormType="WebUserControl">
                                                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                                            </EditFormSettings>
                                            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                        </MasterTableView>
                                        <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                        <FilterMenu EnableImageSprites="False"></FilterMenu>
                                        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
                                    </telerik:RadGrid>

                                </td>
                            </tr>
                            <tr>
                                <td style="width:50%">
                                    <asp:Button ID="Button3" runat="server" 
                                        Text="ENVIAR COMANDA E IMPRIMIR PRE CUENTA" Height="50px" Width="100%" 
                                        CssClass="wrappp"/>                                    
                                </td>
                                <td style="width:50%">
                                    <asp:Button ID="aceptar_B" runat="server" Text="ENVIAR COMANDA" Height="50px" Width="100%"/>
                                </td>
                            </tr>
                            <tr>
                                <td style="width:50%">
                                    <asp:Button ID="cancelar_B" runat="server" Text="CANCELAR" Height="50px" Width="100%"/>                                   
                                </td>
                                <td style="width:50%">
                                    <asp:Button ID="mostrarOcultar_B" runat="server" Text="OCULTAR" Height="50px" Width="100%"/>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" valign="middle" >
                                    <table width="100%" border="0">
                                           <tr>
                                            <td style="width:30%">
                                                Silla : 
                                            </td>
                                            <td style="width:10%; text-align:right; ">
                                                <input id="restaSilla" type="button" value="-" 
                                                style="font-size: 20px; width: 50px; height: 29px; font-style: inherit; font-weight: bold; font-family: Arial, Helvetica, sans-serif;" onclick="return restaSilla_onclick()" />
                                            </td>
                                            <td style="width:30%; text-align:center;">
                                                <table width="50%" border="0">
                                                    <tr>
                                                        <td>
                                                            <telerik:RadNumericTextBox ID="sillaRNTB" runat="server" Font-Size="13pt" 
                                                                style="text-align: center; top: 0px; left: 0px;" Value="1" MaxValue="21" 
                                                                MinValue="1" DataType="System.Int32"  Height="30px">
                                                                <NumberFormat ZeroPattern="n" DecimalDigits="0"></NumberFormat>
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td style="width:10%; text-align:left; ">
                                                <input id="sumaSilla" type="button" value="+"  
                                                style="font-size: 20px; width: 50px; height: 29px; font-style: inherit; font-weight: bold; font-family: Arial, Helvetica, sans-serif;" onclick="return sumaSilla_onclick()" />            
                                            </td>
                                            <td style="width:20%; text-align:left; ">

                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="width:60%" id="tddinamico1" runat="server">
                        <table width="100%" 
                            style="font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 18px">
                            <tr>
                                <td style=" width:30%; text-align:left">
                                    <asp:Button ID="btnCargarTipos" 
                                        runat="server" Text="TIPOS" Width="150px" Height="40px" Font-Bold="True" />
                                </td>
                                <td style="text-align:left;">
                                    <asp:Label ID="lblTipos" runat="server" Text=""></asp:Label>
                                </td>
                                <td style="text-align:right;">
                                    
                                </td>
                                <td style=" width:30%; text-align:right">
                                    <asp:Button ID="btnMasVendidos" 
                                        runat="server" Text="MAS VENDIDOS" Width="150px" Height="40px" 
                                        Font-Bold="True" style="text-align: center" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>   
                <tr id="trdinamico1" runat="server">
                    <td>
                        <table width="100%" 
                            style="font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: 18px">
                            <tr>
                                <td style=" width:30%; text-align:left">
                                    <asp:Button ID="btnCargarClases" runat="server" Text="CLASES"  Width="150px" 
                                        Height="40px" Font-Bold="True" Font-Names="arial,helvetica,sans-serif" />
                                </td>
                                <td style="text-align:left;">
                                    <asp:Label ID="lblClases" runat="server" Text=""></asp:Label>
                                </td>
                                <td style="text-align:right;">
                                    <asp:Label ID="lblCombos" runat="server" ></asp:Label>
                                </td>
                                <td style=" width:30%; text-align:right">
                                    <asp:Button ID="btnCargarCombos" 
                                        runat="server" Text="COMBOS" Width="150px" Height="40px" 
                                        Font-Bold="True" style="text-align: center;" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="trdinamico2" runat="server">
                    <td>
                        <asp:Panel ID="Panel2" runat="server">
                            <table width="100%" style="height:100%;" border="0px">
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button7" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button8" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button9" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button10" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button11" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button12" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnTipo"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button13" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button14" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button15" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button16" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button17" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button18" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnClase"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button19" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button20" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button21" runat="server" Text="" Width="100%" 
                                            Height="70%" style="margin-right: 0px" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button22" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button23" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button24" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button25" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button26" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button27" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button28" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button29" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button30" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button31" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button32" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button33" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button34" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button35" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button36" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button37" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button38" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button39" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button40" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button41" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                    <td style="width:10%; ">
                                        <asp:Button ID="Button42" runat="server" Text="" Width="100%" 
                                            Height="70%" CssClass="btnProducto"/>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        
                    </td>
                </tr>
            </table>
            
        </center>
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:SqlDataSource ID="SDS_tablaTemp" runat="server" 
            SelectCommand="SELECT     tablaTempId, puntoVentaId, comandaID, 
            cast(cantidad as int) as cantidad, productoVenta, precio, 
            CASE when moneda = 1 THEN  'S/.' WHEN moneda = 2 THEN 'US $' end as noMoneda, 
            moneda, Observacion, ProductoID, 
            CAST((cantidad * precio) AS DECIMAL(18,2)) AS subTotal, 
            cast (silla as int) as silla
        FROM         dbo.TSW_tablaTemp
        WHERE     (puntoVentaId = @puntoVentaId1) AND (comandaID = @comandaID1)">
        <SelectParameters>
            <asp:QueryStringParameter Name="puntoVentaId1" QueryStringField="puntoVentaId" />
            <asp:QueryStringParameter Name="comandaID1" QueryStringField="comandaID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SDS_terminoX" runat="server" 
        SelectCommand="SELECT     terminos, tablaTempTerminos
                            FROM dbo.TSW_tablaTempTerminos 
                            WHERE (tablaTempId = @tablaTempIdx) 
                            ORDER BY tablaTempTerminos DESC">
        <SelectParameters>
            <asp:Parameter DefaultValue="0" Name="tablaTempIdx" />
        </SelectParameters>
    </asp:SqlDataSource>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" 
        RestoreOriginalRenderDelegate="False" 
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cantidadProductoRNTB" 
                        UpdatePanelCssClass="" />
                    <telerik:AjaxUpdatedControl ControlID="sillaRNTB" UpdatePanelCssClass="" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    </form>
</body>
</html>
