<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Afrm_GarantiasPopUp.aspx.vb" Inherits="SGHweb.Afrm_GarantiasPopUp" %>

<!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);
        }

        function validarFechas() {
            var desde = $find('<% =desdeRDP.ClientID %>');
            var hasta = $find('<% =hastaRDP.ClientID %>');
            var fecha_desde = desde.get_dateInput().get_selectedDate()
            hasta.set_minDate(fecha_desde);
        }  
    </script>
</telerik:RadCodeBlock>

    <form id="form1" runat="server">
        <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;" >
                <tr>
                    <td colspan="3" style="background-color: gainsboro; height: 5px;">
                    </td>
                </tr>
                <tr>
                    <td style="width: 5px; background-color: gainsboro">
                    </td>
                    <td 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" CausesValidation = "false">
                                </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: 15%" >
                                    <br />
                                </td>
                                <td align="right" style="width: 35%">
                                                            
                                </td>
                                <td align="right" style="width: 15%" >
                                    <br />
                                </td>
                                <td align="right" style="width: 35%" >
                                                            
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    Razon Comercial :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <asp:DropDownList ID="razonComercialCB" runat="server" Width="95%"
                                        DataSourceID="SDS_empresaCombo" DataTextField="razoncomercial" 
                                        DataValueField="empresaid" AutoPostBack="True" BackColor="#6297BC">
                                    </asp:DropDownList>    
                                </td>
                                <td align="right">
                                    Razon Social :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <asp:Label ID="razonSocialLB" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    Servicio :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <asp:DropDownList ID="servicioCB" runat="server" Width="95%" 
                                        DataSourceID="SqlDataSource1" DataTextField="Nombre" 
                                        DataValueField="ID" >
                                    </asp:DropDownList>    
                                </td>
                                <td align="right">
                                    Precio :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <telerik:RadNumericTextBox ID="precioRNTB" runat="server" Culture="es-PE" 
                                        DbValueFactor="1" MaxValue="500000" MinValue="0" Skin="Web20" 
                                        Width="95%" EmptyMessage="0.00" >
                                    </telerik:RadNumericTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    Desde :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <telerik:RadDatePicker ID="desdeRDP" runat="server" Culture="es-PE" 
                                        MinDate="2010-01-01" Width="95%" Skin="WebBlue">
                                        <ClientEvents OnDateSelected="validarFechas" />
                                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" Skin="WebBlue"></Calendar>
                                        <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" LabelWidth="40%"></DateInput>
                                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                    </telerik:RadDatePicker>
                                </td>
                                <td align="right">
                                    Moneda :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <asp:DropDownList ID="monedaCB" runat="server" DataSourceID="SDS_Moneda" 
                                        DataTextField="Nombre" DataValueField="monedaid"
                                        Width="95%" >
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    Hasta :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <telerik:RadDatePicker ID="hastaRDP" runat="server" Culture="es-PE" 
                                        MinDate="2010-01-01" Width="95%" Skin="WebBlue">
                                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" Skin="WebBlue"></Calendar>
                                        <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" LabelWidth="40%"></DateInput>
                                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                    </telerik:RadDatePicker>
                                </td>
                                <td align="right">
                                    Observaciones :&nbsp;
                                </td>
                                <td style="text-align:left;" rowspan="2">
                                    <asp:TextBox ID="observacionTB" runat="server" Rows="3" TextMode="MultiLine" 
                                        Width="95%"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    Nro. Contrato :&nbsp;
                                </td>
                                <td style="text-align:left;" >
                                    <asp:TextBox ID="nroContratoTB" runat="server" 
                                        Width="95%" Enabled="false">
                                    </asp:TextBox>
                                </td>
                                <td align="right">
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <br />
                                </td>
                                <td align="right" >
                                                            
                                </td>
                                <td align="right">
                                    <br />
                                </td>
                                <td align="right" >
                                                            
                                </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>
            <table width="100%">
                <tr>
                    <td>
                        <asp:RequiredFieldValidator
                            ID="RequiredFieldValidator1" runat="server" ControlToValidate="razonComercialCB"  
                            ErrorMessage="Seleccione la Razon Comercial ::" Display="None" >
                        </asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator
                            ID="RequiredFieldValidator2" runat="server" ControlToValidate="desdeRDP" 
                            ErrorMessage="Ingrese Fecha de Desde ::" Display="None" >
                        </asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator
                            ID="RequiredFieldValidator3" runat="server" ControlToValidate="hastaRDP" 
                            ErrorMessage="Ingrese Fecha de Hasta ::" Display="None" >
                        </asp:RequiredFieldValidator>
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
                            ShowMessageBox="False" ShowSummary="True" ForeColor="#CC0000" />
                    </td>
                </tr>
            </table>
        <asp:SqlDataSource ID="SDS_empresaCombo" runat="server" 
            SelectCommand="sghP_EmpresasCombo" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="tipo" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            SelectCommand="sghP_selectServicio" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SDS_Moneda" runat="server" 
            SelectCommand="SELECT [monedaid], [Nombre] FROM [monedas]">
        </asp:SqlDataSource>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="razonComercialCB">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="razonSocialLB" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </form>
</body>
</html>