<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Form_RequerimientosWUCpopUP.aspx.vb" Inherits="SGHweb.Form_RequerimientosWUCpopUP" %>
<%@ OutputCache Location="None" VaryByParam="None" %>
<!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>
</head>
<body>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type ="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function CerrarVentana(indicador) {
            var oWnd = GetRadWindow();
            var oArg = new Object();
            oArg.indicador = indicador;
            oWnd.close(oArg);
        }  
    </script>
</telerik:RadCodeBlock>

    <form id="form1" runat="server">
        <div>
            <table cellpadding="0" cellspacing="0" border="0"
                style="border-right: #578533 1px solid; border-top: #578533 1px solid; border-left: #578533 1px solid; border-bottom: #578533 1px solid; width: 100%;" >
                <tr>
                    <td colspan="3" style="background-color: #cccccc; height: 5px;">
                    </td>
                </tr>
                <tr>
                    <td style="width: 5px; background-color: #cccccc; height: 227px;">
                    </td>
                    <td style="width: 500px; background-color: #ffffff; height: 227px;">
                        <table style="font-weight: bold; font-size: 9pt; color: black; width: 100%" border="0">
                            <tr>
                                <td align="center" colspan="4">
                                    <table cellpadding="0" cellspacing="0" border="0" width="100%"
                                    style="border-right: #578533 1px solid; border-top: #578533 1px solid; border-left: #578533 1px solid; border-bottom: #578533 1px solid; background-color: #63973a;" >
                                        <tr>
                                            <td colspan="3" style="background-color: gainsboro; height: 5px;">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="width: 5px; background-color: gainsboro">
                                            </td>
                                            <td style="background-color: beige;" align="center">
                                                <telerik:RadToolBar ID="RadToolBar2" runat="server" Skin="WebBlue" Width="100%">
                                                    <Items>
                                                        <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="9pt" ForeColor="White"
                                                            ImageUrl="~/SIG/Resources/Update_Popup.png" Text="Guardar" >
                                                        </telerik:RadToolBarButton>
                                                        <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="9pt" ForeColor="White"
                                                            ImageUrl="~/SIG/Resources/Update_Popup.png" Text="Actualizar" >
                                                        </telerik:RadToolBarButton>
                                                        <telerik:RadToolBarButton runat="server" Font-Names="Arial" Font-Size="9pt" ForeColor="White"
                                                            ImageUrl="~/SIG/Resources/Cancel_PopUp.png" Text="Cancelar" >
                                                        </telerik:RadToolBarButton>
                                                    </Items>
                                                </telerik:RadToolBar>
                                                <table border="0px" style="font-weight: bold; font-size: 9pt; color: #006699; font-family: Arial; Width:100%">
                                                    <tr>
                                                        <td align="right" style="width: 25%" >
                                                            <br />
                                                        </td>
                                                        <td align="right" style="width: 75%" colspan="3">
                                                            
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="middle" >
                                                            Familia :&nbsp;
                                                        </td>
                                                        <td style="text-align:left;" colspan="3">
                                                            <asp:DropDownList ID="familiaCB" runat="server" DataSourceID="SDS_familia" 
                                                                    DataTextField="NombreFamiliaArticulo" DataValueField="FamiliaArticuloId" 
                                                                AutoPostBack="True">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="middle" >
                                                            SubFamilia :&nbsp;
                                                        </td>
                                                        <td style="text-align:left;" colspan="3">
                                                            <asp:DropDownList ID="subfamiliaCB" runat="server" 
                                                                DataSourceID="SDS_subFamiliaByFamiliaArticul" DataTextField="NombreSubFamilia" 
                                                                DataValueField="SubFamiliaId" AutoPostBack="True">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="middle" >
                                                            Articulo :&nbsp;
                                                        </td>
                                                        <td style="text-align:left;" colspan="3">
                                                            <table width="100%" border="0px" style="text-align:left;">
                                                                <tr>
                                                                    <td style="width:50px">
                                                                        <asp:Panel ID="Panel1" runat="server">
                                                                            <asp:DropDownList ID="articuloCB" runat="server" 
                                                                                DataSourceID="SDS_ArticulosFamiliaSubFamiliaPedido" 
                                                                                DataTextField="NombreArticulo" DataValueField="ArticuloId" >
                                                                            </asp:DropDownList>
                                                                        </asp:Panel>
                                                                        <asp:Panel ID="Panel2" runat="server">
                                                                            <asp:DropDownList ID="articuloCBTodos" runat="server" 
                                                                                DataSourceID="SDS_ArticulosFamiliaSubFamiliaPedidoTodos" 
                                                                                DataTextField="NombreArticulo" DataValueField="ArticuloId" >
                                                                            </asp:DropDownList>
                                                                        </asp:Panel>
                                                                    </td>
                                                                    <td style="width:auto">
                                                                        <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" 
                                                                        Text=" Ver todos los articulos" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="middle">
                                                            Cantidad :&nbsp;
                                                        </td>
                                                        <td style="text-align:left;" colspan="3">
                                                            <telerik:RadNumericTextBox ID="cantidadRNTB" runat="server" Width="80px" 
                                                                DataType="System.Decimal" MaxValue="1000" MinValue="0">
                                                            </telerik:RadNumericTextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" valign="top" style="padding-top:3px">
                                                            Observacion :&nbsp;
                                                        </td>
                                                        <td style="text-align:left;" colspan="3">
                                                            <asp:TextBox ID="observacionTB" runat="server" Rows="5" TextMode="MultiLine" 
                                                                Width="95%">
                                                            </asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td align="right" style="width: 25%" >
                                                            <br />
                                                        </td>
                                                        <td align="right" style="width: 75%" colspan="3">
                                                            
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td style="width: 5px; background-color: gainsboro">
                                            </td>
                                        </tr>   
                                        <tr>
                                            <td colspan="3" style="background-color: gainsboro; height: 5px;">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td style="width: 5px; background-color: #cccccc; height: 227px;">
                    </td>
                </tr>
                <tr>
                    <td colspan="3" style="background-color: #cccccc; height: 5px;">
                    </td>
                </tr>
            </table>
            <asp:SqlDataSource ID="SDS_familia" runat="server" 
                SelectCommand="Select FamiliaArticuloId,NombreFamiliaArticulo From FamiliasArticulo Order By NombreFamiliaArticulo">
            </asp:SqlDataSource>
            
            <asp:SqlDataSource ID="SDS_subFamiliaByFamiliaArticul" runat="server" 
                SelectCommand="SWPRO_subFamiliaByFamiliaArticulo" 
                SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="familiaCB" DefaultValue="0" 
                        Name="FamiliaArticuloId" PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            
            <asp:SqlDataSource ID="SDS_ArticulosFamiliaSubFamiliaPedido" runat="server" 
                SelectCommand="SWPRO_ArticulosFamiliaSubFamiliaPedidos1" 
                SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:ControlParameter ControlID="familiaCB" DefaultValue="0" 
                        Name="FamiliaArticuloId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="subfamiliaCB" DefaultValue="0" 
                        Name="SubFamiliaId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="AreaID" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="Stock" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="AlmacenID" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="buscaTexto" Type="String" />
                    <asp:SessionParameter DefaultValue="0" Name="tipo" 
                        SessionField="tipoSWPRO_ArticulosFamiliaSubFamiliaPedidos" Type="Int32" />
                    <asp:SessionParameter DefaultValue="0" Name="ProductoID" 
                        SessionField="productoID_SWPRO_ArtiFamiSubFaPe" Type="String" />
                    <asp:SessionParameter DefaultValue="0" Name="cantidad" 
                        SessionField="cantidad_SWPRO_ArtiFamiSubFaPe" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>

            <asp:SqlDataSource ID="SDS_ArticulosFamiliaSubFamiliaPedidoTodos" runat="server" 
                SelectCommand="SWPRO_ArticulosFamiliaSubFamiliaPedidos" 
                SelectCommandType="StoredProcedure" >
                <SelectParameters>
                    <asp:ControlParameter ControlID="familiaCB" DefaultValue="0" 
                        Name="FamiliaArticuloId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:ControlParameter ControlID="subfamiliaCB" DefaultValue="0" 
                        Name="SubFamiliaId" PropertyName="SelectedValue" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="AreaID" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="Stock" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="AlmacenID" Type="Int32" />
                    <asp:Parameter DefaultValue="0" Name="buscaTexto" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>

            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="familiaCB">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="subfamiliaCB" UpdatePanelCssClass="" />
                            <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelCssClass="" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="subfamiliaCB">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelCssClass="" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="CheckBox1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="familiaCB" UpdatePanelCssClass="" />
                            <telerik:AjaxUpdatedControl ControlID="subfamiliaCB" UpdatePanelCssClass="" />
                            <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelCssClass="" />
                            <telerik:AjaxUpdatedControl ControlID="Panel2" UpdatePanelCssClass="" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManager>
        </div>
    </form>
</body>
</html>
