<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmCreditoHipotecario.aspx.cs" Culture="es-MX" Inherits="bajaWare.Credito.frmCreditoHipotecario" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../UserControl/Credito/wucCredHipotecsCredito.ascx" tagname="wucCredHipotecsCredito" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContenido" runat="server">
   <script language="javascript" type="text/javascript">
       function Validacion(Boton) {
        
       }
          
       
       function CambiaTab(sender, e) {
           var btn = document.getElementById("<%=btnGuardar.ClientID %>");
           var tab=0;
           //rfvUsername.ValidationGroup = "Demo"; 
           if (sender == "0" || sender == "1" || sender == "2")
            tab=parseInt(sender);
           else
               tab = parseInt(sender.get_activeTabIndex());

           switch (tab) {
               case 0:
                   btn.onclick = function () {
                       WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnGuardar", "", true, "Credito", "", false, false));
                   }
                   break;
               case 1:
                   btn.onclick = function () {
                       WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnGuardar", "", true, "Operaciones", "", false, false));
                   }
                   break;
               case 2:
                   btn.onclick = function () {
                       WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnGuardar", "", true, "MesaControl", "", false, false));
                   }
                   break;
           }



       }
   
</script>
   
        <table width="100%">
     
      <tr>
      <td>
            <table>
                <tr>
                    <td>
                        <asp:TabContainer ID="Tabs" OnClientActiveTabChanged="CambiaTab"   runat="server">
                            <asp:TabPanel runat="Server" ID="tabCredito"  TabIndex="0" HeaderText="Credito" Height="100px"
                                BackColor="Transparent">
                                <ContentTemplate>
                                   <uc1:wucCredHipotecsCredito ID="wucCredHipotecsCredito1" runat="server" />
                                </ContentTemplate>
                            </asp:TabPanel>
                            <asp:TabPanel runat="Server" ID="tabOperaciones" TabIndex="1" HeaderText="Operaciones" Height="400px" Width="500"
                                BackColor="Transparent">
                                <ContentTemplate>
                                    <table>

                                            <tr>
                                             <td class="th">
                                                Entidad Seguro
                                            </td>
                                            <td>
                                               <asp:DropDownList runat="server" ID="ddlEntidadSeguro" />
                                                             <asp:RequiredFieldValidator ID="rfv_EntidadSeguro" ValidationGroup="Operaciones" runat="server" 
            ErrorMessage="Entidad Seguro Obligatorio" InitialValue="0" 
            ControlToValidate="ddlEntidadSeguro" Display="None"></asp:RequiredFieldValidator>
        <asp:ValidatorCalloutExtender ID="vce_EntidadSeguro" runat="server" Enabled="True"
            TargetControlID="rfv_EntidadSeguro">
        </asp:ValidatorCalloutExtender>
                                          
                                       </td><td colspan="2"></td>
                                          <%--            <td class="th">
                                                Porcentaje Asegurado
                                            </td>
                                            <td>
                                               <asp:TextBox ID="txtPorcentajeAsegurado" runat="server"></asp:TextBox>
                                          
                               <asp:FilteredTextBoxExtender ValidChars="."  FilterType="Custom,Numbers" runat="server" ID="fte_Porcentaje" TargetControlID="txtPorcentajeAsegurado">
            </asp:FilteredTextBoxExtender>
            <asp:RegularExpressionValidator ID="reValPorcentaje"   runat="server" ValidationGroup="Operaciones" ErrorMessage="El porcentaje no es correcto"  ControlToValidate="txtPorcentajeAsegurado" ValidationExpression="^100$|^\d{0,2}(\.\d{1,7})? *%?$"></asp:RegularExpressionValidator>
                <asp:ValidatorCalloutExtender ID="vce_Porcentaje" runat="server"
                Enabled="True"   TargetControlID="reValPorcentaje" />

                            <asp:RequiredFieldValidator ID="rfv_txtPorcentaje" InitialValue="" Display="None" ValidationGroup="Operaciones" ControlToValidate="txtPorcentajeAsegurado" runat="server" ErrorMessage="El porcentaje es un valor requerido"></asp:RequiredFieldValidator>
                             <asp:ValidatorCalloutExtender ID="vce_Porcentaje2" runat="server"
                Enabled="True"   TargetControlID="rfv_txtPorcentaje" />
                            <asp:RangeValidator ID="rgv_txtPorcentaje" runat="server" MinimumValue="1" MaximumValue="100" ControlToValidate="txtPorcentajeAsegurado" ValidationGroup="Operaciones" ErrorMessage="El porcentaje no es correcto"></asp:RangeValidator>
                             <asp:ValidatorCalloutExtender ID="vce_txtPorcentaje3" runat="server"
                Enabled="True"   TargetControlID="rgv_txtPorcentaje" />
                                            </td>--%>

                                        </tr>
                                        <tr>
                                                                    
                                                 <td class="th">
                                                Seguro Cargo Cliente
                                            </td>
                                            <td>
                                              <asp:CheckBox ValidationGroup="" runat="server" ID="chkSeguroCargoCliente" />
                                          
                                            </td>
                                            <td>
                                            </td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:TabPanel>
                              <asp:TabPanel runat="Server" ID="tabMesaControl" TabIndex="2" HeaderText="Mesa Control" Height="400px" Width="500"
                                BackColor="Transparent">
                                <ContentTemplate>
                                    <table>
                                        <tr>
                                             <tr>
                                                                    
                                                 <td class="th">
                                               Covenio
                                            </td>
                                            <td>
                                              <asp:CheckBox ValidationGroup="MesaControl" runat="server" ID="chkConvenio" />
                                              <asp:DropDownList ID="ddlVali" style="display:none" ValidationGroup="MesaControl" runat="server" >
                                              <asp:ListItem Text="0" Value="2">
                                              
                                              </asp:ListItem>
                                              </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="rfv_MesaControl" InitialValue="0" runat="server" ErrorMessage="Tasa de Comisiones Obligatorio"
                                                    ControlToValidate="ddlVali" ValidationGroup="MesaControl" Display="None"></asp:RequiredFieldValidator>
                                                <asp:ValidatorCalloutExtender ID="vce_MesaControl" runat="server" Enabled="True" TargetControlID="rfv_MesaControl">
                                                </asp:ValidatorCalloutExtender>
                                            </td>
                                          
                                        </tr>
                                          
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:TabPanel>
                        </asp:TabContainer>
                    </td>
                </tr>
               
            </table>
            </td>
           
            </tr>
             <tr>
                    <td align="center">
                              <asp:UpdatePanel ID="upd_general" runat="server">
        <ContentTemplate>
                        <asp:Button ID="btnGuardar" CssClass="Boton" ValidationGroup="Credito" runat="server" Text="Guardar" OnClientClick="Validacion(this);" OnClick="btnGuardar_Click" />
                         </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnGuardar" EventName="Click" />
        </Triggers>
       
    </asp:UpdatePanel>
                    </td>
                </tr>
                <tr align="center">
      <td> <asp:Button ID="btnAtras" CssClass="Boton" Text="Atras"
              runat="server" onclick="btnAtras_Click" /></td>
      </tr>

            </table>
   
           
       
    
</asp:Content>
