Commit inicial Ventas Productivo

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-14 16:40:54 -07:00
commit c35cf91883
13328 changed files with 3711549 additions and 0 deletions

View File

@@ -0,0 +1,662 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudes.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudes" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Prospectos"></asp:Literal>&nbsp;<asp:Literal ID="LtlProspectos" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<style type="text/css">
.CaracteristicaPrincipal {
font-size: 14px;
color: #fff;
background-color: gray;
}
</style>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top: 20px;">
<tr>
<td align="left">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Información General">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<div>
<fieldset>
<legend><b>Datos Generales</b></legend>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>
<asp:TextBox ID="TxtCveProspecto" runat="server" MaxLength="12" Width="200px" Enabled="false" Visible="false"></asp:TextBox></td>
</tr>
<tr>
<td>Apellido Paterno:</td>
<td>
<asp:TextBox ID="TxtApellidoPaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVApellidoPaterno" runat="server" ControlToValidate="TxtApellidoPaterno" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApellidoPaterno" runat="server" HighlightCssClass="vco" TargetControlID="RFVApellidoPaterno" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>Apellido Materno: </td>
<td>
<asp:TextBox ID="TxtApellidoMaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVApellidoMaterno" runat="server" ControlToValidate="TxtApellidoMaterno" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Materno ''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApellidoMaterno" runat="server" HighlightCssClass="vco" TargetControlID="RFVApellidoMaterno" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>Nombre(s):</td>
<td>
<asp:TextBox ID="TxtNombres" runat="server" MaxLength="12" Width="200px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVNombres" runat="server" ControlToValidate="TxtNombres" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombres''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombres" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombres" Width="300px">
</ajax:ValidatorCalloutExtender>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>Lugar Nacimiento</td>
<td>
<asp:TextBox ID="TxtLugarNacimiento" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td>Fecha Nacimiento</td>
<td>
<asp:TextBox ID="TxtFechaNacimiento" runat="server" MaxLength="12" Width="100px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="ImgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaNacimiento" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaNacimiento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaNacimiento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>RFC</td>
<td>
<asp:TextBox ID="TxtRFC" runat="server" MaxLength="13" Width="150px"></asp:TextBox></td>
<td>Nacionalidad</td>
<td>
<asp:TextBox ID="TxtNacionalidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Sexo</td>
<td>
<asp:DropDownList ID="DdlSexo" Width="50px" runat="server">
<asp:ListItem Text="Femenino" Value="0"></asp:ListItem>
<asp:ListItem Text="Masculino" Value="1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Domicilio Particular</b></legend>
<table border="0">
<tr>
<td>Calle: </td>
<td>
<asp:TextBox ID="TxtCalle" runat="server" MaxLength="100" Width="200px"></asp:TextBox></td>
<td>Número: </td>
<td>
<asp:TextBox ID="TxtNumero" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
<td>No. Interior</td>
<td>
<asp:TextBox ID="TxtNumeroInterior" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Colonia: </td>
<td>
<asp:TextBox ID="TxtColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Código Postal: </td>
<td>
<asp:TextBox ID="TxtCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FTBECodigoPostal" runat="server" TargetControlID="TxtCodigoPostal" FilterType="Numbers" />
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>País: </td>
<td>
<asp:UpdatePanel ID="UPPPaises" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlPaises" DataTextField="Pais" DataValueField="CvePais" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Estado: </td>
<td>
<asp:UpdatePanel ID="UPPEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio:</td>
<td>
<asp:UpdatePanel ID="UPPMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>Teléfono: </td>
<td>
<asp:TextBox ID="TxtTelefono" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Fax: </td>
<td>
<asp:TextBox ID="TxtFax" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Correo: </td>
<td>
<asp:TextBox ID="TxtCorreo" runat="server" MaxLength="100" Width="200px"></asp:TextBox></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Datos de la Empresa o Institución</b></legend>
<table border="0">
<tr>
<td>Nombre</td>
<td colspan="3">
<asp:TextBox ID="TxtEmpresaNombre" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>Giro</td>
<td>
<asp:TextBox ID="TxtEmpresaGiro" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Sector</td>
<td>
<asp:TextBox ID="TxtEmpresaSector" runat="server" MaxLength="1" Width="200px"></asp:TextBox></td>
<td>Página</td>
<td>
<asp:TextBox ID="TxtEmpresaPagina" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Calle</td>
<td>
<asp:TextBox ID="TxtEmpresaCalle" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Número</td>
<td>
<asp:TextBox ID="TxtEmpresaNumero" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Colonia</td>
<td>
<asp:TextBox ID="TxtEmpresaColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>CódigoPostal</td>
<td>
<asp:TextBox ID="TxtEmpresaCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FTBEEmpresaCodigoPostal" runat="server" TargetControlID="TxtEmpresaCodigoPostal" FilterType="Numbers" />
</td>
</tr>
<tr>
<td>País</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaPaises" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaPaises" DataTextField="Pais" DataValueField="CvePais" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Estado</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>Teléfono</td>
<td>
<asp:TextBox ID="TxtEmpresaTelefono" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Fax</td>
<td>
<asp:TextBox ID="TxtEmpresaFax" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Correo</td>
<td>
<asp:TextBox ID="TxtEmpresaCorreo" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Puesto</td>
<td>
<asp:TextBox ID="TxtEmpresaPuesto" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Especialidad</td>
<td>
<asp:TextBox ID="TxtEmpresaEspecialidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Envío de Correspondencia</b></legend>
<table border="0">
<tr>
<td>EnvioCorrespondencia</td>
<td>
<asp:CheckBox ID="ChkEnvioCorrespondencia" runat="server" /></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Datos Fiscales</b></legend>
<table border="0">
<tr>
<td>Razón Social</td>
<td>
<asp:TextBox ID="TxtFiscalRazonSocial" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>RFC</td>
<td>
<asp:TextBox ID="TxtFiscalRFC" runat="server" MaxLength="13" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Domicilio</td>
<td>
<asp:TextBox ID="TxtFiscalDomicilio" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>Colonia</td>
<td>
<asp:TextBox ID="TxtFiscalColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Código Postal</td>
<td>
<asp:TextBox ID="TxtFiscalCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="ftbeFiscalCodigoPostal" runat="server" TargetControlID="TxtFiscalCodigoPostal" FilterType="Numbers" />
</td>
</tr>
<tr>
<td>Estado</td>
<td>
<asp:UpdatePanel ID="UPPFiscalEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlFiscalEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio</td>
<td>
<asp:UpdatePanel ID="UPPFiscalMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlFiscalMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabCarac" runat="server" HeaderText="Escolaridad">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<asp:GridView ID="GvClasificaciones" runat="server" ShowHeader="false" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion" EmptyDataText="No se encontraron Clasificaciones de Caracteristicas Registradas" ToolTip="Listado de Clasificaciones de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Label Font-Bold="true" Width="100%" ID="LblClasificacion" runat="server" Text='<%# Eval("CaracteristicaClasificacion")%>'></asp:Label>
<asp:GridView ID="GvTiposCaracteristicas" ShowHeader="false" OnRowDataBound="GvTiposCaracteristicas_RowDataBound" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaTipo" EmptyDataText="No se encontraron Tipos de Caracteristicas Registrados" ToolTip="Listado de Tipos de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label Font-Bold="true" Width="100%" ID="LblTipoCaracteristica" runat="server" Text='<%# Eval("CaracteristicaTipo")%>'></asp:Label>
<asp:GridView ID="GvCaracteristicas" ShowHeader="false" OnRowDataBound="GvCaracteristicas_RowDataBound" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristica" EmptyDataText="No se encontraron Caracteristicas Registrados" ToolTip="Listado de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica")%>' Width="200px"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:TextBox ID="TxtValor" Visible="false" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpEditGuardarCl" Width="400px"></asp:TextBox>
<asp:ImageButton runat="server" ID="ImgTxtValor" Visible="false" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEETxtValor" Enabled="false" runat="server" TargetControlID="TxtValor" Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtValor" TargetControlID="TxtValor" PopupButtonID="ImgTxtValor" PopupPosition="BottomRight" Enabled="False"></ajax:CalendarExtender>
<asp:DropDownList ID="DdlOpcion" Visible="false" runat="server" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion"></asp:DropDownList>
<asp:RadioButtonList ID="RbOpcion" Visible="false" RepeatDirection="Horizontal" runat="server" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion" ValidationGroup="GrpGuardar"></asp:RadioButtonList>
<asp:RequiredFieldValidator ID="RFVRbOpcion" runat="server" ControlToValidate="RbOpcion" Display="None" ErrorMessage="&lt;b&gt;&lt;span style='text-decoration: underline'&gt;ERROR:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;El campo &lt;b&gt;'' ''&lt;/b&gt; es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCORbOpcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRbOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:HiddenField ID="HdnEsOpcion" runat="server" Value='<%# Eval("EsOpcion")%>' />
<asp:HiddenField ID="HdnCveCaracteristica" runat="server" Value='<%# Eval("CveCaracteristica")%>' />
<asp:HiddenField ID="HdnCveValor" runat="server" Value="-1" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td>
<div>
<fieldset>
<legend><b>Plan de Beneficio por Defunción</b></legend>
<table>
<tr>
<td align="center">BENEFICIARIOS</td>
<td align="center">%</td>
<td align="center">PARENTESCO</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia1" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia1" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje1" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje1" runat="server" ControlToValidate="TxtPorcentaje1" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje1" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje1" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco1" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia2" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia2" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje2" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje2" runat="server" ControlToValidate="TxtPorcentaje2" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje2" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje2" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco2" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia3" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia3" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje3" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje3" runat="server" ControlToValidate="TxtPorcentaje3" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje3" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje3" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco3" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia4" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia4" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje4" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje4" runat="server" ControlToValidate="TxtPorcentaje4" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje4" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje4" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco4" runat="server" Width="150px"></asp:TextBox></td>
</tr>
</table>
<table>
<tr>
<td width="300px" align="center">A FALTA DE BENEFICIARIO, SE NOMBRA SUSTITUTO</td>
<td width="250px" align="center">PARA MENOR DE EDAD NOMBRAR UN TUTOR</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto1" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto1" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto1" runat="server" Width="250px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto2" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto2" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto2" runat="server" Width="250px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto3" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto3" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto3" runat="server" Width="250px"></asp:TextBox></td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabProspectosSolicitudes" runat="server" HeaderText="Solicitudes">
<ContentTemplate>
<div class="cheader">
<asp:Panel ID="Panel0" runat="server">
<asp:ImageButton ID="ImgPanel0" CssClass="ImgPanel" ImageUrl="~/Imagenes/plusicon.png" runat="server" /><h2>Nueva Solicitud</h2>
</asp:Panel>
</div>
<div class="TextoPanel">
<asp:Panel ID="Panel" runat="server">
<asp:UpdatePanel ID="UpAgregarSolicitud" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0">
<tr>
<td colspan="3">
<div>
<fieldset>
<legend><b>Solicitudes</b></legend>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>Solicitud:</td>
<td>
<asp:TextBox ID="TxtSolicitud" runat="server" MaxLength="100" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVSolicitud" runat="server" ControlToValidate="TxtSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitud" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Tipo de Solicitud: </td>
<td>
<asp:DropDownList ID="DdlApoyoTipo" DataTextField="ApoyoTipo" DataValueField="CveApoyoTipo" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>(*)
<asp:RequiredFieldValidator ID="RFVApoyoTipo" runat="server" ControlToValidate="DdlApoyoTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Apoyo''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApoyoTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVApoyoTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Descripción: </td>
<td>
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Width="300px" Height="50px" TextMode="MultiLine"></asp:TextBox>(*)</td>
</tr>
<tr>
<td>Tipo: </td>
<td>
<asp:DropDownList ID="DdlSolicitudTipo" DataTextField="SolicitudTipo" DataValueField="CveSolicitudTipo" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="DdlSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Estatus: </td>
<td>
<asp:DropDownList ID="DdlSolicitudEstatus" DataTextField="SolicitudEstatus" DataValueField="CveSolicitudEstatus" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="DdlSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus de Solicitud''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="BtnAgregarSolicitud" runat="server" Text="Agregar" ValidationGroup="GrpAgregar" />
<asp:ValidationSummary ID="VS1" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpAgregar" />
</td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div>
<ajax:CollapsiblePanelExtender ID="CPESolicitud" ClientIDMode="Static" runat="server" SuppressPostBack="true" ExpandedImage="~/Imagenes/minusicon.png" TargetControlID="Panel" CollapseControlID="Panel0" ExpandControlID="Panel0" CollapsedImage="~/Imagenes/plusicon.png" Collapsed="true" ImageControlID="ImgPanel0"></ajax:CollapsiblePanelExtender>
<table border="0" class="contenido">
<tr>
<td>
<asp:UpdatePanel ID="UpSolicitudes" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<asp:GridView ID="GvSolicitudes" runat="server" AutoGenerateColumns="False" DataKeyNames="CveProspectoSolicitud" EmptyDataText="No se encontraron Solicitudes Registradas" ToolTip="Listado de Solicitudes">
<Columns>
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:TemplateField ItemStyle-Width="25px" HeaderText="Apoyo">
<HeaderTemplate>Solicitud</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LnkSolicitud" CssClass="Texto" runat="server" Text=' <%# Eval("Solicitud")%>' CommandArgument='<%# Eval("CveProspectoSolicitud")%>' CommandName="Carga"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="SolicitudTipo" HeaderText="Tipo de Solicitud" />
<asp:BoundField DataField="SolicitudEstatus" HeaderText="Estatus" />
<asp:TemplateField ItemStyle-Width="25px" HeaderText="Apoyo">
<ItemTemplate>
<asp:ImageButton runat="server" ID="ImgFlag" ImageUrl="/Imagenes/flag_red.png" ToolTip="Apoyos" CommandArgument='<%# Eval("CveProspectoSolicitud")%>' CommandName="CargaApoyoSolicitud"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto"></RowStyle>
<HeaderStyle CssClass="Titulos"></HeaderStyle>
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
<SelectedRowStyle CssClass="tabla_seleccionado"></SelectedRowStyle>
</asp:GridView>
</td>
<td style="vertical-align: top;"><br/>
<asp:Panel ID="PnlApoyos" Visible="False" runat="server">
<table border="0" class="contenido">
<tr>
<td>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="tabla_seleccionado">
<th colspan="5" scope="col">
<asp:Label ID="LblTituloApoyo" runat="server" Text=""></asp:Label></th>
</tr>
<tr class="Titulos">
<th scope="col" style="width:45px;">Cantidad</th><th scope="col" style="width:200px;">Apoyo</th><th scope="col" style="width:65px;">Importe</th>
<th scope="col" style="width:55px;"></th>
</tr>
<tr>
<td><asp:TextBox ID="TxtCantidad" runat="server" Width="40px" Text=""></asp:TextBox></td>
<td><asp:DropDownList ID="DdlProspectoApoyo" Width="194px" DataTextField="ProspectoApoyo" DataValueField="CveProspectoApoyo" runat="server"></asp:DropDownList></td>
<td><asp:TextBox ID="TxtImporte" Width="60px" runat="server"></asp:TextBox></td>
<td>
<asp:LinkButton ID="LnkApoyoAgregar" CssClass="Texto" runat="server" Text="Agregar" /></td>
</tr>
</table>
<asp:UpdatePanel ID="UppApoyos" runat="server" UpdateMode="Conditional" RenderMode="Inline" >
<ContentTemplate>
<asp:GridView ID="GvApoyos" runat="server" Width="365px" ShowHeader="False" AutoGenerateColumns="False" DataKeyNames="CveProspectoApoyo" EmptyDataText="" ToolTip="Listado de Solicitudes">
<Columns>
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-Width="45px" />
<asp:BoundField DataField="ProspectoApoyo" HeaderText="Apoyo" ItemStyle-Width="200px" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-Width="65px" />
<asp:TemplateField HeaderText="" ItemStyle-Width="55px" >
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return confirm('¿Está seguro que desea eliminar el Apoyo?');" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto"></RowStyle>
<HeaderStyle CssClass="Titulos"></HeaderStyle>
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="center">
<br />
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="False" />
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Prospectos/CatProspectos.aspx';return false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
</ContentTemplate>
</asp:UpdatePanel>
<br />
</td>
</tr>
</table>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td>
<img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,662 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudes.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudes" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Prospectos"></asp:Literal>&nbsp;<asp:Literal ID="LtlProspectos" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<style type="text/css">
.CaracteristicaPrincipal {
font-size: 14px;
color: #fff;
background-color: gray;
}
</style>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top: 20px;">
<tr>
<td align="left">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Información General">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<div>
<fieldset>
<legend><b>Datos Generales</b></legend>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>
<asp:TextBox ID="TxtCveProspecto" runat="server" MaxLength="12" Width="200px" Enabled="false" Visible="false"></asp:TextBox></td>
</tr>
<tr>
<td>Apellido Paterno:</td>
<td>
<asp:TextBox ID="TxtApellidoPaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVApellidoPaterno" runat="server" ControlToValidate="TxtApellidoPaterno" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApellidoPaterno" runat="server" HighlightCssClass="vco" TargetControlID="RFVApellidoPaterno" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>Apellido Materno: </td>
<td>
<asp:TextBox ID="TxtApellidoMaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVApellidoMaterno" runat="server" ControlToValidate="TxtApellidoMaterno" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Materno ''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApellidoMaterno" runat="server" HighlightCssClass="vco" TargetControlID="RFVApellidoMaterno" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>Nombre(s):</td>
<td>
<asp:TextBox ID="TxtNombres" runat="server" MaxLength="12" Width="200px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVNombres" runat="server" ControlToValidate="TxtNombres" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombres''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombres" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombres" Width="300px">
</ajax:ValidatorCalloutExtender>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>Lugar Nacimiento</td>
<td>
<asp:TextBox ID="TxtLugarNacimiento" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td>Fecha Nacimiento</td>
<td>
<asp:TextBox ID="TxtFechaNacimiento" runat="server" MaxLength="12" Width="100px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="ImgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaNacimiento" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaNacimiento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaNacimiento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>RFC</td>
<td>
<asp:TextBox ID="TxtRFC" runat="server" MaxLength="13" Width="150px"></asp:TextBox></td>
<td>Nacionalidad</td>
<td>
<asp:TextBox ID="TxtNacionalidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Sexo</td>
<td>
<asp:DropDownList ID="DdlSexo" Width="50px" runat="server">
<asp:ListItem Text="Femenino" Value="0"></asp:ListItem>
<asp:ListItem Text="Masculino" Value="1"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Domicilio Particular</b></legend>
<table border="0">
<tr>
<td>Calle: </td>
<td>
<asp:TextBox ID="TxtCalle" runat="server" MaxLength="100" Width="200px"></asp:TextBox></td>
<td>Número: </td>
<td>
<asp:TextBox ID="TxtNumero" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
<td>No. Interior</td>
<td>
<asp:TextBox ID="TxtNumeroInterior" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Colonia: </td>
<td>
<asp:TextBox ID="TxtColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Código Postal: </td>
<td>
<asp:TextBox ID="TxtCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FTBECodigoPostal" runat="server" TargetControlID="TxtCodigoPostal" FilterType="Numbers" />
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>País: </td>
<td>
<asp:UpdatePanel ID="UPPPaises" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlPaises" DataTextField="Pais" DataValueField="CvePais" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Estado: </td>
<td>
<asp:UpdatePanel ID="UPPEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio:</td>
<td>
<asp:UpdatePanel ID="UPPMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>Teléfono: </td>
<td>
<asp:TextBox ID="TxtTelefono" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Fax: </td>
<td>
<asp:TextBox ID="TxtFax" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Correo: </td>
<td>
<asp:TextBox ID="TxtCorreo" runat="server" MaxLength="100" Width="200px"></asp:TextBox></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Datos de la Empresa o Institución</b></legend>
<table border="0">
<tr>
<td>Nombre</td>
<td colspan="3">
<asp:TextBox ID="TxtEmpresaNombre" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>Giro</td>
<td>
<asp:TextBox ID="TxtEmpresaGiro" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Sector</td>
<td>
<asp:TextBox ID="TxtEmpresaSector" runat="server" MaxLength="1" Width="200px"></asp:TextBox></td>
<td>Página</td>
<td>
<asp:TextBox ID="TxtEmpresaPagina" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Calle</td>
<td>
<asp:TextBox ID="TxtEmpresaCalle" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Número</td>
<td>
<asp:TextBox ID="TxtEmpresaNumero" runat="server" MaxLength="10" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Colonia</td>
<td>
<asp:TextBox ID="TxtEmpresaColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>CódigoPostal</td>
<td>
<asp:TextBox ID="TxtEmpresaCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox><ajax:FilteredTextBoxExtender ID="FTBEEmpresaCodigoPostal" runat="server" TargetControlID="TxtEmpresaCodigoPostal" FilterType="Numbers" />
</td>
</tr>
<tr>
<td>País</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaPaises" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaPaises" DataTextField="Pais" DataValueField="CvePais" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Estado</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td>Teléfono</td>
<td>
<asp:TextBox ID="TxtEmpresaTelefono" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Fax</td>
<td>
<asp:TextBox ID="TxtEmpresaFax" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Correo</td>
<td>
<asp:TextBox ID="TxtEmpresaCorreo" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Puesto</td>
<td>
<asp:TextBox ID="TxtEmpresaPuesto" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td>Especialidad</td>
<td>
<asp:TextBox ID="TxtEmpresaEspecialidad" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
<td></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Envío de Correspondencia</b></legend>
<table border="0">
<tr>
<td>EnvioCorrespondencia</td>
<td>
<asp:CheckBox ID="ChkEnvioCorrespondencia" runat="server" /></td>
</tr>
</table>
</fieldset>
<br />
<fieldset>
<legend><b>Datos Fiscales</b></legend>
<table border="0">
<tr>
<td>Razón Social</td>
<td>
<asp:TextBox ID="TxtFiscalRazonSocial" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>RFC</td>
<td>
<asp:TextBox ID="TxtFiscalRFC" runat="server" MaxLength="13" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Domicilio</td>
<td>
<asp:TextBox ID="TxtFiscalDomicilio" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>Colonia</td>
<td>
<asp:TextBox ID="TxtFiscalColonia" runat="server" MaxLength="50" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td>Código Postal</td>
<td>
<asp:TextBox ID="TxtFiscalCodigoPostal" runat="server" MaxLength="5" Width="200px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="ftbeFiscalCodigoPostal" runat="server" TargetControlID="TxtFiscalCodigoPostal" FilterType="Numbers" />
</td>
</tr>
<tr>
<td>Estado</td>
<td>
<asp:UpdatePanel ID="UPPFiscalEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlFiscalEstados" DataTextField="Estado" DataValueField="CveEstado" idth="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>Municipio</td>
<td>
<asp:UpdatePanel ID="UPPFiscalMunicipios" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlFiscalMunicipios" DataTextField="Municipio" DataValueField="CveMunicipio" Width="200px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabCarac" runat="server" HeaderText="Escolaridad">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<asp:GridView ID="GvClasificaciones" runat="server" ShowHeader="false" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion" EmptyDataText="No se encontraron Clasificaciones de Caracteristicas Registradas" ToolTip="Listado de Clasificaciones de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Label Font-Bold="true" Width="100%" ID="LblClasificacion" runat="server" Text='<%# Eval("CaracteristicaClasificacion")%>'></asp:Label>
<asp:GridView ID="GvTiposCaracteristicas" ShowHeader="false" OnRowDataBound="GvTiposCaracteristicas_RowDataBound" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaTipo" EmptyDataText="No se encontraron Tipos de Caracteristicas Registrados" ToolTip="Listado de Tipos de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label Font-Bold="true" Width="100%" ID="LblTipoCaracteristica" runat="server" Text='<%# Eval("CaracteristicaTipo")%>'></asp:Label>
<asp:GridView ID="GvCaracteristicas" ShowHeader="false" OnRowDataBound="GvCaracteristicas_RowDataBound" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristica" EmptyDataText="No se encontraron Caracteristicas Registrados" ToolTip="Listado de Caracteristicas">
<Columns>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica")%>' Width="200px"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle BorderStyle="None" />
<ItemTemplate>
<asp:TextBox ID="TxtValor" Visible="false" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpEditGuardarCl" Width="400px"></asp:TextBox>
<asp:ImageButton runat="server" ID="ImgTxtValor" Visible="false" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEETxtValor" Enabled="false" runat="server" TargetControlID="TxtValor" Mask="99/99/9999" MaskType="Date" UserDateFormat="DayMonthYear" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CETxtValor" TargetControlID="TxtValor" PopupButtonID="ImgTxtValor" PopupPosition="BottomRight" Enabled="False"></ajax:CalendarExtender>
<asp:DropDownList ID="DdlOpcion" Visible="false" runat="server" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion"></asp:DropDownList>
<asp:RadioButtonList ID="RbOpcion" Visible="false" RepeatDirection="Horizontal" runat="server" DataValueField="CveCaracteristicaOpcion" DataTextField="CaracteristicaOpcion" ValidationGroup="GrpGuardar"></asp:RadioButtonList>
<asp:RequiredFieldValidator ID="RFVRbOpcion" runat="server" ControlToValidate="RbOpcion" Display="None" ErrorMessage="&lt;b&gt;&lt;span style='text-decoration: underline'&gt;ERROR:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;El campo &lt;b&gt;'' ''&lt;/b&gt; es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCORbOpcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVRbOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:HiddenField ID="HdnEsOpcion" runat="server" Value='<%# Eval("EsOpcion")%>' />
<asp:HiddenField ID="HdnCveCaracteristica" runat="server" Value='<%# Eval("CveCaracteristica")%>' />
<asp:HiddenField ID="HdnCveValor" runat="server" Value="-1" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td>
<div>
<fieldset>
<legend><b>Plan de Beneficio por Defunción</b></legend>
<table>
<tr>
<td align="center">BENEFICIARIOS</td>
<td align="center">%</td>
<td align="center">PARENTESCO</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia1" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia1" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje1" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje1" runat="server" ControlToValidate="TxtPorcentaje1" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje1" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje1" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco1" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia2" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia2" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje2" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje2" runat="server" ControlToValidate="TxtPorcentaje2" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje2" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje2" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco2" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia3" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia3" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje3" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje3" runat="server" ControlToValidate="TxtPorcentaje3" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje3" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje3" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco3" runat="server" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferencia4" runat="server" Width="345px"></asp:TextBox><asp:HiddenField ID="HdnCveReferencia4" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtPorcentaje4" Style="text-align: right" runat="server" Width="50px"></asp:TextBox>
<asp:CompareValidator ID="CVPorcentaje4" runat="server" ControlToValidate="TxtPorcentaje4" Display="None" ErrorMessage="El campo <b>''Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOPorcentaje4" runat="server" HighlightCssClass="vco" TargetControlID="CVPorcentaje4" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtParentesco4" runat="server" Width="150px"></asp:TextBox></td>
</tr>
</table>
<table>
<tr>
<td width="300px" align="center">A FALTA DE BENEFICIARIO, SE NOMBRA SUSTITUTO</td>
<td width="250px" align="center">PARA MENOR DE EDAD NOMBRAR UN TUTOR</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto1" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto1" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto1" runat="server" Width="250px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto2" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto2" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto2" runat="server" Width="250px"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtNombreReferenciaSustituto3" runat="server" Width="300px"></asp:TextBox><asp:HiddenField ID="HdnCveReferenciaSustituto3" runat="server" Value="-1" />
</td>
<td>
<asp:TextBox ID="TxtParentescoSustituto3" runat="server" Width="250px"></asp:TextBox></td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabProspectosSolicitudes" runat="server" HeaderText="Solicitudes">
<ContentTemplate>
<div class="cheader">
<asp:Panel ID="Panel0" runat="server">
<asp:ImageButton ID="ImgPanel0" CssClass="ImgPanel" ImageUrl="~/Imagenes/plusicon.png" runat="server" /><h2>Nueva Solicitud</h2>
</asp:Panel>
</div>
<div class="TextoPanel">
<asp:Panel ID="Panel" runat="server">
<asp:UpdatePanel ID="UpAgregarSolicitud" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0">
<tr>
<td colspan="3">
<div>
<fieldset>
<legend><b>Solicitudes</b></legend>
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>Solicitud:</td>
<td>
<asp:TextBox ID="TxtSolicitud" runat="server" MaxLength="100" Width="150px"></asp:TextBox>(*)
<asp:RequiredFieldValidator ID="RFVSolicitud" runat="server" ControlToValidate="TxtSolicitud" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitud" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitud" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Tipo de Solicitud: </td>
<td>
<asp:DropDownList ID="DdlApoyoTipo" DataTextField="ApoyoTipo" DataValueField="CveApoyoTipo" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>(*)
<asp:RequiredFieldValidator ID="RFVApoyoTipo" runat="server" ControlToValidate="DdlApoyoTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Apoyo''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEApoyoTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVApoyoTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Descripción: </td>
<td>
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="500" Width="300px" Height="50px" TextMode="MultiLine"></asp:TextBox>(*)</td>
</tr>
<tr>
<td>Tipo: </td>
<td>
<asp:DropDownList ID="DdlSolicitudTipo" DataTextField="SolicitudTipo" DataValueField="CveSolicitudTipo" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="DdlSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Estatus: </td>
<td>
<asp:DropDownList ID="DdlSolicitudEstatus" DataTextField="SolicitudEstatus" DataValueField="CveSolicitudEstatus" Width="200px" runat="server" AutoPostBack="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="DdlSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus de Solicitud''</b> es necesario, por favor Seleccionelo." ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Button ID="BtnAgregarSolicitud" runat="server" Text="Agregar" ValidationGroup="GrpAgregar" />
<asp:ValidationSummary ID="VS1" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpAgregar" />
</td>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</div>
<ajax:CollapsiblePanelExtender ID="CPESolicitud" ClientIDMode="Static" runat="server" SuppressPostBack="true" ExpandedImage="~/Imagenes/minusicon.png" TargetControlID="Panel" CollapseControlID="Panel0" ExpandControlID="Panel0" CollapsedImage="~/Imagenes/plusicon.png" Collapsed="true" ImageControlID="ImgPanel0"></ajax:CollapsiblePanelExtender>
<table border="0" class="contenido">
<tr>
<td>
<asp:UpdatePanel ID="UpSolicitudes" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<asp:GridView ID="GvSolicitudes" runat="server" AutoGenerateColumns="False" DataKeyNames="CveProspectoSolicitud" EmptyDataText="No se encontraron Solicitudes Registradas" ToolTip="Listado de Solicitudes">
<Columns>
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:TemplateField ItemStyle-Width="25px" HeaderText="Apoyo">
<HeaderTemplate>Solicitud</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LnkSolicitud" CssClass="Texto" runat="server" Text=' <%# Eval("Solicitud")%>' CommandArgument='<%# Eval("CveProspectoSolicitud")%>' CommandName="Carga"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="SolicitudTipo" HeaderText="Tipo de Solicitud" />
<asp:BoundField DataField="SolicitudEstatus" HeaderText="Estatus" />
<asp:TemplateField ItemStyle-Width="25px" HeaderText="Apoyo">
<ItemTemplate>
<asp:ImageButton runat="server" ID="ImgFlag" ImageUrl="/Imagenes/flag_red.png" ToolTip="Apoyos" CommandArgument='<%# Eval("CveProspectoSolicitud")%>' CommandName="CargaApoyoSolicitud"></asp:ImageButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto"></RowStyle>
<HeaderStyle CssClass="Titulos"></HeaderStyle>
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
<SelectedRowStyle CssClass="tabla_seleccionado"></SelectedRowStyle>
</asp:GridView>
</td>
<td style="vertical-align: top;"><br/>
<asp:Panel ID="PnlApoyos" Visible="False" runat="server">
<table border="0" class="contenido">
<tr>
<td>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="tabla_seleccionado">
<th colspan="5" scope="col">
<asp:Label ID="LblTituloApoyo" runat="server" Text=""></asp:Label></th>
</tr>
<tr class="Titulos">
<th scope="col" style="width:45px;">Cantidad</th><th scope="col" style="width:200px;">Apoyo</th><th scope="col" style="width:65px;">Importe</th>
<th scope="col" style="width:55px;"></th>
</tr>
<tr>
<td><asp:TextBox ID="TxtCantidad" runat="server" Width="40px" Text=""></asp:TextBox></td>
<td><asp:DropDownList ID="DdlProspectoApoyo" Width="194px" DataTextField="ProspectoApoyo" DataValueField="CveProspectoApoyo" runat="server"></asp:DropDownList></td>
<td><asp:TextBox ID="TxtImporte" Width="60px" runat="server"></asp:TextBox></td>
<td>
<asp:LinkButton ID="LnkApoyoAgregar" CssClass="Texto" runat="server" Text="Agregar" /></td>
</tr>
</table>
<asp:UpdatePanel ID="UppApoyos" runat="server" UpdateMode="Conditional" RenderMode="Inline" >
<ContentTemplate>
<asp:GridView ID="GvApoyos" runat="server" Width="365px" ShowHeader="False" AutoGenerateColumns="False" DataKeyNames="CveProspectoApoyo" EmptyDataText="" ToolTip="Listado de Solicitudes">
<Columns>
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-Width="45px" />
<asp:BoundField DataField="ProspectoApoyo" HeaderText="Apoyo" ItemStyle-Width="200px" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:N2}" ItemStyle-Width="65px" />
<asp:TemplateField HeaderText="" ItemStyle-Width="55px" >
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return confirm('¿Está seguro que desea eliminar el Apoyo?');" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto"></RowStyle>
<HeaderStyle CssClass="Titulos"></HeaderStyle>
<AlternatingRowStyle CssClass="TextoAlterno"></AlternatingRowStyle>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="center">
<br />
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="False" />
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Prospectos/CatProspectos.aspx';return false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
</ContentTemplate>
</asp:UpdatePanel>
<br />
</td>
</tr>
</table>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td>
<img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,652 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Data
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudes
Inherits ClsPaginas
'Confinguración
Private Property DTProspectosValores As DataTable
Get
Return CType(ViewState("DTProspectosValores"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTProspectosValores") = value
End Set
End Property
Private ReadOnly Property CveProspecto As Integer
Get
Return ViewState("CveProspecto").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveProspectoSolicitud As Integer
Get
Return ViewState("CveProspectoSolicitud").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveProspectoApoyo As Integer
Get
Return ViewState("CveProspectoApoyo").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveApoyoTipo As Integer
Get
Return ViewState("CveApoyoTipo").ToString.ToEntero
End Get
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DdlPaises.DataSource = GlobalDTGralPaises : DdlPaises.DataBind()
DdlEmpresaPaises.DataSource = GlobalDTGralPaises : DdlEmpresaPaises.DataBind()
DdlFiscalEstados.DataSource = GlobalDTGralEstados(1) : DdlFiscalEstados.DataBind()
'DdlMunicipios.DataSource = GlobalDTGralMunicipios : DdlMunicipios.DataBind()
If Request("CveProspecto") IsNot Nothing AndAlso IsNumeric(Request("CveProspecto")) AndAlso Request("CveProspecto").ToEntero > 0 Then
ViewState("CveProspecto") = Request("CveProspecto")
CargaDatos()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta del Prospecto:"
If Request("CveProspectoSolicitud") IsNot Nothing AndAlso IsNumeric(Request("CveProspectoSolicitud")) AndAlso Request("CveProspectoSolicitud").ToEntero > 0 Then
ViewState("CveProspectoSolicitud") = Request("CveProspectoSolicitud")
CargaDatosProspectosSolicitudes()
'Configuración de Modalidad Update
BtnAgregarSolicitud.Text = "Guardar Cambios"
Else
ViewState("CveProspectoSolicitud") = -1
ViewState("CveProspectoApoyo") = -1
End If
Else
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
ViewState("CveProspecto") = -1
End If
CargarSolicitudesTipos()
CargarApoyosTipos()
CargarSolicitudesEstatus()
CargaCaracteristicas()
CargarProspectosApoyos()
End If
End Sub
Private Sub CargaDatos()
Dim ObjProspectos As New ClsProspectos
If ObjProspectos.GetProspectos(CveProspecto, "-1", "-1", -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
If ObjProspectos.DtResultados.Rows.Count > 0 Then
TxtCveProspecto.Text = ObjProspectos.CveProspecto.ToString
TxtApellidoPaterno.Text = ObjProspectos.ApellidoPaterno
TxtApellidoMaterno.Text = ObjProspectos.ApellidoMaterno
TxtNombres.Text = ObjProspectos.Nombres
TxtFechaNacimiento.Text = ObjProspectos.FechaNacimiento.ToString
TxtLugarNacimiento.Text = ObjProspectos.LugarNacimiento
TxtRFC.Text = ObjProspectos.RFC
TxtNacionalidad.Text = ObjProspectos.Nacionalidad
TxtCalle.Text = ObjProspectos.Calle
TxtNumero.Text = ObjProspectos.Numero
TxtNumeroInterior.Text = ObjProspectos.NumeroInterior
TxtColonia.Text = ObjProspectos.Colonia
TxtCodigoPostal.Text = ObjProspectos.CodigoPostal.ToString
DdlSexo.SelectedValue = ObjProspectos.Sexo.ToString
DdlPaises.SelectedValue = ObjProspectos.CvePais.ToString
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
DdlEstados.SelectedValue = ObjProspectos.CveEstado.ToString
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
DdlMunicipios.SelectedValue = ObjProspectos.CveMunicipio.ToString
TxtTelefono.Text = ObjProspectos.Telefono
TxtFax.Text = ObjProspectos.Fax
TxtCorreo.Text = ObjProspectos.Correo
TxtEmpresaNombre.Text = ObjProspectos.EmpresaNombre
TxtEmpresaGiro.Text = ObjProspectos.EmpresaGiro
TxtEmpresaSector.Text = ObjProspectos.EmpresaSector
TxtEmpresaPagina.Text = ObjProspectos.EmpresaPagina
TxtEmpresaCalle.Text = ObjProspectos.EmpresaCalle
TxtEmpresaNumero.Text = ObjProspectos.EmpresaNumero
TxtEmpresaColonia.Text = ObjProspectos.EmpresaColonia
TxtEmpresaCodigoPostal.Text = ObjProspectos.EmpresaCodigoPostal
DdlEmpresaPaises.SelectedValue = ObjProspectos.CveEmpresaPais.ToString
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
DdlEmpresaEstados.SelectedValue = ObjProspectos.CveEmpresaEstado.ToString
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
DdlEmpresaMunicipios.SelectedValue = ObjProspectos.CveEmpresaMunicipio.ToString
TxtEmpresaTelefono.Text = ObjProspectos.EmpresaTelefono
TxtEmpresaFax.Text = ObjProspectos.EmpresaFax
TxtEmpresaCorreo.Text = ObjProspectos.EmpresaCorreo
TxtEmpresaPuesto.Text = ObjProspectos.EmpresaPuesto
TxtEmpresaEspecialidad.Text = ObjProspectos.EmpresaEspecialidad
ChkEnvioCorrespondencia.Checked = ObjProspectos.EnvioCorrespondencia
TxtFiscalRazonSocial.Text = ObjProspectos.FiscalRazonSocial
TxtFiscalDomicilio.Text = ObjProspectos.FiscalDomicilio
TxtFiscalColonia.Text = ObjProspectos.FiscalColonia
TxtFiscalCodigoPostal.Text = ObjProspectos.FiscalCodigoPostal
CargaEstados(DdlFiscalEstados, 1)
DdlFiscalEstados.SelectedValue = ObjProspectos.CveFiscalEstado.ToString
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
DdlFiscalMunicipios.SelectedValue = ObjProspectos.CveFiscalMunicipio.ToString
TxtFiscalRFC.Text = ObjProspectos.FiscalRFC
'Cargar los Valores de las Caractertisticas
If ObjProspectos.GetProspectosValores(CveProspecto) Then
ViewState("DTProspectosValores") = ObjProspectos.DtResultados
End If
'Cargar Referencias de Beneficiarios
If ObjProspectos.GetProspectosReferencias(CveProspecto) Then
Dim Beneficiarios As DataTable = ObjProspectos.DtResultados.FiltraParametros("CveTipoReferencia = " + ClsProspectos.TipoReferencias.Beneficiario.ToEntero.ToString)
Dim Sustitutos As DataTable = ObjProspectos.DtResultados.FiltraParametros("CveTipoReferencia = " + ClsProspectos.TipoReferencias.Sustituto.ToEntero.ToString)
If Beneficiarios.Rows.Count > 0 Then
HdnCveReferencia1.Value = Beneficiarios.Rows(0)("CveReferencia").ToString
TxtNombreReferencia1.Text = Beneficiarios.Rows(0)("NombreReferencia").ToString
TxtParentesco1.Text = Beneficiarios.Rows(0)("Parentesco").ToString
TxtPorcentaje1.Text = If(Beneficiarios.Rows(0)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(0)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 1 Then
HdnCveReferencia2.Value = Beneficiarios.Rows(1)("CveReferencia").ToString
TxtNombreReferencia2.Text = Beneficiarios.Rows(1)("NombreReferencia").ToString
TxtParentesco2.Text = Beneficiarios.Rows(1)("Parentesco").ToString
TxtPorcentaje2.Text = If(Beneficiarios.Rows(1)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(1)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 2 Then
HdnCveReferencia3.Value = Beneficiarios.Rows(2)("CveReferencia").ToString
TxtNombreReferencia3.Text = Beneficiarios.Rows(2)("NombreReferencia").ToString
TxtParentesco3.Text = Beneficiarios.Rows(2)("Parentesco").ToString
TxtPorcentaje3.Text = If(Beneficiarios.Rows(2)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(2)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 3 Then
HdnCveReferencia4.Value = Beneficiarios.Rows(3)("CveReferencia").ToString
TxtNombreReferencia4.Text = Beneficiarios.Rows(3)("NombreReferencia").ToString
TxtParentesco4.Text = Beneficiarios.Rows(3)("Parentesco").ToString
TxtPorcentaje4.Text = If(Beneficiarios.Rows(3)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(3)("Porcentaje").ToString, "")
End If
If Sustitutos.Rows.Count > 0 Then
HdnCveReferenciaSustituto1.Value = Sustitutos.Rows(0)("CveReferencia").ToString
TxtNombreReferenciaSustituto1.Text = Sustitutos.Rows(0)("NombreReferencia").ToString
TxtParentescoSustituto1.Text = Sustitutos.Rows(0)("Parentesco").ToString
End If
If Sustitutos.Rows.Count > 1 Then
HdnCveReferenciaSustituto2.Value = Sustitutos.Rows(1)("CveReferencia").ToString
TxtNombreReferenciaSustituto2.Text = Sustitutos.Rows(1)("NombreReferencia").ToString
TxtParentescoSustituto2.Text = Sustitutos.Rows(1)("Parentesco").ToString
End If
If Sustitutos.Rows.Count > 2 Then
HdnCveReferenciaSustituto3.Value = Sustitutos.Rows(2)("CveReferencia").ToString
TxtNombreReferenciaSustituto3.Text = Sustitutos.Rows(2)("NombreReferencia").ToString
TxtParentescoSustituto3.Text = Sustitutos.Rows(2)("Parentesco").ToString
End If
End If
CargaCaracteristicas()
CargarSolicitudes(CveProspecto)
End If
End If
ObjProspectos.Dispose()
End Sub
Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer)
ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind()
End Sub
Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer)
ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind()
End Sub
Protected Sub CargaCaracteristicas()
Dim objClasificaciones As New ClsProspectos
If objClasificaciones.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
GvClasificaciones.DataSource = objClasificaciones.DtResultados
GvClasificaciones.DataBind()
End If
objClasificaciones.Dispose()
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
Dim ObjProspectos As New ClsProspectos
If CveProspecto = -1 Then
If ObjProspectos.AddProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim,
TxtNombres.Text.Trim, TxtFechaNacimiento.Text.Trim.ToDate, TxtLugarNacimiento.Text.Trim, TxtRFC.Text.Trim, TxtNacionalidad.Text.Trim, DdlSexo.SelectedValue.ToEntero, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, TxtNumeroInterior.Text.Trim, "", "", TxtColonia.Text.Trim, TxtCodigoPostal.Text.Trim.ToEntero, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, "", TxtFax.Text.Trim, "", TxtCorreo.Text.Trim, "", "", "", -1, -1, -1, TxtEmpresaNombre.Text.Trim, TxtEmpresaGiro.Text.Trim, TxtEmpresaSector.Text.Trim,
TxtEmpresaPagina.Text.Trim, TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, TxtEmpresaCodigoPostal.Text.Trim, DdlEmpresaMunicipios.SelectedValue.ToEntero,
TxtEmpresaTelefono.Text.Trim, TxtEmpresaFax.Text.Trim, TxtEmpresaCorreo.Text.Trim, TxtEmpresaPuesto.Text.Trim,
TxtEmpresaEspecialidad.Text.Trim, ChkEnvioCorrespondencia.Checked, TxtFiscalRazonSocial.Text.Trim, TxtFiscalDomicilio.Text.Trim, TxtFiscalColonia.Text.Trim,
TxtFiscalCodigoPostal.Text.Trim, DdlFiscalMunicipios.SelectedValue.ToEntero, TxtFiscalRFC.Text.Trim, -1, -1, -1, "", -1, -1, -1, "", 0, "", -1, -1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
ViewState("CveProspecto") = ObjProspectos.CveProspecto
GuardarCaracteristicas()
GuardarReferencias()
Alert("El Prospecto se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Prospectos/Prospectos.aspx"";")
End If
Else
If ObjProspectos.UpdateProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim,
TxtNombres.Text.Trim, TxtFechaNacimiento.Text.Trim.ToDate, TxtLugarNacimiento.Text.Trim, TxtRFC.Text.Trim, TxtNacionalidad.Text.Trim, DdlSexo.SelectedValue.ToEntero, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, TxtNumeroInterior.Text.Trim, "", "", TxtColonia.Text.Trim, TxtCodigoPostal.Text.Trim.ToEntero, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, "", TxtFax.Text.Trim, "", TxtCorreo.Text.Trim, "", "", "", -1, -1, -1, TxtEmpresaNombre.Text.Trim, TxtEmpresaGiro.Text.Trim, TxtEmpresaSector.Text.Trim,
TxtEmpresaPagina.Text.Trim, TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, TxtEmpresaCodigoPostal.Text.Trim, DdlEmpresaMunicipios.SelectedValue.ToEntero,
TxtEmpresaTelefono.Text.Trim, TxtEmpresaFax.Text.Trim, TxtEmpresaCorreo.Text.Trim, TxtEmpresaPuesto.Text.Trim,
TxtEmpresaEspecialidad.Text.Trim, ChkEnvioCorrespondencia.Checked, TxtFiscalRazonSocial.Text.Trim, TxtFiscalDomicilio.Text.Trim, TxtFiscalColonia.Text.Trim,
TxtFiscalCodigoPostal.Text.Trim, DdlFiscalMunicipios.SelectedValue.ToEntero, TxtFiscalRFC.Text.Trim, -1, -1, -1, "", -1, -1, -1, "", 0, "", -1, -1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then
GuardarCaracteristicas()
GuardarReferencias()
UpDatos.Update()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
End If
ObjProspectos.Dispose()
End Sub
Protected Sub GuardarCaracteristicas()
Dim objProspectosValores As New ClsProspectos
For Each DR As GridViewRow In GvClasificaciones.Rows
For Each DR_TipoCaracteristica As GridViewRow In DR.FCGridView("GvTiposCaracteristicas").Rows
For Each DR_Caracteristica As GridViewRow In DR_TipoCaracteristica.FCGridView("GvCaracteristicas").Rows
Dim CveOpcion As Integer = -1
Dim CveValor As Integer = DR_Caracteristica.FCHiddenField("HdnCveValor").Value.ToEntero
Dim Valor As String = DR_Caracteristica.FCTextBox("TxtValor").Text.Trim
Dim CveCaracteristica As Integer = DR_Caracteristica.FCHiddenField("HdnCveCaracteristica").Value.ToEntero
Select Case DR_Caracteristica.FCHiddenField("HdnEsOpcion").Value
Case "1" 'Listado o DropDownList
CveOpcion = DR_Caracteristica.FCDropDownList("DdlOpcion").SelectedValue.ToEntero
Case "2" 'Radio o RadioButtonList
CveOpcion = DR_Caracteristica.FCRadioButtonList("RbOpcion").SelectedValue.ToEntero
End Select
If CveValor = -1 Then
objProspectosValores.AddProspectosValores(CveProspecto, CveCaracteristica, CveOpcion, If(Valor = "", "-1", Valor), UsuarioActual.CveUsuario)
Else
objProspectosValores.UpdateProspectosValores(CveProspecto, CveCaracteristica, CveOpcion, If(Valor = "", "-1", Valor), UsuarioActual.CveUsuario, CveValor)
End If
Next
Next
Next
objProspectosValores.Dispose()
End Sub
Protected Sub GuardarReferencias()
Dim objProspectosReferencias As New ClsProspectos
If HdnCveReferencia1.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia1.Text, TxtParentesco1.Text, "", TxtPorcentaje1.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia1.Text, TxtParentesco1.Text, "", TxtPorcentaje1.Text.ToDouble, HdnCveReferencia1.Value.ToEntero)
End If
If HdnCveReferencia2.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia2.Text, TxtParentesco2.Text, "", TxtPorcentaje2.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia2.Text, TxtParentesco2.Text, "", TxtPorcentaje2.Text.ToDouble, HdnCveReferencia2.Value.ToEntero)
End If
If HdnCveReferencia3.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia3.Text, TxtParentesco3.Text, "", TxtPorcentaje3.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia3.Text, TxtParentesco3.Text, "", TxtPorcentaje3.Text.ToDouble, HdnCveReferencia3.Value.ToEntero)
End If
If HdnCveReferencia4.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia4.Text, TxtParentesco4.Text, "", TxtPorcentaje4.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia4.Text, TxtParentesco4.Text, "", TxtPorcentaje4.Text.ToDouble, HdnCveReferencia4.Value.ToEntero)
End If
If HdnCveReferenciaSustituto1.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto1.Text, TxtParentescoSustituto1.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto1.Text, TxtParentescoSustituto1.Text, "", 0, HdnCveReferenciaSustituto1.Value.ToEntero)
End If
If HdnCveReferenciaSustituto2.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto2.Text, TxtParentescoSustituto2.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto2.Text, TxtParentescoSustituto2.Text, "", 0, HdnCveReferenciaSustituto2.Value.ToEntero)
End If
If HdnCveReferenciaSustituto3.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto3.Text, TxtParentescoSustituto3.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto3.Text, TxtParentescoSustituto3.Text, "", 0, HdnCveReferenciaSustituto3.Value.ToEntero)
End If
objProspectosReferencias.Dispose()
End Sub
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
Dim ObjProspectos As New ClsProspectos()
If ObjProspectos.RemoveProspectos(CveProspecto) Then
Alert("El Prospecto se Eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Prospectos/CatProspectos.aspx""")
End If
ObjProspectos.Dispose()
End Sub
Protected Sub GvClasificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvClasificaciones.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCaracteristicaClasificacion").ToEntero > 1 Then
e.Row.FCLabel("LblClasificacion").CssClass = "CaracteristicaPrincipal"
End If
Dim objTiposCaracteristicas As New ClsProspectos
If objTiposCaracteristicas.GetTiposCaracteristicas(UsuarioActual.CveEmpresa) Then
With e.Row.FCGridView("GvTiposCaracteristicas")
.DataSource = objTiposCaracteristicas.DtResultados.FiltraParametros("CveCaracteristicaClasificacion = " + e.Row.DBCampo("CveCaracteristicaClasificacion"))
.DataBind()
End With
End If
objTiposCaracteristicas.Dispose()
End If
End Sub
Protected Sub GvTiposCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CaracteristicaClasificacion").Trim = "" Then
e.Row.FCLabel("LblTipoCaracteristica").CssClass = "CaracteristicaPrincipal"
End If
Dim objCaracteristicas As New ClsProspectos
If objCaracteristicas.GetCaracteristicas(UsuarioActual.CveEmpresa) Then
With e.Row.FCGridView("GvCaracteristicas")
.DataSource = objCaracteristicas.DtResultados.FiltraParametros("Estatus = 'Activo' and CveCaracteristicaTipo = " + e.Row.DBCampo("CveCaracteristicaTipo"))
.DataBind()
End With
End If
objCaracteristicas.Dispose()
End If
End Sub
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim EsOpcion As Integer = e.Row.FCHiddenField("HdnEsOpcion").Value.ToEntero
Dim CveCaracteristica As Integer = e.Row.DBCampo("CveCaracteristica").ToEntero
'Dim RowProspectoValor As DataRowCollection = CType(ViewState("DTPS"), DataTable).FiltraParametros("CveCaracteristica = " + CveCaracteristica.ToString).Rows
Dim RowProspectoValor As DataRowCollection = DTProspectosValores.FiltraParametros("CveCaracteristica = " + CveCaracteristica.ToString).Rows
Dim CveValor As Integer = -1
Dim Valor As String = ""
Dim CveOpcion As Integer = -1
If RowProspectoValor.Count > 0 Then
e.Row.FCHiddenField("HdnCveValor").Value = RowProspectoValor(0)("CveValor").ToString
Valor = RowProspectoValor(0)("Valor").ToString
CveOpcion = RowProspectoValor(0)("CveOpcion").ToString.ToEntero
End If
Select Case EsOpcion
Case 0, 4 'Texto, Multiline
With e.Row.FCTextBox("TxtValor")
.Text = Valor
.Visible = True
If EsOpcion = 4 Then
.Rows = 3
.TextMode = TextBoxMode.MultiLine
End If
End With
Case 1, 2 'DropDownList, Radios
Dim objOpciones As New ClsProspectos
If objOpciones.GetCaracteristicasOpciones(CveCaracteristica, UsuarioActual.CveEmpresa) Then
If EsOpcion = 1 Then
With e.Row.FCDropDownList("DdlOpcion")
.Visible = True
.DataSource = objOpciones.DtResultados.FiltraParametros("Estatus = 'Activo'")
.DataBind()
.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
.SelectedValue = CveOpcion.ToString
End With
ElseIf EsOpcion = 2 Then
With e.Row.FCRadioButtonList("RbOpcion")
.Visible = True
.DataSource = objOpciones.DtResultados.FiltraParametros("Estatus = 'Activo'")
.DataBind()
If CveOpcion > 0 Then
.SelectedValue = CveOpcion.ToString
End If
End With
End If
End If
objOpciones.Dispose()
Case 3 'Fecha
With e.Row.FCTextBox("TxtValor")
If Valor <> "" Then
.Text = Valor
End If
.Visible = True
.Width = New Unit(80)
End With
e.Row.FCImageButton("ImgTxtValor").Visible = True
e.Row.FCMaskedEditExtender("MEETxtValor").Enabled = True
e.Row.FCCalendarExtender("CETxtValor").Enabled = True
End Select
End If
End Sub
Protected Sub DdlPaises_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPaises.SelectedIndexChanged
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
UPPEstados.Update()
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
UPPMunicipios.Update()
End Sub
Protected Sub DdlEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstados.SelectedIndexChanged
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
UPPMunicipios.Update()
End Sub
Protected Sub DdlEmpresaPaises_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaPaises.SelectedIndexChanged
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
UPPEmpresaEstados.Update()
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
UPPEmpresaMunicipios.Update()
End Sub
Protected Sub DdlEmpresaEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaEstados.SelectedIndexChanged
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
UPPEmpresaMunicipios.Update()
End Sub
Protected Sub DdlFiscalEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFiscalEstados.SelectedIndexChanged
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
UPPFiscalMunicipios.Update()
End Sub
#Region "E S C O L A R I D A D"
#End Region
#Region "S O L I C I T U D E S"
Private Sub CargarSolicitudesTipos()
DdlSolicitudTipo.DataSource = GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa)
DdlSolicitudTipo.DataBind()
End Sub
Private Sub CargarSolicitudesEstatus()
DdlSolicitudEstatus.DataSource = GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa)
DdlSolicitudEstatus.DataBind()
End Sub
Private Sub CargarSolicitudes(CveProspecto As Integer)
Dim ObjSolicitudes As New ClsProspectos
If CveProspecto > 0 Then
If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, -1, UsuarioActual.CveEmpresa) Then
GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
Else
GvSolicitudes.DataSource = Nothing
End If
End If
ObjSolicitudes.Dispose()
GvSolicitudes.DataBind()
End Sub
Private Sub CargarSolicitudesApoyos()
Dim ObjSolicitudesApoyos As New ClsProspectos
If Request("CveProspectoSolicitud") IsNot Nothing AndAlso IsNumeric(Request("CveProspectoSolicitud")) AndAlso Request("CveProspectoSolicitud").ToEntero > 0 Then
If ObjSolicitudesApoyos.GetProspectosSolicitudesApoyos(CveProspectoSolicitud, -1) Then
GvApoyos.DataSource = ObjSolicitudesApoyos.DtResultados
Else
GvApoyos.DataSource = Nothing
End If
End If
ObjSolicitudesApoyos.Dispose()
GvApoyos.DataBind()
End Sub
Protected Sub CargaDatosProspectosSolicitudes()
Dim ObjProspectosSolicitudes As New ClsProspectos
If ObjProspectosSolicitudes.GetProspectosSolicitudes(CveProspecto, CveApoyoTipo, CveProspectoSolicitud, CveProspectoSolicitud, UsuarioActual.CveEmpresa) Then
If ObjProspectosSolicitudes.DtResultados.Rows.Count > 0 Then
TxtSolicitud.Text = ObjProspectosSolicitudes.CanalizadorPor.ToString
TxtDescripcion.Text = ObjProspectosSolicitudes.Descripcion.ToString
DdlSolicitudTipo.SelectedValue = ObjProspectosSolicitudes.CveSolicitudTipo.ToString
DdlSolicitudEstatus.SelectedValue = ObjProspectosSolicitudes.CveSolicitudEstatus.ToString
Tab.ActiveTabIndex = 3
End If
End If
ObjProspectosSolicitudes.Dispose()
End Sub
Private Sub CargarApoyosTipos()
DdlApoyoTipo.DataSource = GlobalDTProspectosApoyosTipos(UsuarioActual.CveEmpresa)
DdlApoyoTipo.DataBind()
End Sub
Private Sub CargarProspectosApoyos()
DdlProspectoApoyo.DataSource = GlobalDTProspectosApoyos(UsuarioActual.CveEmpresa)
DdlProspectoApoyo.DataBind()
End Sub
#End Region
Protected Sub BtnAgregarSolicitud_Click(sender As Object, e As EventArgs) Handles BtnAgregarSolicitud.Click
Dim ObjSolicitudes As New ClsProspectos
'If CveProspectoSolicitud = -1 Then
' If ObjSolicitudes.AddProspectosSolicitudes(CveProspecto, DdlApoyoTipo.SelectedValue.ToEntero, "", "", TxtSolicitud.Text.Trim, TxtDescripcion.Text.Trim, "", DdlSolicitudTipo.SelectedValue.ToEntero, DdlSolicitudEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
' ViewState("CveProspectoSolicitud") = ObjSolicitudes.CveProspectoSolicitud
' UpSolicitudes.Update()
' Alert("La Solicitud se guardó correctamente.", TipoMensaje.MsgInformacion)
' If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, UsuarioActual.CveEmpresa) Then
' GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
' Else
' GvSolicitudes.DataSource = Nothing
' End If
' GvSolicitudes.DataBind()
' End If
'Else
' If ObjSolicitudes.UpdateProspectosSolicitudes(CveProspecto, TxtSolicitud.Text.Trim, TxtDescripcion.Text.Trim, "", DdlSolicitudTipo.SelectedValue.ToEntero, DdlSolicitudEstatus.SelectedValue.ToEntero, CveProspectoSolicitud) Then
' UpSolicitudes.Update()
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
' If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, UsuarioActual.CveEmpresa) Then
' GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
' Else
' GvSolicitudes.DataSource = Nothing
' End If
' GvSolicitudes.DataBind()
' End If
'End If
ObjSolicitudes.Dispose()
End Sub
'Protected Sub BtnNuevaSolicitud_Click(sender As Object, e As EventArgs) Handles BtnNuevaSolicitud.Click
' If CveProspectoSolicitud > -1 Then
' ViewState("CveProspectoSolicitud") = -1
' Response.Redirect("/Prospectos/Solicitudes/CatProspectosSolicitudes.aspx?CveProspecto=" & CveProspecto & "")
' Tab.TabIndex = 3
' End If
'End Sub
Protected Sub GvSolicitudes_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvSolicitudes.RowCommand
Dim ObjProsp As New ClsProspectos
If e.CommandName = "Carga" Then
If ObjProsp.GetProspectosSolicitudes(-1, -1, e.CommandArgument.ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then
ViewState("CveProspectoSolicitud") = e.CommandArgument.ToString.ToEntero
TxtSolicitud.Text = ObjProsp.EntregoSolicitud
TxtDescripcion.Text = ObjProsp.Descripcion
DdlSolicitudTipo.SelectedValue = ObjProsp.CveSolicitudTipo.ToString
DdlSolicitudEstatus.SelectedValue = ObjProsp.CveSolicitudEstatus.ToString
UpAgregarSolicitud.Update()
RegistraScript("$find('CPESolicitud').expandPanel();")
End If
End If
If e.CommandName = "CargaApoyoSolicitud" Then
Dim Gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, ImageButton).BindingContainer, GridViewRow)
GvSolicitudes.SelectedIndex = Gvr.RowIndex
ViewState("CveProspectoSolicitud") = e.CommandArgument.ToString.ToEntero
If ObjProsp.GetProspectosSolicitudesApoyos(e.CommandArgument.ToString.ToEntero, -1) Then
TxtCantidad.Text = ""
TxtImporte.Text = ""
PnlApoyos.Visible = True
UppApoyos.Update()
LblTituloApoyo.Text = Gvr.FCLinkButton("LnkSolicitud").Text
GvApoyos.DataSource = ObjProsp.DtResultados
GvApoyos.DataBind()
End If
ObjProsp.Dispose()
End If
End Sub
Protected Sub LnkApoyoAgregar_Click(sender As Object, e As EventArgs) Handles LnkApoyoAgregar.Click
Dim ObjApoyo As New ClsProspectos
If ObjApoyo.AddProspectosSolicitudesApoyos(CveProspectoSolicitud, DdlProspectoApoyo.SelectedValue.ToEntero, TxtCantidad.Text.ToDouble, TxtImporte.Text.ToDouble, 1) Then
GvApoyos.DataSource = ObjApoyo.DtResultados
GvApoyos.DataBind()
Alert("Apoyo Agregado", TipoMensaje.MsgInformacion)
End If
ObjApoyo.Dispose()
End Sub
Protected Sub GvSolicitudes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSolicitudes.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(65)
e.Row.Cells(1).Width = Unit.Pixel(300)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(50)
End If
If e.Row.DBCampo("Apoyos").ToEntero > 0 Then
e.Row.FCImageButton("ImgFlag").ImageUrl = "/Imagenes/flag_green.png"
e.Row.FCImageButton("ImgFlag").ToolTip = String.Format("Apoyos:{0}", e.Row.DBCampo("Apoyos"))
End If
End If
End Sub
End Class

View File

@@ -0,0 +1,652 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Data
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudes
Inherits ClsPaginas
'Confinguración
Private Property DTProspectosValores As DataTable
Get
Return CType(ViewState("DTProspectosValores"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTProspectosValores") = value
End Set
End Property
Private ReadOnly Property CveProspecto As Integer
Get
Return ViewState("CveProspecto").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveProspectoSolicitud As Integer
Get
Return ViewState("CveProspectoSolicitud").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveProspectoApoyo As Integer
Get
Return ViewState("CveProspectoApoyo").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveApoyoTipo As Integer
Get
Return ViewState("CveApoyoTipo").ToString.ToEntero
End Get
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DdlPaises.DataSource = GlobalDTGralPaises : DdlPaises.DataBind()
DdlEmpresaPaises.DataSource = GlobalDTGralPaises : DdlEmpresaPaises.DataBind()
DdlFiscalEstados.DataSource = GlobalDTGralEstados(1) : DdlFiscalEstados.DataBind()
'DdlMunicipios.DataSource = GlobalDTGralMunicipios : DdlMunicipios.DataBind()
If Request("CveProspecto") IsNot Nothing AndAlso IsNumeric(Request("CveProspecto")) AndAlso Request("CveProspecto").ToEntero > 0 Then
ViewState("CveProspecto") = Request("CveProspecto")
CargaDatos()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta del Prospecto:"
If Request("CveProspectoSolicitud") IsNot Nothing AndAlso IsNumeric(Request("CveProspectoSolicitud")) AndAlso Request("CveProspectoSolicitud").ToEntero > 0 Then
ViewState("CveProspectoSolicitud") = Request("CveProspectoSolicitud")
CargaDatosProspectosSolicitudes()
'Configuración de Modalidad Update
BtnAgregarSolicitud.Text = "Guardar Cambios"
Else
ViewState("CveProspectoSolicitud") = -1
ViewState("CveProspectoApoyo") = -1
End If
Else
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
ViewState("CveProspecto") = -1
End If
CargarSolicitudesTipos()
CargarApoyosTipos()
CargarSolicitudesEstatus()
CargaCaracteristicas()
CargarProspectosApoyos()
End If
End Sub
Private Sub CargaDatos()
Dim ObjProspectos As New ClsProspectos
If ObjProspectos.GetProspectos(CveProspecto, "-1", "-1", -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
If ObjProspectos.DtResultados.Rows.Count > 0 Then
TxtCveProspecto.Text = ObjProspectos.CveProspecto.ToString
TxtApellidoPaterno.Text = ObjProspectos.ApellidoPaterno
TxtApellidoMaterno.Text = ObjProspectos.ApellidoMaterno
TxtNombres.Text = ObjProspectos.Nombres
TxtFechaNacimiento.Text = ObjProspectos.FechaNacimiento.ToString
TxtLugarNacimiento.Text = ObjProspectos.LugarNacimiento
TxtRFC.Text = ObjProspectos.RFC
TxtNacionalidad.Text = ObjProspectos.Nacionalidad
TxtCalle.Text = ObjProspectos.Calle
TxtNumero.Text = ObjProspectos.Numero
TxtNumeroInterior.Text = ObjProspectos.NumeroInterior
TxtColonia.Text = ObjProspectos.Colonia
TxtCodigoPostal.Text = ObjProspectos.CodigoPostal.ToString
DdlSexo.SelectedValue = ObjProspectos.Sexo.ToString
DdlPaises.SelectedValue = ObjProspectos.CvePais.ToString
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
DdlEstados.SelectedValue = ObjProspectos.CveEstado.ToString
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
DdlMunicipios.SelectedValue = ObjProspectos.CveMunicipio.ToString
TxtTelefono.Text = ObjProspectos.Telefono
TxtFax.Text = ObjProspectos.Fax
TxtCorreo.Text = ObjProspectos.Correo
TxtEmpresaNombre.Text = ObjProspectos.EmpresaNombre
TxtEmpresaGiro.Text = ObjProspectos.EmpresaGiro
TxtEmpresaSector.Text = ObjProspectos.EmpresaSector
TxtEmpresaPagina.Text = ObjProspectos.EmpresaPagina
TxtEmpresaCalle.Text = ObjProspectos.EmpresaCalle
TxtEmpresaNumero.Text = ObjProspectos.EmpresaNumero
TxtEmpresaColonia.Text = ObjProspectos.EmpresaColonia
TxtEmpresaCodigoPostal.Text = ObjProspectos.EmpresaCodigoPostal
DdlEmpresaPaises.SelectedValue = ObjProspectos.CveEmpresaPais.ToString
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
DdlEmpresaEstados.SelectedValue = ObjProspectos.CveEmpresaEstado.ToString
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
DdlEmpresaMunicipios.SelectedValue = ObjProspectos.CveEmpresaMunicipio.ToString
TxtEmpresaTelefono.Text = ObjProspectos.EmpresaTelefono
TxtEmpresaFax.Text = ObjProspectos.EmpresaFax
TxtEmpresaCorreo.Text = ObjProspectos.EmpresaCorreo
TxtEmpresaPuesto.Text = ObjProspectos.EmpresaPuesto
TxtEmpresaEspecialidad.Text = ObjProspectos.EmpresaEspecialidad
ChkEnvioCorrespondencia.Checked = ObjProspectos.EnvioCorrespondencia
TxtFiscalRazonSocial.Text = ObjProspectos.FiscalRazonSocial
TxtFiscalDomicilio.Text = ObjProspectos.FiscalDomicilio
TxtFiscalColonia.Text = ObjProspectos.FiscalColonia
TxtFiscalCodigoPostal.Text = ObjProspectos.FiscalCodigoPostal
CargaEstados(DdlFiscalEstados, 1)
DdlFiscalEstados.SelectedValue = ObjProspectos.CveFiscalEstado.ToString
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
DdlFiscalMunicipios.SelectedValue = ObjProspectos.CveFiscalMunicipio.ToString
TxtFiscalRFC.Text = ObjProspectos.FiscalRFC
'Cargar los Valores de las Caractertisticas
If ObjProspectos.GetProspectosValores(CveProspecto) Then
ViewState("DTProspectosValores") = ObjProspectos.DtResultados
End If
'Cargar Referencias de Beneficiarios
If ObjProspectos.GetProspectosReferencias(CveProspecto) Then
Dim Beneficiarios As DataTable = ObjProspectos.DtResultados.FiltraParametros("CveTipoReferencia = " + ClsProspectos.TipoReferencias.Beneficiario.ToEntero.ToString)
Dim Sustitutos As DataTable = ObjProspectos.DtResultados.FiltraParametros("CveTipoReferencia = " + ClsProspectos.TipoReferencias.Sustituto.ToEntero.ToString)
If Beneficiarios.Rows.Count > 0 Then
HdnCveReferencia1.Value = Beneficiarios.Rows(0)("CveReferencia").ToString
TxtNombreReferencia1.Text = Beneficiarios.Rows(0)("NombreReferencia").ToString
TxtParentesco1.Text = Beneficiarios.Rows(0)("Parentesco").ToString
TxtPorcentaje1.Text = If(Beneficiarios.Rows(0)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(0)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 1 Then
HdnCveReferencia2.Value = Beneficiarios.Rows(1)("CveReferencia").ToString
TxtNombreReferencia2.Text = Beneficiarios.Rows(1)("NombreReferencia").ToString
TxtParentesco2.Text = Beneficiarios.Rows(1)("Parentesco").ToString
TxtPorcentaje2.Text = If(Beneficiarios.Rows(1)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(1)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 2 Then
HdnCveReferencia3.Value = Beneficiarios.Rows(2)("CveReferencia").ToString
TxtNombreReferencia3.Text = Beneficiarios.Rows(2)("NombreReferencia").ToString
TxtParentesco3.Text = Beneficiarios.Rows(2)("Parentesco").ToString
TxtPorcentaje3.Text = If(Beneficiarios.Rows(2)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(2)("Porcentaje").ToString, "")
End If
If Beneficiarios.Rows.Count > 3 Then
HdnCveReferencia4.Value = Beneficiarios.Rows(3)("CveReferencia").ToString
TxtNombreReferencia4.Text = Beneficiarios.Rows(3)("NombreReferencia").ToString
TxtParentesco4.Text = Beneficiarios.Rows(3)("Parentesco").ToString
TxtPorcentaje4.Text = If(Beneficiarios.Rows(3)("Porcentaje").ToString.ToDouble <> 0, Beneficiarios.Rows(3)("Porcentaje").ToString, "")
End If
If Sustitutos.Rows.Count > 0 Then
HdnCveReferenciaSustituto1.Value = Sustitutos.Rows(0)("CveReferencia").ToString
TxtNombreReferenciaSustituto1.Text = Sustitutos.Rows(0)("NombreReferencia").ToString
TxtParentescoSustituto1.Text = Sustitutos.Rows(0)("Parentesco").ToString
End If
If Sustitutos.Rows.Count > 1 Then
HdnCveReferenciaSustituto2.Value = Sustitutos.Rows(1)("CveReferencia").ToString
TxtNombreReferenciaSustituto2.Text = Sustitutos.Rows(1)("NombreReferencia").ToString
TxtParentescoSustituto2.Text = Sustitutos.Rows(1)("Parentesco").ToString
End If
If Sustitutos.Rows.Count > 2 Then
HdnCveReferenciaSustituto3.Value = Sustitutos.Rows(2)("CveReferencia").ToString
TxtNombreReferenciaSustituto3.Text = Sustitutos.Rows(2)("NombreReferencia").ToString
TxtParentescoSustituto3.Text = Sustitutos.Rows(2)("Parentesco").ToString
End If
End If
CargaCaracteristicas()
CargarSolicitudes(CveProspecto)
End If
End If
ObjProspectos.Dispose()
End Sub
Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer)
ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind()
End Sub
Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer)
ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind()
End Sub
Protected Sub CargaCaracteristicas()
Dim objClasificaciones As New ClsProspectos
If objClasificaciones.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
GvClasificaciones.DataSource = objClasificaciones.DtResultados
GvClasificaciones.DataBind()
End If
objClasificaciones.Dispose()
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
Dim ObjProspectos As New ClsProspectos
If CveProspecto = -1 Then
If ObjProspectos.AddProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim,
TxtNombres.Text.Trim, TxtFechaNacimiento.Text.Trim.ToDate, TxtLugarNacimiento.Text.Trim, TxtRFC.Text.Trim, TxtNacionalidad.Text.Trim, DdlSexo.SelectedValue.ToEntero, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, TxtNumeroInterior.Text.Trim, "", "", TxtColonia.Text.Trim, TxtCodigoPostal.Text.Trim.ToEntero, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, "", TxtFax.Text.Trim, "", TxtCorreo.Text.Trim, "", "", "", -1, -1, -1, TxtEmpresaNombre.Text.Trim, TxtEmpresaGiro.Text.Trim, TxtEmpresaSector.Text.Trim,
TxtEmpresaPagina.Text.Trim, TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, TxtEmpresaCodigoPostal.Text.Trim, DdlEmpresaMunicipios.SelectedValue.ToEntero,
TxtEmpresaTelefono.Text.Trim, TxtEmpresaFax.Text.Trim, TxtEmpresaCorreo.Text.Trim, TxtEmpresaPuesto.Text.Trim,
TxtEmpresaEspecialidad.Text.Trim, ChkEnvioCorrespondencia.Checked, TxtFiscalRazonSocial.Text.Trim, TxtFiscalDomicilio.Text.Trim, TxtFiscalColonia.Text.Trim,
TxtFiscalCodigoPostal.Text.Trim, DdlFiscalMunicipios.SelectedValue.ToEntero, TxtFiscalRFC.Text.Trim, -1, -1, -1, "", -1, -1, -1, False, "", -1, -1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
ViewState("CveProspecto") = ObjProspectos.CveProspecto
GuardarCaracteristicas()
GuardarReferencias()
Alert("El Prospecto se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Prospectos/Prospectos.aspx"";")
End If
Else
If ObjProspectos.UpdateProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim,
TxtNombres.Text.Trim, TxtFechaNacimiento.Text.Trim.ToDate, TxtLugarNacimiento.Text.Trim, TxtRFC.Text.Trim, TxtNacionalidad.Text.Trim, DdlSexo.SelectedValue.ToEntero, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, TxtNumeroInterior.Text.Trim, "", "", TxtColonia.Text.Trim, TxtCodigoPostal.Text.Trim.ToEntero, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, "", TxtFax.Text.Trim, "", TxtCorreo.Text.Trim, "", "", "", -1, -1, -1, TxtEmpresaNombre.Text.Trim, TxtEmpresaGiro.Text.Trim, TxtEmpresaSector.Text.Trim,
TxtEmpresaPagina.Text.Trim, TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, TxtEmpresaCodigoPostal.Text.Trim, DdlEmpresaMunicipios.SelectedValue.ToEntero,
TxtEmpresaTelefono.Text.Trim, TxtEmpresaFax.Text.Trim, TxtEmpresaCorreo.Text.Trim, TxtEmpresaPuesto.Text.Trim,
TxtEmpresaEspecialidad.Text.Trim, ChkEnvioCorrespondencia.Checked, TxtFiscalRazonSocial.Text.Trim, TxtFiscalDomicilio.Text.Trim, TxtFiscalColonia.Text.Trim,
TxtFiscalCodigoPostal.Text.Trim, DdlFiscalMunicipios.SelectedValue.ToEntero, TxtFiscalRFC.Text.Trim, -1, -1, -1, "", -1, -1, -1, False, "", -1, -1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then
GuardarCaracteristicas()
GuardarReferencias()
UpDatos.Update()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
End If
ObjProspectos.Dispose()
End Sub
Protected Sub GuardarCaracteristicas()
Dim objProspectosValores As New ClsProspectos
For Each DR As GridViewRow In GvClasificaciones.Rows
For Each DR_TipoCaracteristica As GridViewRow In DR.FCGridView("GvTiposCaracteristicas").Rows
For Each DR_Caracteristica As GridViewRow In DR_TipoCaracteristica.FCGridView("GvCaracteristicas").Rows
Dim CveOpcion As Integer = -1
Dim CveValor As Integer = DR_Caracteristica.FCHiddenField("HdnCveValor").Value.ToEntero
Dim Valor As String = DR_Caracteristica.FCTextBox("TxtValor").Text.Trim
Dim CveCaracteristica As Integer = DR_Caracteristica.FCHiddenField("HdnCveCaracteristica").Value.ToEntero
Select Case DR_Caracteristica.FCHiddenField("HdnEsOpcion").Value
Case "1" 'Listado o DropDownList
CveOpcion = DR_Caracteristica.FCDropDownList("DdlOpcion").SelectedValue.ToEntero
Case "2" 'Radio o RadioButtonList
CveOpcion = DR_Caracteristica.FCRadioButtonList("RbOpcion").SelectedValue.ToEntero
End Select
If CveValor = -1 Then
objProspectosValores.AddProspectosValores(CveProspecto, CveCaracteristica, CveOpcion, If(Valor = "", "-1", Valor), UsuarioActual.CveUsuario)
Else
objProspectosValores.UpdateProspectosValores(CveProspecto, CveCaracteristica, CveOpcion, If(Valor = "", "-1", Valor), UsuarioActual.CveUsuario, CveValor)
End If
Next
Next
Next
objProspectosValores.Dispose()
End Sub
Protected Sub GuardarReferencias()
Dim objProspectosReferencias As New ClsProspectos
If HdnCveReferencia1.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia1.Text, TxtParentesco1.Text, "", TxtPorcentaje1.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia1.Text, TxtParentesco1.Text, "", TxtPorcentaje1.Text.ToDouble, HdnCveReferencia1.Value.ToEntero)
End If
If HdnCveReferencia2.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia2.Text, TxtParentesco2.Text, "", TxtPorcentaje2.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia2.Text, TxtParentesco2.Text, "", TxtPorcentaje2.Text.ToDouble, HdnCveReferencia2.Value.ToEntero)
End If
If HdnCveReferencia3.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia3.Text, TxtParentesco3.Text, "", TxtPorcentaje3.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia3.Text, TxtParentesco3.Text, "", TxtPorcentaje3.Text.ToDouble, HdnCveReferencia3.Value.ToEntero)
End If
If HdnCveReferencia4.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia4.Text, TxtParentesco4.Text, "", TxtPorcentaje4.Text.ToDouble, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Beneficiario, TxtNombreReferencia4.Text, TxtParentesco4.Text, "", TxtPorcentaje4.Text.ToDouble, HdnCveReferencia4.Value.ToEntero)
End If
If HdnCveReferenciaSustituto1.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto1.Text, TxtParentescoSustituto1.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto1.Text, TxtParentescoSustituto1.Text, "", 0, HdnCveReferenciaSustituto1.Value.ToEntero)
End If
If HdnCveReferenciaSustituto2.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto2.Text, TxtParentescoSustituto2.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto2.Text, TxtParentescoSustituto2.Text, "", 0, HdnCveReferenciaSustituto2.Value.ToEntero)
End If
If HdnCveReferenciaSustituto3.Value = "-1" Then
objProspectosReferencias.AddProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto3.Text, TxtParentescoSustituto3.Text, "", 0, UsuarioActual.CveUsuario)
Else
objProspectosReferencias.UpdateProspectosReferencias(CveProspecto, ClsProspectos.TipoReferencias.Sustituto, TxtNombreReferenciaSustituto3.Text, TxtParentescoSustituto3.Text, "", 0, HdnCveReferenciaSustituto3.Value.ToEntero)
End If
objProspectosReferencias.Dispose()
End Sub
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
Dim ObjProspectos As New ClsProspectos()
If ObjProspectos.RemoveProspectos(CveProspecto) Then
Alert("El Prospecto se Eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Prospectos/CatProspectos.aspx""")
End If
ObjProspectos.Dispose()
End Sub
Protected Sub GvClasificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvClasificaciones.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCaracteristicaClasificacion").ToEntero > 1 Then
e.Row.FCLabel("LblClasificacion").CssClass = "CaracteristicaPrincipal"
End If
Dim objTiposCaracteristicas As New ClsProspectos
If objTiposCaracteristicas.GetTiposCaracteristicas(UsuarioActual.CveEmpresa) Then
With e.Row.FCGridView("GvTiposCaracteristicas")
.DataSource = objTiposCaracteristicas.DtResultados.FiltraParametros("CveCaracteristicaClasificacion = " + e.Row.DBCampo("CveCaracteristicaClasificacion"))
.DataBind()
End With
End If
objTiposCaracteristicas.Dispose()
End If
End Sub
Protected Sub GvTiposCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CaracteristicaClasificacion").Trim = "" Then
e.Row.FCLabel("LblTipoCaracteristica").CssClass = "CaracteristicaPrincipal"
End If
Dim objCaracteristicas As New ClsProspectos
If objCaracteristicas.GetCaracteristicas(UsuarioActual.CveEmpresa) Then
With e.Row.FCGridView("GvCaracteristicas")
.DataSource = objCaracteristicas.DtResultados.FiltraParametros("Estatus = 'Activo' and CveCaracteristicaTipo = " + e.Row.DBCampo("CveCaracteristicaTipo"))
.DataBind()
End With
End If
objCaracteristicas.Dispose()
End If
End Sub
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim EsOpcion As Integer = e.Row.FCHiddenField("HdnEsOpcion").Value.ToEntero
Dim CveCaracteristica As Integer = e.Row.DBCampo("CveCaracteristica").ToEntero
'Dim RowProspectoValor As DataRowCollection = CType(ViewState("DTPS"), DataTable).FiltraParametros("CveCaracteristica = " + CveCaracteristica.ToString).Rows
Dim RowProspectoValor As DataRowCollection = DTProspectosValores.FiltraParametros("CveCaracteristica = " + CveCaracteristica.ToString).Rows
Dim CveValor As Integer = -1
Dim Valor As String = ""
Dim CveOpcion As Integer = -1
If RowProspectoValor.Count > 0 Then
e.Row.FCHiddenField("HdnCveValor").Value = RowProspectoValor(0)("CveValor").ToString
Valor = RowProspectoValor(0)("Valor").ToString
CveOpcion = RowProspectoValor(0)("CveOpcion").ToString.ToEntero
End If
Select Case EsOpcion
Case 0, 4 'Texto, Multiline
With e.Row.FCTextBox("TxtValor")
.Text = Valor
.Visible = True
If EsOpcion = 4 Then
.Rows = 3
.TextMode = TextBoxMode.MultiLine
End If
End With
Case 1, 2 'DropDownList, Radios
Dim objOpciones As New ClsProspectos
If objOpciones.GetCaracteristicasOpciones(CveCaracteristica, UsuarioActual.CveEmpresa) Then
If EsOpcion = 1 Then
With e.Row.FCDropDownList("DdlOpcion")
.Visible = True
.DataSource = objOpciones.DtResultados.FiltraParametros("Estatus = 'Activo'")
.DataBind()
.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
.SelectedValue = CveOpcion.ToString
End With
ElseIf EsOpcion = 2 Then
With e.Row.FCRadioButtonList("RbOpcion")
.Visible = True
.DataSource = objOpciones.DtResultados.FiltraParametros("Estatus = 'Activo'")
.DataBind()
If CveOpcion > 0 Then
.SelectedValue = CveOpcion.ToString
End If
End With
End If
End If
objOpciones.Dispose()
Case 3 'Fecha
With e.Row.FCTextBox("TxtValor")
If Valor <> "" Then
.Text = Valor
End If
.Visible = True
.Width = New Unit(80)
End With
e.Row.FCImageButton("ImgTxtValor").Visible = True
e.Row.FCMaskedEditExtender("MEETxtValor").Enabled = True
e.Row.FCCalendarExtender("CETxtValor").Enabled = True
End Select
End If
End Sub
Protected Sub DdlPaises_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPaises.SelectedIndexChanged
CargaEstados(DdlEstados, DdlPaises.SelectedValue.ToEntero)
UPPEstados.Update()
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
UPPMunicipios.Update()
End Sub
Protected Sub DdlEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstados.SelectedIndexChanged
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
UPPMunicipios.Update()
End Sub
Protected Sub DdlEmpresaPaises_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaPaises.SelectedIndexChanged
CargaEstados(DdlEmpresaEstados, DdlEmpresaPaises.SelectedValue.ToEntero)
UPPEmpresaEstados.Update()
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
UPPEmpresaMunicipios.Update()
End Sub
Protected Sub DdlEmpresaEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaEstados.SelectedIndexChanged
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
UPPEmpresaMunicipios.Update()
End Sub
Protected Sub DdlFiscalEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFiscalEstados.SelectedIndexChanged
CargaMunicipios(DdlFiscalMunicipios, DdlFiscalEstados.SelectedValue.ToEntero)
UPPFiscalMunicipios.Update()
End Sub
#Region "E S C O L A R I D A D"
#End Region
#Region "S O L I C I T U D E S"
Private Sub CargarSolicitudesTipos()
DdlSolicitudTipo.DataSource = GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa)
DdlSolicitudTipo.DataBind()
End Sub
Private Sub CargarSolicitudesEstatus()
DdlSolicitudEstatus.DataSource = GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa)
DdlSolicitudEstatus.DataBind()
End Sub
Private Sub CargarSolicitudes(CveProspecto As Integer)
Dim ObjSolicitudes As New ClsProspectos
If CveProspecto > 0 Then
If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, UsuarioActual.CveEmpresa) Then
GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
Else
GvSolicitudes.DataSource = Nothing
End If
End If
ObjSolicitudes.Dispose()
GvSolicitudes.DataBind()
End Sub
Private Sub CargarSolicitudesApoyos()
Dim ObjSolicitudesApoyos As New ClsProspectos
If Request("CveProspectoSolicitud") IsNot Nothing AndAlso IsNumeric(Request("CveProspectoSolicitud")) AndAlso Request("CveProspectoSolicitud").ToEntero > 0 Then
If ObjSolicitudesApoyos.GetProspectosSolicitudesApoyos(CveProspectoSolicitud, -1) Then
GvApoyos.DataSource = ObjSolicitudesApoyos.DtResultados
Else
GvApoyos.DataSource = Nothing
End If
End If
ObjSolicitudesApoyos.Dispose()
GvApoyos.DataBind()
End Sub
Protected Sub CargaDatosProspectosSolicitudes()
Dim ObjProspectosSolicitudes As New ClsProspectos
If ObjProspectosSolicitudes.GetProspectosSolicitudes(CveProspecto, CveApoyoTipo, CveProspectoSolicitud, UsuarioActual.CveEmpresa) Then
If ObjProspectosSolicitudes.DtResultados.Rows.Count > 0 Then
TxtSolicitud.Text = ObjProspectosSolicitudes.Solicitud.ToString
TxtDescripcion.Text = ObjProspectosSolicitudes.Descripcion.ToString
DdlSolicitudTipo.SelectedValue = ObjProspectosSolicitudes.CveSolicitudTipo.ToString
DdlSolicitudEstatus.SelectedValue = ObjProspectosSolicitudes.CveSolicitudEstatus.ToString
Tab.ActiveTabIndex = 3
End If
End If
ObjProspectosSolicitudes.Dispose()
End Sub
Private Sub CargarApoyosTipos()
DdlApoyoTipo.DataSource = GlobalDTProspectosApoyosTipos(UsuarioActual.CveEmpresa)
DdlApoyoTipo.DataBind()
End Sub
Private Sub CargarProspectosApoyos()
DdlProspectoApoyo.DataSource = GlobalDTProspectosApoyos(UsuarioActual.CveEmpresa)
DdlProspectoApoyo.DataBind()
End Sub
#End Region
Protected Sub BtnAgregarSolicitud_Click(sender As Object, e As EventArgs) Handles BtnAgregarSolicitud.Click
Dim ObjSolicitudes As New ClsProspectos
If CveProspectoSolicitud = -1 Then
If ObjSolicitudes.AddProspectosSolicitudes(CveProspecto, DdlApoyoTipo.SelectedValue.ToEntero, TxtSolicitud.Text.Trim, TxtDescripcion.Text.Trim, "", DdlSolicitudTipo.SelectedValue.ToEntero, DdlSolicitudEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ViewState("CveProspectoSolicitud") = ObjSolicitudes.CveProspectoSolicitud
UpSolicitudes.Update()
Alert("La Solicitud se guardó correctamente.", TipoMensaje.MsgInformacion)
If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, UsuarioActual.CveEmpresa) Then
GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
Else
GvSolicitudes.DataSource = Nothing
End If
GvSolicitudes.DataBind()
End If
Else
If ObjSolicitudes.UpdateProspectosSolicitudes(CveProspecto, TxtSolicitud.Text.Trim, TxtDescripcion.Text.Trim, "", DdlSolicitudTipo.SelectedValue.ToEntero, DdlSolicitudEstatus.SelectedValue.ToEntero, CveProspectoSolicitud) Then
UpSolicitudes.Update()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
If ObjSolicitudes.GetProspectosSolicitudes(CveProspecto, -1, -1, UsuarioActual.CveEmpresa) Then
GvSolicitudes.DataSource = ObjSolicitudes.DtResultados
Else
GvSolicitudes.DataSource = Nothing
End If
GvSolicitudes.DataBind()
End If
End If
ObjSolicitudes.Dispose()
End Sub
'Protected Sub BtnNuevaSolicitud_Click(sender As Object, e As EventArgs) Handles BtnNuevaSolicitud.Click
' If CveProspectoSolicitud > -1 Then
' ViewState("CveProspectoSolicitud") = -1
' Response.Redirect("/Prospectos/Solicitudes/CatProspectosSolicitudes.aspx?CveProspecto=" & CveProspecto & "")
' Tab.TabIndex = 3
' End If
'End Sub
Protected Sub GvSolicitudes_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvSolicitudes.RowCommand
Dim ObjProsp As New ClsProspectos
If e.CommandName = "Carga" Then
If ObjProsp.GetProspectosSolicitudes(-1, -1, e.CommandArgument.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
ViewState("CveProspectoSolicitud") = e.CommandArgument.ToString.ToEntero
TxtSolicitud.Text = ObjProsp.Solicitud
TxtDescripcion.Text = ObjProsp.Descripcion
DdlSolicitudTipo.SelectedValue = ObjProsp.CveSolicitudTipo.ToString
DdlSolicitudEstatus.SelectedValue = ObjProsp.CveSolicitudEstatus.ToString
UpAgregarSolicitud.Update()
RegistraScript("$find('CPESolicitud').expandPanel();")
End If
End If
If e.CommandName = "CargaApoyoSolicitud" Then
Dim Gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, ImageButton).BindingContainer, GridViewRow)
GvSolicitudes.SelectedIndex = Gvr.RowIndex
ViewState("CveProspectoSolicitud") = e.CommandArgument.ToString.ToEntero
If ObjProsp.GetProspectosSolicitudesApoyos(e.CommandArgument.ToString.ToEntero, -1) Then
TxtCantidad.Text = ""
TxtImporte.Text = ""
PnlApoyos.Visible = True
UppApoyos.Update()
LblTituloApoyo.Text = Gvr.FCLinkButton("LnkSolicitud").Text
GvApoyos.DataSource = ObjProsp.DtResultados
GvApoyos.DataBind()
End If
ObjProsp.Dispose()
End If
End Sub
Protected Sub LnkApoyoAgregar_Click(sender As Object, e As EventArgs) Handles LnkApoyoAgregar.Click
Dim ObjApoyo As New ClsProspectos
If ObjApoyo.AddProspectosSolicitudesApoyos(CveProspectoSolicitud, DdlProspectoApoyo.SelectedValue.ToEntero, TxtCantidad.Text.ToDouble, TxtImporte.Text.ToDouble, 1) Then
GvApoyos.DataSource = ObjApoyo.DtResultados
GvApoyos.DataBind()
Alert("Apoyo Agregado")
End If
ObjApoyo.Dispose()
End Sub
Protected Sub GvSolicitudes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSolicitudes.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(65)
e.Row.Cells(1).Width = Unit.Pixel(300)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(80)
e.Row.Cells(4).Width = Unit.Pixel(50)
End If
If e.Row.DBCampo("Apoyos").ToEntero > 0 Then
e.Row.FCImageButton("ImgFlag").ImageUrl = "/Imagenes/flag_green.png"
e.Row.FCImageButton("ImgFlag").ToolTip = String.Format("Apoyos:{0}", e.Row.DBCampo("Apoyos"))
End If
End If
End Sub
End Class

View File

@@ -0,0 +1,133 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudesApoyos.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudesApoyos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Catálogo de Solicitudes de Apoyos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Solicitud de Apoyo?');
}
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="210px"><asp:LinkButton ID="LbCveProspectoApoyo" runat="server" CausesValidation="false" Text="Prospecto"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgCveProspectoApoyo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="105px"><asp:LinkButton ID="LbCantidad" runat="server" CausesValidation="false" Text="Cantidad"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgCantidad" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="105px"><asp:LinkButton ID="LbImporte" runat="server" CausesValidation="false" Text="Importe"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgImporte" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="105px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Estatus"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="103">Comandos</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DdlProspectoApoyo" runat="server" AppendDataBoundItems="true" DataValueField="CveProspectoApoyo" DataTextField="ProspectoApoyo" ValidationGroup="GrpGuardar" Width="200px">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProspectoApoyo" runat="server" ControlToValidate="DdlProspectoApoyo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''ProspectoApoyo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOProspectoApoyo" runat="server" HighlightCssClass="vco" TargetControlID="RFVProspectoApoyo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="100px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtImporte" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="100px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOImporte" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporte" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveProspectoSolicitud" EmptyDataText="No se encontraron Solicitudes de Apoyos Registrados" ToolTip="Listado de Solicitudes de Apoyos">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlProspectoApoyo" runat="server" Text='<%# Eval("ProspectoApoyo", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="DdlProspectoApoyo" runat="server" DataValueField="CveProspectoApoyo" DataTextField="ProspectoApoyo" Width="200px"></asp:DropDownList>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:c}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtCantidad" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Cantidad")%>' ValidationGroup="GrpEditGuardar" Width="100px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:c}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtImporte" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Importe")%>' ValidationGroup="GrpEditGuardar" Width="100px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOImporte" runat="server" HighlightCssClass="vco" TargetControlID="RFVImporte" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
&nbsp;<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,208 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudesApoyos
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OCveProspectoApoyo") = "CveProspectoApoyo DESC"
ViewState("OEstatus") = "Estatus DESC"
ViewState("OCantidad") = "Cantidad DESC"
ViewState("OImporte") = "Importe DESC"
CargarProspectos()
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjProspectosSolicitudesApoyos As New ClsProspectos
If ObjProspectosSolicitudesApoyos.GetProspectosSolicitudesApoyos(-1, -1) Then
ViewState("DTProspectosSolicitudesApoyos") = ObjProspectosSolicitudesApoyos.DtResultados
GlobalDTProspectosSolicitudesApoyos(-1) = ObjProspectosSolicitudesApoyos.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
ObjProspectosSolicitudesApoyos.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargarProspectos()
DdlProspectoApoyo.DataSource = GlobalDTProspectosApoyos(UsuarioActual.CveEmpresa)
DdlProspectoApoyo.DataBind()
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjProspectosSolicitudesApoyos As New ClsProspectos
If ObjProspectosSolicitudesApoyos.AddProspectosSolicitudesApoyos(1, DdlProspectoApoyo.SelectedValue.ToEntero, TxtCantidad.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, 1) Then
TxtCantidad.Text = ""
TxtImporte.Text = ""
Alert("La nueva Solicitud de Apoyo se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTProspectosSolicitudesApoyos") = ObjProspectosSolicitudesApoyos.DtResultados
GlobalDTProspectosSolicitudesApoyos(-1) = ObjProspectosSolicitudesApoyos.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
ObjProspectosSolicitudesApoyos.Dispose()
End Sub
#Region "O R D E N"
Protected Sub LbCveProspectoApoyo_Click(sender As Object, e As System.EventArgs) Handles LbCveProspectoApoyo.Click, ImgCveProspectoApoyo.Click
If ViewState("OCveProspectoApoyo").ToString() = "CveProspectoApoyo DESC" Then
ViewState("OCveProspectoApoyo") = "CveProspectoApoyo ASC"
ImgCveProspectoApoyo.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OCveProspectoApoyo") = "CveProspectoApoyo DESC"
ImgCveProspectoApoyo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OCveProspectoApoyo")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbCantidad_Click(sender As Object, e As System.EventArgs) Handles LbCantidad.Click, ImgCantidad.Click
If ViewState("OCantidad").ToString() = "Cantidad DESC" Then
ViewState("OCantidad") = "Cantidad ASC"
ImgCantidad.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OCantidad") = "Cantidad DESC"
ImgCantidad.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OCantidad")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbImporte_Click(sender As Object, e As System.EventArgs) Handles LbImporte.Click, ImgImporte.Click
If ViewState("OImporte").ToString() = "Importe DESC" Then
ViewState("OImporte") = "Importe ASC"
ImgImporte.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OImporte") = "Importe DESC"
ImgImporte.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OImporte")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbEstatus_Click(sender As Object, e As System.EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEstatus").ToString() = "Estatus DESC" Then
ViewState("OEstatus") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEstatus") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(210)
e.Row.Cells(1).Width = Unit.Pixel(105)
e.Row.Cells(2).Width = Unit.Pixel(105)
e.Row.Cells(3).Width = Unit.Pixel(105)
e.Row.Cells(4).Width = Unit.Pixel(50)
e.Row.Cells(5).Width = Unit.Pixel(50)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
e.Row.FCDropDownList("DdlProspectoApoyo").DataSource = GlobalDTProspectosApoyos(UsuarioActual.CveEmpresa)
e.Row.FCDropDownList("DdlProspectoApoyo").DataBind()
e.Row.FCDropDownList("DdlProspectoApoyo").SelectedValue = e.Row.DBCampo("CveProspectoApoyo")
End If
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjProspectosSolicitudesApoyos As New ClsProspectos
If ObjProspectosSolicitudesApoyos.RemoveProspectosSolicitudesApoyos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosSolicitudesApoyos") = ObjProspectosSolicitudesApoyos.DtResultados
GlobalDTProspectosSolicitudesApoyos(-1) = ObjProspectosSolicitudesApoyos.DtResultados
Alert("El Apoyo se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosSolicitudesApoyos.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjProspectosSolicitudesApoyos As New ClsProspectos
Dim CveProspectoApoyo As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlProspectoApoyo"), DropDownList).SelectedValue.ToEntero
Dim Cantidad As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCantidad"), TextBox).Text.Trim.ToDouble
Dim Importe As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtImporte"), TextBox).Text.Trim.ToDouble
Dim Estatus As Boolean = CBool(GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked)
Dim CveProspectoSolicitud As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
If ObjProspectosSolicitudesApoyos.UpdateProspectosSolicitudesApoyos(CveProspectoApoyo, Cantidad, Importe, If(Estatus = True, 1, 0), CveProspectoSolicitud) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosSolicitudesApoyos") = ObjProspectosSolicitudesApoyos.DtResultados
GlobalDTProspectosSolicitudesApoyos(-1) = ObjProspectosSolicitudesApoyos.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosSolicitudesApoyos.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTProspectosSolicitudesApoyos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTProspectosSolicitudesApoyos"), DataTable)
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,115 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudesEstatus.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudesEstatus" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Catálogo de Estatus de Solicitudes de Prospectos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Estatus?');
}
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="250px"><asp:LinkButton ID="LbSolicitudEstatus" runat="server" CausesValidation="false" Text="Estatus de la Solicitud"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgSolicitudEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Estatus"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="103">Comandos</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtSolicitudEstatus" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="TxtSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSolicitudEstatus" EmptyDataText="No se encontraron Estatus Registrados" ToolTip="Listado de Estatus">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlSolicitudEstatus" runat="server" Text='<%# Eval("SolicitudEstatus", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtSolicitudEstatus" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SolicitudEstatus") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="TxtSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
&nbsp;<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,115 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudesEstatus.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudesEstatus" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Catálogo de Estatus de Solicitudes de Prospectos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Estatus?');
}
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="250px"><asp:LinkButton ID="LbSolicitudEstatus" runat="server" CausesValidation="false" Text="Estatus de la Solicitud"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgSolicitudEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Estatus"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="103">Comandos</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtSolicitudEstatus" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="TxtSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSolicitudEstatus" EmptyDataText="No se encontraron Estatus Registrados" ToolTip="Listado de Estatus">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlSolicitudEstatus" runat="server" Text='<%# Eval("SolicitudEstatus", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtSolicitudEstatus" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SolicitudEstatus") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudEstatus" runat="server" ControlToValidate="TxtSolicitudEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudEstatus" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
&nbsp;<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,197 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudesEstatus
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OSolicitudEstatus") = "SolicitudEstatus DESC"
ViewState("OEstatus") = "Estatus DESC"
ViewState("OFechaIng") = "FechaIng DESC"
ViewState("OUsuario") = "Usuario DESC"
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.GetSolicitudEstatus() Then
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.AddSolicitudEstatus(TxtSolicitudEstatus.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtSolicitudEstatus.Text = ""
Alert("El nuevo Estatus se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
ObjProspectosEstatus.Dispose()
End Sub
#Region "O R D E N "
Protected Sub LbSolicitudEstatus_Click(sender As Object, e As System.EventArgs) Handles LbSolicitudEstatus.Click, ImgSolicitudEstatus.Click
If ViewState("OSolicitudEstatus").ToString() = "SolicitudEstatus DESC" Then
ViewState("OSolicitudEstatus") = "SolicitudEstatus ASC"
ImgSolicitudEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OSolicitudEstatus") = "SolicitudEstatus DESC"
ImgSolicitudEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OSolicitudEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbEstatus_Click(sender As Object, e As System.EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEstatus").ToString() = "Estatus DESC" Then
ViewState("OEstatus") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEstatus") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbFechaIng_Click(sender As Object, e As System.EventArgs) Handles LbFechaIng.Click, ImgFechaIng.Click
If ViewState("OFechaIng").ToString() = "FechaIng DESC" Then
ViewState("OFechaIng") = "FechaIng ASC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OFechaIng") = "FechaIng DESC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OFechaIng")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbUsuario_Click(sender As Object, e As System.EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
If ViewState("OUsuario").ToString() = "Usuario DESC" Then
ViewState("OUsuario") = "Usuario ASC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OUsuario") = "Usuario DESC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OUsuario")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(250)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(50)
e.Row.Cells(5).Width = Unit.Pixel(50)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.RemoveSolicitudEstatus(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Alert("El Estatus se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjProspectosEstatus As New ClsProspectos
Dim SolicitudEstatus As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSolicitudEstatus"), TextBox).Text.Trim
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveSolicitudEstatus As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
If ObjProspectosEstatus.UpdateSolicitudEstatus(SolicitudEstatus, Estatus, CveSolicitudEstatus) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTProspectosEstatus"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTProspectosEstatus"), DataTable)
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,197 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudesEstatus
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OSolicitudEstatus") = "SolicitudEstatus DESC"
ViewState("OEstatus") = "Estatus DESC"
ViewState("OFechaIng") = "FechaIng DESC"
ViewState("OUsuario") = "Usuario DESC"
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.GetSolicitudEstatus() Then
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.AddSolicitudEstatus(TxtSolicitudEstatus.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtSolicitudEstatus.Text = ""
Alert("El nuevo Estatus se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
ObjProspectosEstatus.Dispose()
End Sub
#Region "O R D E N "
Protected Sub LbSolicitudEstatus_Click(sender As Object, e As System.EventArgs) Handles LbSolicitudEstatus.Click, ImgSolicitudEstatus.Click
If ViewState("OSolicitudEstatus").ToString() = "SolicitudEstatus DESC" Then
ViewState("OSolicitudEstatus") = "SolicitudEstatus ASC"
ImgSolicitudEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OSolicitudEstatus") = "SolicitudEstatus DESC"
ImgSolicitudEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OSolicitudEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbEstatus_Click(sender As Object, e As System.EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEstatus").ToString() = "Estatus DESC" Then
ViewState("OEstatus") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEstatus") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbFechaIng_Click(sender As Object, e As System.EventArgs) Handles LbFechaIng.Click, ImgFechaIng.Click
If ViewState("OFechaIng").ToString() = "FechaIng DESC" Then
ViewState("OFechaIng") = "FechaIng ASC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OFechaIng") = "FechaIng DESC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OFechaIng")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbUsuario_Click(sender As Object, e As System.EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
If ViewState("OUsuario").ToString() = "Usuario DESC" Then
ViewState("OUsuario") = "Usuario ASC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OUsuario") = "Usuario DESC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OUsuario")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(250)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(50)
e.Row.Cells(5).Width = Unit.Pixel(50)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjProspectosEstatus As New ClsProspectos
If ObjProspectosEstatus.RemoveSolicitudEstatus(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Alert("El Estatus se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjProspectosEstatus As New ClsProspectos
Dim SolicitudEstatus As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSolicitudEstatus"), TextBox).Text.Trim
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveSolicitudEstatus As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
If ObjProspectosEstatus.UpdateSolicitudEstatus(SolicitudEstatus, Estatus, CveSolicitudEstatus) Then
GvDatos.EditIndex = -1
ViewState("DTProspectosEstatus") = ObjProspectosEstatus.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) = ObjProspectosEstatus.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjProspectosEstatus.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTProspectosEstatus"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTProspectosEstatus"), DataTable)
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,116 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudesTipos.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudesTipos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Catálogo de Prospectos Tipos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Tipo?');
}
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="250px"><asp:LinkButton ID="LbSolicitudTipo" runat="server" CausesValidation="false" Text="Tipo de Solicitud"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgSolicitudTipo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Estatus"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="103">Comandos</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtSolicitudTipo" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="TxtSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSolicitudTipo" EmptyDataText="No se encontraron Tipos de Solicitudes Registrados" ToolTip="Listado de Tipos de Solicitudes">
<Columns>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlSolicitudTipo" runat="server" Text='<%# Eval("SolicitudTipo", "{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtSolicitudTipo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SolicitudTipo") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="TxtSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
&nbsp;<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,116 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatProspectosSolicitudesTipos.aspx.vb" Inherits="Prospectos_Solicitudes_CatProspectosSolicitudesTipos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Catálogo de Prospectos Tipos de Solicitudes
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Tipo de Solicitud?');
}
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="250px"><asp:LinkButton ID="LbSolicitudTipo" runat="server" CausesValidation="false" Text="Tipo de Solicitud"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgSolicitudTipo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Estatus"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="Fecha Ing."></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgFechaIng" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="100px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Usuario"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="103">Comandos</td>
</tr>
<tr>
<td>
<asp:TextBox ID="TxtSolicitudTipo" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="TxtSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td><asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSolicitudTipo" EmptyDataText="No se encontraron Tipos de Solicitudes Registrados" ToolTip="Listado de Tipos de Solicitudes">
<Columns>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlSolicitudTipo" runat="server" Text='<%# Eval("SolicitudTipo", "{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtSolicitudTipo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SolicitudTipo") %>' ValidationGroup="GrpGV" Width="244px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVSolicitudTipo" runat="server" ControlToValidate="TxtSolicitudTipo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Solicitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCSolicitudTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSolicitudTipo" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:ImageButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ImageUrl="/Imagenes/Btn_Update.png" ValidationGroup="GrpGV" />
&nbsp;<asp:ImageButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" ImageUrl="/Imagenes/Btn_Cancel.png" />
</center>
</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,197 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudesTipos
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OSolicitudTipo") = "SolicitudTipo DESC"
ViewState("OEstatus") = "Estatus DESC"
ViewState("OFechaIng") = "FechaIng DESC"
ViewState("OUsuario") = "Usuario DESC"
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.GetSolicitudTipo() Then
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.AddSolicitudTipo(TxtSolicitudTipo.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtSolicitudTipo.Text = ""
Alert("El nuevo Tipo de Solicitud se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
ObjSolicitudTipo.Dispose()
End Sub
#Region "O R D E N "
Protected Sub LbSolicitudTipo_Click(sender As Object, e As System.EventArgs) Handles LbSolicitudTipo.Click, ImgSolicitudTipo.Click
If ViewState("OSolicitudTipo").ToString() = "SolicitudTipo DESC" Then
ViewState("OSolicitudTipo") = "SolicitudTipo ASC"
ImgSolicitudTipo.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OSolicitudTipo") = "SolicitudTipo DESC"
ImgSolicitudTipo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OSolicitudTipo")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbEstatus_Click(sender As Object, e As System.EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEstatus").ToString() = "Estatus DESC" Then
ViewState("OEstatus") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEstatus") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbFechaIng_Click(sender As Object, e As System.EventArgs) Handles LbFechaIng.Click, ImgFechaIng.Click
If ViewState("OFechaIng").ToString() = "FechaIng DESC" Then
ViewState("OFechaIng") = "FechaIng ASC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OFechaIng") = "FechaIng DESC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OFechaIng")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbUsuario_Click(sender As Object, e As System.EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
If ViewState("OUsuario").ToString() = "Usuario DESC" Then
ViewState("OUsuario") = "Usuario ASC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OUsuario") = "Usuario DESC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OUsuario")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(250)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(50)
e.Row.Cells(5).Width = Unit.Pixel(50)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.RemoveSolicitudTipo(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Alert("El Tipo de Solicitud se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjSolicitudTipo As New ClsProspectos
Dim SolicitudTipo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSolicitudTipo"), TextBox).Text.Trim
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveSolicitudTipo As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
If ObjSolicitudTipo.UpdateSolicitudTipo(SolicitudTipo, Estatus, CveSolicitudTipo) Then
GvDatos.EditIndex = -1
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTSolicitudTipo"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTSolicitudTipo"), DataTable)
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,197 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Linq
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatProspectosSolicitudesTipos
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OSolicitudTipo") = "SolicitudTipo DESC"
ViewState("OEstatus") = "Estatus DESC"
ViewState("OFechaIng") = "FechaIng DESC"
ViewState("OUsuario") = "Usuario DESC"
CargaDatos()
End If
End Sub
Public Sub CargaDatos()
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.GetSolicitudTipo() Then
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.AddSolicitudTipo(TxtSolicitudTipo.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TxtSolicitudTipo.Text = ""
Alert("El nuevo Tipo de Solicitud se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update()
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
ObjSolicitudTipo.Dispose()
End Sub
#Region "O R D E N "
Protected Sub LbSolicitudTipo_Click(sender As Object, e As System.EventArgs) Handles LbSolicitudTipo.Click, ImgSolicitudTipo.Click
If ViewState("OSolicitudTipo").ToString() = "SolicitudTipo DESC" Then
ViewState("OSolicitudTipo") = "SolicitudTipo ASC"
ImgSolicitudTipo.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OSolicitudTipo") = "SolicitudTipo DESC"
ImgSolicitudTipo.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OSolicitudTipo")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbEstatus_Click(sender As Object, e As System.EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEstatus").ToString() = "Estatus DESC" Then
ViewState("OEstatus") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEstatus") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEstatus")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbFechaIng_Click(sender As Object, e As System.EventArgs) Handles LbFechaIng.Click, ImgFechaIng.Click
If ViewState("OFechaIng").ToString() = "FechaIng DESC" Then
ViewState("OFechaIng") = "FechaIng ASC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OFechaIng") = "FechaIng DESC"
ImgFechaIng.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OFechaIng")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbUsuario_Click(sender As Object, e As System.EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
If ViewState("OUsuario").ToString() = "Usuario DESC" Then
ViewState("OUsuario") = "Usuario ASC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OUsuario") = "Usuario DESC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OUsuario")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(250)
e.Row.Cells(1).Width = Unit.Pixel(100)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(50)
e.Row.Cells(5).Width = Unit.Pixel(50)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
Dim ObjSolicitudTipo As New ClsProspectos
If ObjSolicitudTipo.RemoveSolicitudTipo(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
GvDatos.EditIndex = -1
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Alert("El Tipo de Solicitud se eliminó correctamente.", TipoMensaje.MsgInformacion)
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
GvDatos.EditIndex = -1
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
Dim ObjSolicitudTipo As New ClsProspectos
Dim SolicitudTipo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSolicitudTipo"), TextBox).Text.Trim
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveSolicitudTipo As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
If ObjSolicitudTipo.UpdateSolicitudTipo(SolicitudTipo, Estatus, CveSolicitudTipo) Then
GvDatos.EditIndex = -1
ViewState("DTSolicitudTipo") = ObjSolicitudTipo.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) = ObjSolicitudTipo.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjSolicitudTipo.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
GvDatos.EditIndex = e.NewEditIndex
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTSolicitudTipo"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTSolicitudTipo"), DataTable)
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,186 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSolicitudesG15.aspx.vb" Inherits="Prospectos_Solicitudes_CatSolicitudesG15" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
<img alt="Nuevo Prospecto" onclick="document.location.href='/Prospectos/ProspectosG15.aspx'" src="../../Imagenes/Imagenes42/BotonAgregar.png" style="cursor: pointer; height:22px;" />&nbsp;
<asp:ImageButton ID="ImgExcel" ToolTip="Excel" runat="server" ImageUrl="../../Imagenes/Imagenes42/IconoExcel.png" Height="20px" />&nbsp;
<asp:Image ID="ImgPersonalizar" ToolTip="Personalizar Listado" runat="server" ImageUrl="~/Imagenes/Imagenes42/Table-icon.png" Style="cursor:pointer; height:22px;" />&nbsp;
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Reporte de Solicitudes
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="left" class="SubTotales4">
<td>Tipo Apoyo</td>
<td>
<asp:DropDownList ID="DdlApoyoTipo" runat="server" AppendDataBoundItems="true" DataTextField="ApoyoTipo" DataValueField="CveApoyoTipo" Width="100px" AutoPostBack="True">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>Solicitud Estatus</td>
<td>
<asp:DropDownList ID="DdlSolicitudEstatus" runat="server" AppendDataBoundItems="true" DataTextField="SolicitudEstatus" DataValueField="CveSolicitudEstatus" Width="100px">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>SolicitudTipo</td>
<td>
<asp:DropDownList ID="DdlSolicitudTipo" runat="server" AppendDataBoundItems="true" DataTextField="SolicitudTipo" DataValueField="CveSolicitudTipo" Width="100px" AutoPostBack="True">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>Clasificación</td>
<td>
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100px">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Normal" Value="1"></asp:ListItem>
<asp:ListItem Text="Especial" Value="2"></asp:ListItem>
<asp:ListItem Text="Urgente" Value="3"></asp:ListItem>
<asp:ListItem Text="Fondos de Donación" Value="4"></asp:ListItem>
</asp:DropDownList>
</td>
<td>&nbsp;F.I.:&nbsp;</td>
<td valign="middle">
<asp:TextBox ID="txtFechaI" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td>&nbsp;F.F.:&nbsp;</td>
<td valign="middle">
<asp:TextBox ID="txtFechaF" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td align="right" style="border-left-style: solid; border-left-color: white; border-left-width: 1px;"><asp:Button ID="BtnConsultar" runat="server" Text="Consultar" /></td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%-- <asp:LinkButton ID="LnkDatos" runat="server">Datos</asp:LinkButton>
<asp:LinkButton ID="LnkArbol" runat="server">Arbol</asp:LinkButton>--%>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Prospectos Registrados" ToolTip="Listado de Prospectos">
<Columns>
<asp:TemplateField><HeaderTemplate>Nombre</HeaderTemplate><ItemTemplate><asp:HyperLink ID="HplNombreCompleto" CssClass="Texto" runat="server" Text='<%# Eval("NombreCompleto")%>' NavigateUrl='<%# Eval("CveProspecto", "../ProspectosG15.aspx?CveProspecto={0}")%>'></asp:HyperLink></ItemTemplate></asp:TemplateField>
<%--<asp:BoundField Visible="False" HeaderText="ApellidoPaterno" DataField="Apellido Paterno"/>
<asp:BoundField Visible="False" HeaderText="ApellidoMaterno" DataField="Apellido Materno"/>
<asp:BoundField Visible="False" HeaderText="Nombres" DataField="Nombres"/>
<asp:BoundField HeaderText="Edad" DataField="Edad"/>
<asp:BoundField Visible="False" HeaderText="F. Nacimiento" DataField="FechaNacimiento" DataFormatString="{0:d}"/>
<asp:BoundField Visible="False" HeaderText="Lugar Nacimiento" DataField="LugarNacimiento"/>
<asp:BoundField Visible="False" HeaderText="Escolaridad" DataField="Escolaridad"/>
<asp:BoundField Visible="False" HeaderText="Estado Civil" DataField="EstadoCivil"/>
<asp:BoundField Visible="False" HeaderText="IFE" DataField="IFE"/>
<asp:BoundField Visible="False" HeaderText="Sección" DataField="Seccion" DataFormatString="{0:###}"/>
<asp:BoundField HeaderText="Promotor" DataField="Coordinador"/>
<asp:BoundField Visible="False" HeaderText="Depend." DataField="Dependientes"/>
<asp:BoundField Visible="False" HeaderText="Correo" DataField="Correo"/>--%>
<asp:BoundField HeaderText="Solicitud" DataField="Descripcion"/>
<asp:BoundField HeaderText="Calle" DataField="Calle"/>
<asp:BoundField HeaderText="#" DataField="Numero"/>
<asp:BoundField Visible="True" HeaderText="Entre Calles" DataField="EntreCalle1"/>
<asp:BoundField HeaderText="Colonia" DataField="Colonia"/>
<asp:BoundField HeaderText="Municipio" DataField="Municipio"/>
<asp:BoundField Visible="False" HeaderText="Estado" DataField="Estado"/>
<asp:BoundField Visible="True" HeaderText="Teléfono" DataField="Telefono"/>
<asp:BoundField Visible="True" HeaderText="Celular" DataField="Celular"/>
<asp:BoundField HeaderText="Solicitud Tipo" DataField="SolicitudTipo"/>
<asp:BoundField Visible="True" HeaderText="Fecha Ing" DataField="FechaIng" DataFormatString="{0:d}"/>
<asp:BoundField Visible="True" HeaderText="Fecha Sol" DataField="FechaSolicitud" DataFormatString="{0:d}"/>
<asp:BoundField HeaderText="Estatus" DataField="SolicitudEstatus"/>
</Columns>
<HeaderStyle CssClass="Titulos" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<RowStyle CssClass="Texto" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table border="0" width="315px" cellpadding="0" cellspacing="0">
<tr class="Titulos">
<td style="width: 310px">
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
</td>
<td style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" />
</td>
</tr>
<tr align="left">
<td colspan="2">
<table>
<%-- <tr><td><asp:CheckBox ID="ChkNombreCompleto" runat="server" Text="Nombre Completo" Checked="true"/></td></tr>
<tr><td><asp:CheckBox ID="ChkApellidoPaterno" runat="server" Text="ApellidoPaterno" /></td></tr>
<tr><td><asp:CheckBox ID="ChkApellidoMaterno" runat="server" Text="ApellidoMaterno" /></td></tr>
<tr><td><asp:CheckBox ID="ChkNombres" runat="server" Text="Nombres" /></td></tr>
<tr><td><asp:CheckBox ID="ChkEdad" runat="server" Text="Edad" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkFechaNacimiento" runat="server" Text="FechaNacimiento" Checked="false" /></td></tr>
<tr><td><asp:CheckBox ID="ChkLugarNacimiento" runat="server" Text="LugarNacimiento"/></td></tr>
<tr><td><asp:CheckBox ID="ChkEscolaridad" runat="server" Text="Escolaridad"/></td></tr>
<tr><td><asp:CheckBox ID="ChkEstadoCivil" runat="server" Text="Estado Civil"/></td></tr>
<tr><td><asp:CheckBox ID="ChkIFE" runat="server" Text="IFE" Checked="false" /></td></tr>
<tr><td><asp:CheckBox ID="ChkSeccion" runat="server" Text="Sección" Checked="false" /></td></tr>
<tr><td><asp:CheckBox ID="ChkPromotor" runat="server" Text="Promotor" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkDependientes" runat="server" Text="Dependientes"/></td></tr>
<tr><td><asp:CheckBox ID="ChkCorreo" runat="server" Text="Correo"/></td></tr>
--%>
<tr><td><asp:CheckBox ID="ChkCalle" runat="server" Text="Calle" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkNumero" runat="server" Text="Número" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkEntre" runat="server" Text="Entre Calles"/></td></tr>
<tr><td><asp:CheckBox ID="ChkColonia" runat="server" Text="Colonia"/></td></tr>
<tr><td><asp:CheckBox ID="ChkMunicipio" runat="server" Text="Municipio" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkTelefono" runat="server" Text="Teléfono" Checked="true" /></td></tr>
<tr><td><asp:CheckBox ID="ChkCelular" runat="server" Text="Celular" /></td></tr>
<tr><td><asp:CheckBox ID="ChkFechaIng" runat="server" Text="Fecha Ingreso"/></td></tr>
<tr><td><asp:CheckBox ID="ChkSolicitudEstatus" runat="server" Text="SolicitudEstatus"/></td></tr>
<tr><td><asp:CheckBox ID="ChkSolicitudTipo" runat="server" Text="SolicitudTipo" Checked="true" /></td></tr>
</table>
</td>
</tr>
<tr style="height:25px">
<td colspan="2"><asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" /></td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

View File

@@ -0,0 +1,173 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Partial Class Prospectos_Solicitudes_CatSolicitudesG15
Inherits ClsPaginas
Private Property DtDatos As DataTable
Get
Return DirectCast(ViewState("DtDatos"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtDatos") = value
End Set
End Property
Private Property CveProspectoSeleccionado As Integer
Get
Return ViewState("CveProspectoSeleccionado").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProspectoSeleccionado") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
CveProspectoSeleccionado = -1 'UsuarioActual.CveProspecto
DdlApoyoTipo.DataSource = GlobalDTProspectosApoyosTipos(UsuarioActual.CveEmpresa) : DdlApoyoTipo.DataBind()
DdlSolicitudEstatus.DataSource = GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) : DdlSolicitudEstatus.DataBind()
DdlSolicitudTipo.DataSource = GlobalDTProspectosSolicitudesTipos(UsuarioActual.CveEmpresa) : DdlSolicitudTipo.DataBind()
CargaDatos()
ImgPersonalizar.Attributes.Add("onclick", "$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
End If
End Sub
Public Sub CargaDatos()
Dim FechaI, FechaF As String
FechaI = If(IsDate(txtFechaI.Text.Trim), txtFechaI.Text.Trim, "-1")
FechaF = If(IsDate(txtFechaF.Text.Trim), txtFechaF.Text.Trim, "-1")
Dim ObjProspectos As New ClsProspectos
If ObjProspectos.GetRepProspectosSolicitudes(-1, DdlSolicitudEstatus.SelectedValue.ToEntero, DdlSolicitudTipo.SelectedValue.ToEntero, DdlApoyoTipo.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, -1, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
ViewState("DTProspectosSolicitud") = ObjProspectos.DtResultados
Else
Me.GvDatos.DataSource = Nothing
End If
Dim InicioPadre As Integer = 0
If CveProspectoSeleccionado > 0 Then
InicioPadre = CveProspectoSeleccionado
'Dim node As New TreeNode
'node.Text = String.Format("<span>{0} ({1})</span>", dr("NombreCompleto"), dr("Hijos"))
'node.Value = dr("CveProspecto").ToString
'AddNodes(node)
'TV.Nodes.Add(node)
End If
ObjProspectos.Dispose()
UPDatos.Update()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTProspectosSolicitud"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTProspectosSolicitud"), DataTable)
End If
GvDatos.DataBind()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(250)
'e.Row.Cells(1).Width = Unit.Pixel(100)
'e.Row.Cells(2).Width = Unit.Pixel(180)
'e.Row.Cells(3).Width = Unit.Pixel(100)
'e.Row.Cells(4).Width = Unit.Pixel(60)
'e.Row.Cells(5).Width = Unit.Pixel(220)
'e.Row.Cells(6).Width = Unit.Pixel(100)
'e.Row.Cells(7).Width = Unit.Pixel(50)
'e.Row.Cells(8).Width = Unit.Pixel(100)
'e.Row.Cells(9).Width = Unit.Pixel(150)
'e.Row.Cells(10).Width = Unit.Pixel(100)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
'e.Row.FCLiteral("LtlTelefono").Text = "<a class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente=" & e.Row.DBCampo("CveCliente") & """>" & e.Row.FCLiteral("LtlTelefono").Text & "</a>"
End If
End Sub
'Protected Sub LnkDatos_Click(sender As Object, e As EventArgs) Handles LnkDatos.Click
' PnlDatos.Visible = True
' PnlArbol.Visible = False
'End Sub
'Protected Sub LnkArbol_Click(sender As Object, e As EventArgs) Handles LnkArbol.Click
' PnlDatos.Visible = False
' PnlArbol.Visible = True
'End Sub
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
'GvDatos.Columns(0).Visible = ChkNombreCompleto.Checked
'GvDatos.Columns(1).Visible = ChkApellidoPaterno.Checked
'GvDatos.Columns(2).Visible = ChkApellidoMaterno.Checked
'GvDatos.Columns(3).Visible = ChkNombres.Checked
'GvDatos.Columns(4).Visible = ChkEdad.Checked
'GvDatos.Columns(5).Visible = ChkFechaNacimiento.Checked
'GvDatos.Columns(6).Visible = ChkLugarNacimiento.Checked
'GvDatos.Columns(7).Visible = ChkEscolaridad.Checked
'GvDatos.Columns(8).Visible = ChkEstadoCivil.Checked
GvDatos.Columns(0).Visible = ChkSolicitudEstatus.Checked
'GvDatos.Columns(10).Visible = ChkIFE.Checked
'GvDatos.Columns(11).Visible = ChkSeccion.Checked
GvDatos.Columns(1).Visible = ChkSolicitudTipo.Checked
'GvDatos.Columns(13).Visible = ChkPromotor.Checked
'GvDatos.Columns(14).Visible = ChkDependientes.Checked
GvDatos.Columns(2).Visible = ChkCalle.Checked
GvDatos.Columns(3).Visible = ChkNumero.Checked
GvDatos.Columns(4).Visible = ChkEntre.Checked
GvDatos.Columns(5).Visible = ChkColonia.Checked
GvDatos.Columns(6).Visible = ChkMunicipio.Checked
GvDatos.Columns(8).Visible = ChkTelefono.Checked
GvDatos.Columns(9).Visible = ChkCelular.Checked
'GvDatos.Columns(23).Visible = ChkCorreo.Checked
GvDatos.Columns(10).Visible = ChkFechaIng.Checked
UPDatos.Update()
CargaDatos()
End Sub
Protected Sub DdlApoyoTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlApoyoTipo.SelectedIndexChanged
DdlSolicitudEstatus.Items.Clear()
DdlSolicitudEstatus.Items.Add(New ListItem("Todos", "-1"))
DdlSolicitudEstatus.DataSource = GlobalDTProspectosSolicitudesEstatus(UsuarioActual.CveEmpresa) : DdlSolicitudEstatus.DataBind()
End Sub
Protected Sub DdlSolicitudTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSolicitudTipo.SelectedIndexChanged
DdlClasificacion.Items.Clear()
DdlClasificacion.Items.Add(New ListItem("Todos", "-1"))
DdlClasificacion.DataSource = GlobalDTClasificaciones(DdlSolicitudTipo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) : DdlClasificacion.DataBind()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As ImageClickEventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("Listado")
End Sub
End Class