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

82
Prospeccion/Map.html Normal file
View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
</head>
<body>
<div><b id="p1"></b></div>
<div id="map-canvasPart" style="width: 480px; height: 480px;"></div>
</body>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script type="text/javascript">
var map;
//function initialize() {
// //var myLatLng = { lat: 29.078712, lng: -110.989941 };
// var myLatLng = { lat: parseFloat(getQueryVariable("lat")), lng: parseFloat(getQueryVariable("lng")) };
// var title = '';
// if (getQueryVariable("title")) {
// title = getQueryVariable("title");
// document.getElementById("p1").innerHTML = title.replace('%20', ' ');
// }
// var map = new google.maps.Map(document.getElementById('map-canvasPart'), {
// zoom: 16,
// center: myLatLng
// });
// var marker = new google.maps.Marker({
// position: myLatLng,
// map: map,
// title: title
// });
//}
var geocoder;
function initialize() {
geocoder = new google.maps.Geocoder();
var myLatLng = { lat: parseFloat(getQueryVariable("lat")), lng: parseFloat(getQueryVariable("lng")) };
var title = '';
if (getQueryVariable("title")) {
title = getQueryVariable("title");
document.getElementById("p1").innerHTML = title.replace('%20', ' ');
}
map = new google.maps.Map(document.getElementById('map-canvasPart'), {
zoom: 16,
center: myLatLng
});
codeAddress();
}
function codeAddress() {
//debugger;
var address = getQueryVariable("address");
geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: title
});
}
});
}
google.maps.event.addDomListener(window, 'load', initialize);
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) { return pair[1]; }
}
return (false);
}
</script>
</html>

View File

@@ -0,0 +1,111 @@
<%@ Page Title="Ventas - Búsqueda de Prospectos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpBuscarProspectos.aspx.vb" Inherits="PopUpBuscarProspectos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" Runat="Server">
Búsqueda de Prospectos
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" Runat="Server">
<br />
<asp:HiddenField ID="hdnEsThickbox" runat="server" ClientIDMode="Static" />
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table class="Widthall"><%-- border="1" rules="all" style="border-collapse: collapse;"--%>
<tr>
<td class="Titulos" colspan="4">Filtros para búsqueda</td>
</tr>
<tr align="left">
<td class="text-right"><b>Nombre:</b></td>
<td><asp:TextBox ID="TxtNombre" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
<td class="text-right"><b>Empresa:</b></td>
<td><asp:TextBox ID="TxtNombreEmpresa" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
</tr>
<tr align="left">
<td class="text-right">
<b>Teléfono/Celular:</b>
</td>
<td><asp:TextBox ID="txtCelular" runat="server" MaxLength="90" Width="200px"></asp:TextBox></td>
</tr>
<tr>
<td colspan="4" style="text-align: center;">
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" CssClass="btn btn-primary"/>
<asp:Button ID="BtnNuevo" runat="server" Text="Nuevo" CssClass="btn btn-success" Visible="false" OnClientClick="window.opener.document.location.href = '/Prospectos/ProspectosSIP.aspx';window.close();" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table id="TblBusqueda" runat="server" border="0" visible="false">
<tr>
<td align="left">Número de registros encontrados:&nbsp;<b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
</tr>
<tr>
<td>
<div id="DivBeneficiarios" style="overflow-y:auto; width:760px; height:285px;">
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-advance table-hover" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Nombre">
<ItemTemplate>
<div class="truncate" style="width:160px"><asp:HyperLink ID="Hpl" CssClass="Texto" runat="server" NavigateUrl="#" Text='<%# Eval("NombreCompleto")%>' tooltip='<%# Eval("CveProspecto") %>'></asp:HyperLink></div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Empresa">
<ItemTemplate>
<div class="truncate" style="width:125px"><asp:Label runat="server" ID="LblEmpresaNombre" Text='<%# Eval("EmpresaNombre")%>'></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="EmpresaNombre" HeaderText="Empresa"/>--%>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<div class="truncate" style="width:35px"><asp:Label runat="server" ID="LblProspectoTipo" Text='<%# Eval("ProspectoTipo")%>'></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="ProspectoTipo" HeaderText=""/>--%>
<asp:TemplateField HeaderText="Calle">
<ItemTemplate>
<div class="truncate" style="width:130px"><asp:Label runat="server" ID="LblCalle" Text='<%# Eval("Calle")%>'></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Calle" HeaderText="Calle"/>--%>
<asp:TemplateField HeaderText="#">
<ItemTemplate>
<div class="truncate" style="width:65px"><asp:Label runat="server" ID="LblNumero" Text='<%# Eval("Numero")%>'></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Numero" HeaderText="#"/>--%>
<%--<asp:BoundField DataField="Edad" HeaderText="Edad"/>
<asp:BoundField DataField="FechaNacimiento" DataFormatString="{0:d}" HeaderText="F. Nacimiento"/>--%>
<asp:TemplateField HeaderText="Municipio">
<ItemTemplate>
<div class="truncate" style="width:130px"><asp:Label runat="server" ID="LblMunicipio" Text='<%# Eval("Municipio")%>'></asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="Municipio" HeaderText="Municipio"/>--%>
</Columns>
</asp:GridView>
</div>
</td>
</tr>
</table>
<br />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script language="javascript" type="text/javascript">
function Ir(ir) {
gotourl(ir);
window.close();
}
</script>
</asp:Content>

View File

@@ -0,0 +1,73 @@
Option Explicit On
Option Strict On
Imports Extensiones
Partial Class PopUpBuscarProspectos
Inherits ClsPaginas
Private ReadOnly Property OpcionBusqueda As String
Get
Return ViewState("Opt").ToString
End Get
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CType(Me.Master, BaseMasterPage).EsPopup = True
CType(Me.Master, BaseMasterPage).PopupWidth = 800
RegistraScript("$get('tdContenido').style.height='520px'")
TxtNombre.Focus()
ViewState("Opt") = IfNull(Request("Opt"), "")
If OpcionBusqueda = "SIP" Then BtnNuevo.Visible = True
If Not Request("EsThickbox") Is Nothing Then
hdnEsThickbox.Value = Request("EsThickbox")
Else
hdnEsThickbox.Value = "N"
End If
End If
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
Dim ObjProsp As New ClsProspectos()
Dim Nombre As String = "-1"
Dim NombreEmpresa As String = "-1"
Dim Celular As String = "-1"
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim
If txtCelular.Text.Trim <> String.Empty Then Celular = txtCelular.Text.Trim
If ObjProsp.GetProspectosDetalle(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, Nombre, NombreEmpresa, Celular, UsuarioActual.CveEmpresa) Then
If ObjProsp.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjProsp.DtResultados.Rows.Count.ToString.FormatoNumero(0)
GV.DataSource = ObjProsp.DtResultados
Else
LtlTotalRegistros.Text = "0"
GV.DataSource = Nothing
Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If
ObjProsp.Dispose()
GV.DataBind()
UPDatos.Update()
TblBusqueda.Visible = True
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.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(80)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/Prospeccion/Prospectos.aspx?CveProspecto={0}')", e.Row.DBCampo("CveProspecto")))
End If
End Sub
End Class

737
Prospeccion/Prospectos.aspx Normal file
View File

@@ -0,0 +1,737 @@
<%@ Page Title="Expediente del prospecto" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Prospectos.aspx.vb" Inherits="Prospectos_Prospectos" %>
<%@ Register Assembly="AspMapNET" Namespace="AspMap.Web" TagPrefix="cc1" %>
<asp:Content ID="Content4" ContentPlaceHolderID="Css" Runat="Server">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px;
}
</style>
</asp:Content>
<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">
.CaracteristicaClasificacion {
font-size: 18px;
color: #fff;
background-color: gray;
text-align: center;
}
.CaracteristicaTipo {
font-size: 14px;
color: #808080;
background-color: lightgray;
}
</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="TabGenerales" runat="server" HeaderText="Información General">
<ContentTemplate>
<div class="row">
<div class="col-md-8">
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>Datos de Contacto</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<table border="0" cellpadding="1" cellspacing="0">
<tr>
<td>
<asp:TextBox ID="TxtCveProspecto" runat="server" MaxLength="12" Width="150px" Enabled="False" Visible="False"></asp:TextBox></td>
</tr>
<tr>
<td>Nombre(s): </td>
<td>
<asp:TextBox ID="TxtNombres" runat="server" MaxLength="50" Width="150px"></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" Enabled="True"></ajax:ValidatorCalloutExtender>
</td>
<td>A. Paterno: </td>
<td>
<asp:TextBox ID="TxtApellidoPaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)</td>
<td>A. Materno: </td>
<td>
<asp:TextBox ID="TxtApellidoMaterno" runat="server" MaxLength="50" Width="150px"></asp:TextBox>(*)</td>
</tr>
<tr>
<td>Teléfono:</td>
<td>
<asp:TextBox ID="TxtTelefono" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td>Celular: </td>
<td>
<asp:TextBox ID="TxtCelular" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td>Correo: </td>
<td>
<asp:TextBox ID="TxtCorreo" runat="server" MaxLength="100" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Puesto:</td>
<td>
<asp:TextBox ID="TxtEmpresaPuesto" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
<br />
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>Domicilio Particular</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<table border="0">
<tr>
<td>Calle: </td>
<td colspan="3">
<asp:TextBox ID="TxtCalle" runat="server" MaxLength="100" Width="400px"></asp:TextBox></td>
<td>Número: </td>
<td>
<asp:TextBox ID="TxtNumero" runat="server" MaxLength="10"></asp:TextBox></td>
</tr>
<tr>
<td>Entre Calle: </td>
<td>
<asp:TextBox ID="TxtEntreCalle1" runat="server" MaxLength="100" Width="150px"></asp:TextBox></td>
<td>Colonia: </td>
<td>
<asp:TextBox ID="TxtColonia" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td align="center" colspan="2">
<asp:Image ID="ImgVerMapaParticular" runat="server" Height="22px" ImageUrl="~/Imagenes/PinMapBlue32x32.png" Style="cursor: pointer;" ToolTip="Ver Mapa Particular" />
<asp:HyperLink ID="HlMapaParticular" CssClass="Texto " runat="server" Text="Mapa Particular" Visible="False" ImageUrl="/Imagenes/date_add.png" Style="cursor: pointer;" ToolTip="Mapa Particular"></asp:HyperLink>
</td>
</tr>
<tr>
<td>Estado: </td>
<td>
<asp:UpdatePanel ID="UPPEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEstados" CssClass="form-control input-sm select2me" DataTextField="Estado" DataValueField="CveEstado" Width="150px" 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" CssClass="form-control input-sm select2me" DataTextField="Municipio" DataValueField="CveMunicipio" Width="150px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td colspan="2"></td>
</tr>
</table>
<asp:UpdatePanel runat="server" ID="UPMapa" UpdateMode="Conditional">
<ContentTemplate>
<div id="ModalMapa" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Mapa Particular</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<ContentTemplate>
<legend><b>Domicilio Particular</b></legend>
<div id="map-canvasPart" style="width: 480px; height: 480px;"></div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Salir</button>
</div>
</div>
</div>
</div>
<%-- <div id="DivMapaEmpresa" style="width: 335px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table border="0" width="335px" cellpadding="0" cellspacing="0">
<tr class="Titulos">
<td style="width: 330px">Mapa Empresa&nbsp;</td>
<td style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivMapaEmpresa').hide(1000);" /></td>
</tr>
<tr align="left">
<td>
<table>
<tr>
<td>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<script language="javascript" type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script language="javascript" type="text/javascript">
var map;
function initialize() {
//padron
var mapOptions2 = {
zoom: 16,
center: new google.maps.LatLng(29.1058640, -110.9843025)
};
map2 = new google.maps.Map(document.getElementById('map-canvasEmp'), mapOptions2);
var marker2 = new google.maps.Marker({ position: new google.maps.LatLng(29.98428, -105.8640), map: map2, title: 'title' });
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<table>
<tr>
<td>
<div style="width: 490px;">
<fieldset></fieldset>
<legend><b>Empresa</b></legend>
<div id="map-canvasEmp" style="width: 480px; height: 480px;"></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>--%>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<br />
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>Datos de la Empresa</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<table border="0">
<tr>
<td>Nombre</td>
<td colspan="3">
<asp:TextBox ID="TxtEmpresaNombre" runat="server" MaxLength="100" Width="490px"></asp:TextBox></td>
<td>
<asp:Image ID="ImgVerMapaEmpresa" runat="server" ImageUrl="~/Imagenes/PinMapYellow32x32.png" Height="22px" Style="cursor: pointer;" ToolTip="Ver Mapa Empresa" />
<asp:HyperLink ID="HlMapaEmpresa" CssClass="Texto" runat="server" Text="Mapa Empresa" Visible="False" ImageUrl="/Imagenes/date_add.png" Style="cursor: pointer;" ToolTip="Mapa Empresa"></asp:HyperLink></td>
<td></td>
</tr>
<tr>
<td>Calle</td>
<td>
<asp:TextBox ID="TxtEmpresaCalle" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
<td>Número</td>
<td>
<asp:TextBox ID="TxtEmpresaNumero" runat="server" MaxLength="10" Width="150px"></asp:TextBox></td>
<td>Colonia</td>
<td>
<asp:TextBox ID="TxtEmpresaColonia" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
</tr>
<tr>
<td>Estado</td>
<td>
<asp:UpdatePanel ID="UPPEmpresaEstados" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<asp:DropDownList ID="DdlEmpresaEstados" CssClass="form-control input-sm select2me" DataTextField="Estado" DataValueField="CveEstado" idth="150px" 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" CssClass="form-control input-sm select2me" DataTextField="Municipio" DataValueField="CveMunicipio" Width="150px" runat="server"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td colspan="2"></td>
</tr>
<tr>
<td>Teléfono</td>
<td colspan="4">
<asp:TextBox ID="TxtEmpresaTelefono" runat="server" MaxLength="50" Width="150px"></asp:TextBox></td>
</tr>
</table>
</div>
</div>
</div>
<div class="col-md-4">
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>Datos de Prospección</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<table border="0">
<tr>
<td>Clasificación</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DdlProspectoClasificacion" CssClass="form-control input-sm select2me" DataTextField="ProspectoClasificacion" DataValueField="CveProspectoClasificacion" Width="155px" runat="server"></asp:DropDownList></td>
</tr>
<tr>
<td>Vendedor</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" Width="150px"></asp:DropDownList></td>
</tr>
<tr>
<td>Calificación</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DdlCalificacion" CssClass="form-control input-sm select2me" DataTextField="ProspectoTipo" DataValueField="CveProspectoTipo" runat="server" Width="150px"></asp:DropDownList></td>
</tr>
<tr>
<td>Estatus</td>
</tr>
<tr>
<td>
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" DataTextField="ProspectoEstatus" DataValueField="CveProspectoEstatus" runat="server" Width="150px"></asp:DropDownList></td>
</tr>
</table>
</div>
</div>
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>Ubicación</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<cc1:Map ID="Mapa" runat="server" Height="400px" Width="400px" BorderWidth="1px" MapUnit="Meter" oninfotool="Map1_InfoTool"
ImageFormat="Png" EnableSession="false" PixelPerInch="100" ImageTempDirectory="/Temp" BackColor="White" FontQuality="ClearType"
ImageResolution="100" MapTool="Info" ImagePriority="High" PanCursor="url(/imagenes/hand-drag.cur),default" />
<asp:HiddenField ID="HdnIDUbicacion" runat="server" />
<asp:Button ID="BtnCambiaUbicacion" runat="server" Text="Cambiar Ubicación" Visible="false" CssClass="btn btn-primary " />
</div>
</div>
</div>
</div>
<table border="0" class="contenido">
<tr>
<td>
</td>
<td style="vertical-align: top;">
</td>
</tr>
</table>
<table style="width:1000px" border="0" cellpadding="0" cellspacing="0">
<tr><td style="width:1000px">
</td></tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabFormato" runat="server" HeaderText="Formato">
<ContentTemplate>
<div class="row">
<div class="col-md-5">
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
Documentos
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<div class="row">
<div class="col-xs-8 truncate">Apartar Lote</div>
<div class="col-xs-4 truncate">
<asp:LinkButton ID="LnbImprimir" runat="server">Imprimir</asp:LinkButton></div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabDatosTecnicos" runat="server" HeaderText="Datos Técnicos" Visible="false">
<ContentTemplate>
<table border="0" class="contenido">
<tr>
<td>
<asp:GridView ID="GvCaracteristicaClasificaciones" 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="LblCaracteristicaClasificacion" runat="server" Text='<%# Eval("CaracteristicaClasificacion")%>'></asp:Label>
<asp:GridView ID="GvCaracteristicasTipos" ShowHeader="false" OnRowDataBound="GvCaracteristicasTipos_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="LblCaracteristicaTipo" 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" CssClass="form-control input-sm select2me" 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>
</table>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabImagenes" runat="server" HeaderText="Fotografias">
<ContentTemplate>
<asp:Image ID="ImgProspecto1" runat="server" Height="150px" Width="150px" Visible="False" />
<asp:Image ID="ImgProspecto2" runat="server" Height="150px" Width="150px" Visible="False" />
<asp:Image ID="ImgProspecto3" runat="server" Height="150px" Width="150px" Visible="False" />
<asp:Image ID="ImgProspecto4" runat="server" Height="150px" Width="150px" Visible="False" />
<asp:Image ID="ImgProspecto5" runat="server" Height="150px" Width="150px" Visible="False" />
<br />
<asp:GridView ID="GVEventoAgenda" OnRowDataBound="GVEventoAgenda_RowDataBound" runat="server" ShowHeader="false" AutoGenerateColumns="false" DataKeyNames="CveEvento" EmptyDataText="No hay Imágenes para mostrar" ToolTip="Imágenes de los Eventos">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table>
<tr>
<td colspan="3" class="Titulos">
<asp:Label ID="LblEventoAgenda" runat="server" Text='<%# Eval("Asunto") %>'></asp:Label>
</td>
</tr>
<tr>
<td width="150px">
<asp:Image runat="server" Width="150px" Visible='<%# Eval("Imagen1").ToString <> ""%>' ImageUrl='<%# String.Format("/Empresas/{0}/Eventos/Imagenes/{1}", Eval("CveEmpresa"), Eval("Imagen1"))%>' /></td>
<td width="150px">
<asp:Image runat="server" Width="150px" Visible='<%# Eval("Imagen2").ToString <> ""%>' ImageUrl='<%# String.Format("/Empresas/{0}/Eventos/Imagenes/{1}", Eval("CveEmpresa"), Eval("Imagen2"))%>' /></td>
<td width="150px">
<asp:Image runat="server" Width="150px" Visible='<%# Eval("Imagen3").ToString <> ""%>' ImageUrl='<%# String.Format("/Empresas/{0}/Eventos/Imagenes/{1}", Eval("CveEmpresa"), Eval("Imagen3"))%>' /></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</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" CssClass="btn btn-primary" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnEliminar" CssClass="btn btn-danger" runat="server" Text="Eliminar" Visible="False" />
<asp:Button ID="BtnCancelar" CssClass="btn btn-danger" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/Prospectos/CatProspectosG15.aspx';return false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
</ContentTemplate>
</asp:UpdatePanel>
<br />
</td>
</tr>
</table>
<br />
<div id="TblEventoBitacora" runat="server">
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<b>BITÁCORA</b>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<asp:HyperLink ID="hpl" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' style='font-weight: 700 !important;' ><span class='caption-subject bold'>Agregar</span></i>" Style="cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
<asp:HyperLink ID="HlEvento" CssClass="" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' style='font-weight: 700 !important;' >Agendar</i>" ToolTip="Agendar"></asp:HyperLink>
<a href="javascript:;" class="expand"></a>
</div>
</div>
<div class="portlet-body " style="padding-top: 0px; margin-top: -5px;">
<asp:UpdatePanel ID="UPEventoBitacora" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVEventoBitacora" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado comentarios o bitácora" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha Agenda</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaA" runat="server" Text='<%# Eval("FechaInicio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Usuario</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Descripción</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlEventoBitacora" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Estatus</HeaderTemplate>
<ItemTemplate>
<asp:LinkButton ID="LtlEventoEstatus" CssClass="Texto" runat="server" CommandName="Concluir" OnClientClick="return confirm('Está seguro de concluir la agenda?')" CommandArgument='<%# Eval("CveEvento") %>' Text="Concluir" Visible='<%# Eval("CveTipoEvento").ToString = "2" And Eval("CveEventoEstatus").ToString = "1" %>' OnClick="LtlEventoEstatus_Click"></asp:LinkButton>
<asp:LinkButton ID="LbEventoEstatusRevisar" CssClass="Texto" runat="server" CommandName="Revisar" OnClientClick="return confirm('Está seguro de haber revisado la agenda?')" CommandArgument='<%# Eval("CveEvento") %>' Text="Revisar" Visible='<%# Eval("CveTipoEvento").ToString = "2" And Eval("CveEventoEstatus").ToString = "2"%>' OnClick="LbEventoEstatusRevisar_Click"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="Titulos" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<RowStyle CssClass="Texto" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div id="ModalBitacora" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Bitácora</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UPAddEventoBitacora" UpdateMode="Conditional">
<ContentTemplate>
Bitácora/Observaciones<br />
<asp:TextBox ID="TxtEventoDescripcion" runat="server" TextMode="MultiLine" Columns="60" Rows="4"></asp:TextBox> <br />
<div id="DivEventoBitacora" style="width: 335px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
<table border="0" width="335px" cellpadding="0" cellspacing="0">
<tr class="Titulos">
<td style="width: 330px">&nbsp;</td>
<td style="padding-right: 4px; padding-top: 4px" valign="top">
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivEventoBitacora').hide(1000);" /></td>
</tr>
<tr align="left">
<td>
<table>
<tr>
<td></td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr style="height: 25px">
<td align="center" colspan="2">
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:Button ID="BtnGuardarEventoBitacora" CssClass ="btn btn-primary" runat="server" ClientIDMode="Static" Text="Guardar" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<br />
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function getparticular() {
var string = "";
var s = "";
s = $('#<%= TxtCalle.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string = s;
}
s = $('#<%= TxtNumero.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string =string + '+' + s;
}
s = $('#<%= TxtEntreCalle1.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}
s = $('#<%= TxtColonia.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}
string = string + ',Hermosillo' + ',Son' ;
<%-- s = $('#<%# DdlEstados.ClientID %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}
s = $('#<%# DdlMunicipios.ClientID %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}--%>
return string;
}
function getEmpresa() {
var string = "";
var s = "";
s = $('#<%= TxtEmpresaCalle.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string = s;
}
s = $('#<%= TxtEmpresaNumero.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string =string + '+' + s;
}
s = $('#<%= TxtEmpresaColonia.ClientID.ToString %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}
string = string + ',Hermosillo' + ',Son' ;
<%-- s = $('#<%# DdlEstados.ClientID %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}
s = $('#<%# DdlMunicipios.ClientID %>').val().replace(' ', '+');
if (s.length > 0) {
string = string + ',' + s;
}--%>
return string;
}
</script>
</asp:Content>

View File

@@ -0,0 +1,897 @@
Imports System.Data
Imports System.Drawing
Imports AspMap
Imports Extensiones
Imports AspMap.Web
Partial Class Prospectos_Prospectos
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 Property IDSeleccionados As ArrayList
Get
Return CType(ViewState("IDSeleccionados"), ArrayList)
End Get
Set(value As ArrayList)
ViewState("IDSeleccionados") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
IDSeleccionados = New ArrayList
'' set the transparency of the main map image to display other layers over the satellite map
Mapa.ImageFormat = ImageFormat.Png
Mapa.ImageOpacity = 0.8
DdlProspectoClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlProspectoClasificacion.DataBind() : DdlProspectoClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlCalificacion.DataSource = GlobalDTProspectosTipos(UsuarioActual.CveEmpresa) : DdlCalificacion.DataBind() : DdlCalificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) : DdlVendedor.DataBind() : DdlVendedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlEstatus.DataSource = GlobalDTProspectosEstatus(UsuarioActual.CveEmpresa) : DdlEstatus.DataBind()
' DdlEscolaridad.DataSource = GlobalDTEscolaridad(UsuarioActual.CveEmpresa) : DdlEscolaridad.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:"
ImgVerMapaParticular.Attributes.Add("onclick", "javascript:AbrirVentana('/Prospeccion/Map.html?title=Domicilio Particular&lat=29.078712&lng=-110.989941&address='+getparticular(),510,510,'Mapa')")
ImgVerMapaEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('/Prospeccion/Map.html?title=Domicilio Empresa&lat=29.1058640&lng=-110.9843025&address='+getEmpresa(),510,510,'Mapa')")
'ImgVerMapaParticular.Attributes.Add("onclick", "javascript:AbrirVentana('https://www.google.com.mx/maps/place/'+getparticular(),510,510,'Mapa')")
'ImgVerMapaEmpresa.Attributes.Add("onclick", "javascript:AbrirVentana('https://www.google.com.mx/maps/place/'+getEmpresa(),510,510,'Mapa')")
HlEvento.Visible = True
HlEvento.NavigateUrl = "javascript:AbrirVentana('/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveProspecto=" & CveProspecto & "',980,547,'Poup Agenda');"
'"AbrirVentana('/Prospeccion/PopUpBuscarProspectos.aspx',980,547,'popBuscarProspectos');"
'CargaProspectoValoress(CveProspecto)
'CargaCaracteristicasClasificaciones()
CargaImagenesEvento()
'cambiar el vendedor
If UsuarioActual.TienePermisoProceso(89) Then
DdlVendedor.Enabled = True
Else
DdlVendedor.Enabled = False
End If
Else
CargaEstados(DdlEstados, 1)
DdlEstados.SelectedValue = "26"
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
DdlMunicipios.SelectedValue = "1919"
CargaEstados(DdlEmpresaEstados, 1)
DdlEmpresaEstados.SelectedValue = "26"
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
DdlEmpresaMunicipios.SelectedValue = "1919"
ViewState("CveProspecto") = -1
CargaProspectoValoress(CveProspecto)
End If
End If
CargaMapa()
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
LtlProspectos.Text = "" & ObjProspectos.Nombres & " " & ObjProspectos.ApellidoMaterno & " " & ObjProspectos.ApellidoPaterno
TxtCalle.Text = ObjProspectos.Calle
TxtNumero.Text = ObjProspectos.Numero
TxtEntreCalle1.Text = ObjProspectos.EntreCalle1
TxtColonia.Text = ObjProspectos.Colonia
CargaEstados(DdlEstados, 1)
DdlEstados.SelectedValue = ObjProspectos.CveEstado.ToString
CargaMunicipios(DdlMunicipios, DdlEstados.SelectedValue.ToEntero)
DdlMunicipios.SelectedValue = ObjProspectos.CveMunicipio.ToString
DdlVendedor.SelectedValue = ObjProspectos.CveVendedor.ToString
DdlCalificacion.SelectedValue = ObjProspectos.CveProspectoTipo.ToString
DdlProspectoClasificacion.SelectedValue = ObjProspectos.CveProspectoClasificacion.ToString
DdlEstatus.SelectedValue = ObjProspectos.CveProspectoEstatus.ToString
TxtTelefono.Text = ObjProspectos.Telefono
TxtCelular.Text = ObjProspectos.Celular
TxtCorreo.Text = ObjProspectos.Correo
CargaEstados(DdlEmpresaEstados, 1)
DdlEmpresaEstados.SelectedValue = ObjProspectos.CveEmpresaEstado.ToString
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
DdlEmpresaMunicipios.SelectedValue = ObjProspectos.CveEmpresaMunicipio.ToString
DdlEstatus.SelectedValue = ObjProspectos.CveProspectoEstatus.ToString
TxtEmpresaCalle.Text = ObjProspectos.EmpresaCalle
TxtEmpresaNombre.Text = ObjProspectos.EmpresaNombre
TxtEmpresaNumero.Text = ObjProspectos.EmpresaNumero
TxtEmpresaColonia.Text = ObjProspectos.EmpresaColonia
TxtEmpresaPuesto.Text = ObjProspectos.EmpresaPuesto
TxtEmpresaTelefono.Text = ObjProspectos.EmpresaTelefono
If ObjProspectos.Imagen1 <> "" Then ImgProspecto1.Visible = True : ImgProspecto1.ImageUrl = String.Format("/Empresas/{0}/Prospectos/Imagenes/{1}-1.jpg", ObjProspectos.CveEmpresa, CveProspecto)
If ObjProspectos.Imagen2 <> "" Then ImgProspecto2.Visible = True : ImgProspecto2.ImageUrl = String.Format("/Empresas/{0}/Prospectos/Imagenes/{1}-2.jpg", ObjProspectos.CveEmpresa, CveProspecto)
If ObjProspectos.Imagen3 <> "" Then ImgProspecto3.Visible = True : ImgProspecto3.ImageUrl = String.Format("/Empresas/{0}/Prospectos/Imagenes/{1}-3.jpg", ObjProspectos.CveEmpresa, CveProspecto)
If ObjProspectos.Imagen4 <> "" Then ImgProspecto4.Visible = True : ImgProspecto4.ImageUrl = String.Format("/Empresas/{0}/Prospectos/Imagenes/{1}-4.jpg", ObjProspectos.CveEmpresa, CveProspecto)
If ObjProspectos.Imagen5 <> "" Then ImgProspecto5.Visible = True : ImgProspecto5.ImageUrl = String.Format("/Empresas/{0}/Prospectos/Imagenes/{1}-5.jpg", ObjProspectos.CveEmpresa, CveProspecto)
If ObjProspectos.DtResultados.Rows(0)("IDGis").ToString <> "" Then
IDSeleccionados.Add(ObjProspectos.DtResultados.Rows(0)("IDGis").ToString)
End If
'Permiso Eliminar
If UsuarioActual.TienePermisoProceso(78) Then BtnEliminar.Visible = True Else BtnEliminar.Visible = False
CargaEventoBitacora()
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
Private Sub CargaCoordinadores(ddl As DropDownList, CveSupervisor As Integer)
ddl.DataSource = GlobalDTProspectosCoordinadores(CveSupervisor, -1) : ddl.DataBind()
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, Now, "", "", "", 0, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "",
TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, -1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 0 Then
ViewState("CveProspecto") = ObjProspectos.CveProspecto
ObjProspectos.UpdateProspectosGis(HdnIDUbicacion.Value.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto)
Alert("El Prospecto se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Inicio.aspx"";")
End If
Else
If ObjProspectos.UpdateProspectos(-1, TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim,
TxtNombres.Text.Trim, Now, "", "", "", 0, TxtCalle.Text.Trim,
TxtNumero.Text.Trim, "", TxtEntreCalle1.Text.Trim, "", TxtColonia.Text.Trim, -1.ToEntero, DdlMunicipios.SelectedValue.ToEntero,
TxtTelefono.Text.Trim, TxtCelular.Text.Trim, "", "", TxtCorreo.Text.Trim, "", "", "", -1, DdlProspectoClasificacion.SelectedValue.ToEntero, -1, TxtEmpresaNombre.Text.Trim, "", "", "",
TxtEmpresaCalle.Text.Trim, TxtEmpresaNumero.Text.Trim, TxtEmpresaColonia.Text.Trim, "", DdlEmpresaMunicipios.SelectedValue.ToEntero, TxtEmpresaTelefono.Text.Trim, "", "", TxtEmpresaPuesto.Text.Trim, "", False, "", "", "", "", -1, "", -1, -1, -1, "", -1, 0, 1, "", 0, "", DdlVendedor.SelectedValue.ToEntero, DdlCalificacion.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then
UpDatos.Update()
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
End If
ObjProspectos.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)
End If
ObjProspectos.Dispose()
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 DdlEmpresaEstados_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEmpresaEstados.SelectedIndexChanged
CargaMunicipios(DdlEmpresaMunicipios, DdlEmpresaEstados.SelectedValue.ToEntero)
UPPEmpresaMunicipios.Update()
End Sub
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVEventoBitacora.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(200)
e.Row.Cells(1).Width = Unit.Pixel(200)
e.Row.Cells(2).Width = Unit.Pixel(100)
e.Row.Cells(3).Width = Unit.Pixel(500)
End If
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
End If
End Sub
Protected Sub BtnGuardarEventoBitacora_Click(sender As Object, e As EventArgs) Handles BtnGuardarEventoBitacora.Click
Dim ObjEventoBitacora As New ClsOIEventos
If ObjEventoBitacora.AddEventoBitacora(TxtEventoDescripcion.Text.Trim, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, CveProspecto, -1, -1, -1, -1, -1) Then
GVEventoBitacora.DataSource = ObjEventoBitacora.DtResultados
TxtEventoDescripcion.Text = ""
Alert("La bitácora/observación se guardó correctamente", TipoMensaje.MsgInformacion)
End If
ObjEventoBitacora.Dispose()
GVEventoBitacora.DataBind()
UPEventoBitacora.Update()
CargaEventoBitacora()
End Sub
Private Sub CargaEventoBitacora()
Dim ObjEventoBitacora As New ClsOIEventos()
If ObjEventoBitacora.GetAgendaBitacora(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto:=CveProspecto) Then
GVEventoBitacora.DataSource = ObjEventoBitacora.DtResultados.FiltraParametros("CveTipoEvento = 6 OR CveTipoEvento = 2")
Else
GVEventoBitacora.DataSource = Nothing
End If
GVEventoBitacora.DataBind()
End Sub
#End Region
#Region "D A T O S - T E C N I C O S "
Protected Sub CargaCaracteristicasClasificaciones()
Dim objClasificaciones As New ClsProspectos
If objClasificaciones.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
GvCaracteristicaClasificaciones.DataSource = objClasificaciones.DtResultados
GvCaracteristicaClasificaciones.DataBind()
End If
objClasificaciones.Dispose()
End Sub
Protected Sub CargaProspectoValoress(CveProspecto As Integer)
Dim Prosp As New ClsProspectos
If Prosp.GetProspectoValores(CveProspecto, UsuarioActual.CveEmpresa) Then
DTProspectosValores = Prosp.DtResultados
End If
Prosp.Dispose()
End Sub
Protected Sub GvCaracteristicaClasificaciones_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCaracteristicaClasificaciones.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCaracteristicaClasificacion").ToEntero > 1 Then
e.Row.FCLabel("LblCaracteristicaClasificacion").CssClass = "CaracteristicaClasificacion"
End If
With e.Row.FCGridView("GvCaracteristicasTipos")
.DataSource = DTProspectosValores.FiltraParametros(String.Format("CveCaracteristicaClasificacion = {0}", e.Row.DBCampo("CveCaracteristicaClasificacion")), DistinctColumns:={"CveCaracteristicaTipo", "CaracteristicaTipo"})
.DataBind()
End With
'Dim objCaracteristicasTipos As New ClsProspectos
'If objCaracteristicasTipos.GetTiposCaracteristicas(UsuarioActual.CveEmpresa) Then
' With e.Row.FCGridView("GvCaracteristicasTipos")
' .DataSource = objCaracteristicasTipos.DtResultados.FiltraParametros("CveCaracteristicaClasificacion = " + e.Row.DBCampo("CveCaracteristicaClasificacion"))
' .DataBind()
' End With
'End If
'objCaracteristicasTipos.Dispose()
End If
End Sub
Protected Sub GvCaracteristicasTipos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCaracteristicaTipo").ToEntero > 1 Then
e.Row.FCLabel("LblCaracteristicaTipo").CssClass = "CaracteristicaTipo"
End If
With e.Row.FCGridView("GvCaracteristicas")
.DataSource = DTProspectosValores.FiltraParametros(String.Format("CveCaracteristicaTipo = {0}", e.Row.DBCampo("CveCaracteristicaTipo")), DistinctColumns:={"CveCaracteristica", "Caracteristica", "EsOpcion", "CveValor", "CveOpcion", "Valor"})
.DataBind()
End With
'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 CveOpcion As Integer = If(e.Row.DBCampo("CveOpcion") <> "", e.Row.DBCampo("CveOpcion").ToEntero, -1)
Dim CveValor As Integer = If(e.Row.DBCampo("CveValor") <> "", e.Row.DBCampo("CveValor").ToEntero, -1)
Dim Valor As String = If(e.Row.DBCampo("Valor") <> "", e.Row.DBCampo("Valor"), "")
e.Row.FCHiddenField("HdnCveValor").Value = CveValor.ToString
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 '---------------------DDL
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 '---------------------RB
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 '---------------------------------------------------------------F E C H A
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
#End Region
Protected Sub LtlEventoEstatus_Click(sender As Object, e As EventArgs)
Dim Lnk As LinkButton = CType(sender, LinkButton)
Dim OI As New ClsOIEventos
If OI.UpdateEstatusEvento(2, -1, Lnk.CommandArgument.ToString.ToEntero, UsuarioActual.CveUsuario) Then
Alert("Agenda Concluida", TipoMensaje.MsgInformacion)
End If
OI.Dispose()
CargaEventoBitacora()
End Sub
Protected Sub LbEventoEstatusRevisar_Click(sender As Object, e As EventArgs)
Dim Lnk As LinkButton = CType(sender, LinkButton)
Dim OI As New ClsOIEventos
If OI.UpdateEstatusEvento(3, -1, Lnk.CommandArgument.ToString.ToEntero, UsuarioActual.CveUsuario) Then
Alert("Agenda Revisada", TipoMensaje.MsgInformacion)
End If
OI.Dispose()
CargaEventoBitacora()
End Sub
#Region "Formatos Imprimir"
Protected Sub LnbImprimir_Click(sender As LinkButton, e As EventArgs) Handles LnbImprimir.Click
'Dim oWordApp As Microsoft.Office.Interop.Word.Application = Nothing
'Dim oWordDoc As Microsoft.Office.Interop.Word.Document = Nothing
'Dim objSelection As Microsoft.Office.Interop.Word.Selection = Nothing
'Const wdCharacter As Integer = 1
'Dim ArchivoPath As String = ""
'Try
' 'GuardaLog("Inicia Petición de Aplicación")
' oWordApp = New Microsoft.Office.Interop.Word.Application
' oWordApp.Visible = True
' oWordDoc = oWordApp.Documents.Open(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Prospectos\" & "ApartarLote.doc")
' 'GuardaLog("Inicia Petición de Documento")
' If oWordDoc IsNot Nothing Then
' 'GuardaLog("Creación de Documento")
' oWordDoc.Activate()
' objSelection = oWordApp.Selection
' objSelection.WholeStory()
' objSelection.Copy()
' objSelection.Delete(Unit:=wdCharacter, Count:=1)
' 'GuardaLog("Recorrer de reemplazo de variables")
' objSelection.PasteAndFormat(Microsoft.Office.Interop.Word.WdRecoveryType.wdPasteDefault)
' ReemplazaTexto(objSelection, "{NOMBRE}", String.Format("{0} {1} {2}", TxtApellidoPaterno.Text.Trim, TxtApellidoMaterno.Text.Trim, TxtNombres.Text.Trim))
' ReemplazaTexto(objSelection, "{DIRECCION}", String.Format("{0} {1} ", TxtCalle.Text.Trim, TxtNumero.Text.Trim))
' ReemplazaTexto(objSelection, "{CP}", "83000")
' ReemplazaTexto(objSelection, "{CIUDAD}", DdlMunicipios.SelectedItem.Text)
' ReemplazaTexto(objSelection, "{ESTADO}", DdlEstados.SelectedItem.Text)
' 'objSelection.InsertBreak(Type:=wdPageBreak)
' 'GuardaLog("Termina de reemplazo de variables")
' objSelection.TypeBackspace()
' objSelection.TypeBackspace()
' If Not System.IO.Directory.Exists(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\") Then
' System.IO.Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory & "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\")
' End If
' ArchivoPath = AppDomain.CurrentDomain.BaseDirectory & "Temp\" & UsuarioActual.CveUsuario & ".doc"
' oWordDoc.SaveAs(ArchivoPath.ToString)
' oWordDoc.Close()
' Else
' Alert("No se pudo generar el archivo", TipoMensaje.MsgError)
' End If
'Catch ex As Exception
' Alert(ex.Message, TipoMensaje.MsgError)
' OnError("", ex)
' ArchivoPath = ""
'Finally
' If oWordDoc IsNot Nothing Then
' 'GuardaLog("Documento Destruido")
' While (Runtime.InteropServices.Marshal.ReleaseComObject(oWordDoc) > 0)
' End While
' 'GuardaLog("Documento Destruido")
' oWordDoc = Nothing
' End If
' If oWordApp IsNot Nothing Then
' oWordApp.Quit(False)
' While (Runtime.InteropServices.Marshal.ReleaseComObject(oWordApp) > 0)
' End While
' 'GuardaLog("Aplicación Destruida")
' oWordApp = Nothing
' End If
' System.GC.Collect()
' objSelection = Nothing
'End Try
'If ArchivoPath <> "" Then
' Dim Archivo As New System.IO.FileInfo(ArchivoPath)
' 'If Archivo.Exists Then
' 'HttpContext.Current.Response.Clear()
' 'HttpContext.Current.Response.ClearContent()
' ''HttpContext.Current.Response.ContentType = "application/msword"
' 'HttpContext.Current.Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
' 'HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" & Archivo.Name)
' 'HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
' 'HttpContext.Current.Response.TransmitFile(ArchivoPath)
' 'HttpContext.Current.Response.Flush()
' 'HttpContext.Current.Response.End()
' RegistraScript("AbrirVentana('/Ventas/PopUpImprimir.aspx?RH=True&Ext=" & Archivo.Extension & "', 700, 400, 'N', 'ImpRH')")
' 'End If
' Archivo = Nothing
'End If
End Sub
'Private Sub ReemplazaTexto(ByRef ObjSelection As Microsoft.Office.Interop.Word.Selection, ByVal Texto As String, ByVal Reemplazar As String)
' With ObjSelection.Find
' .Text = Texto
' .Replacement.Text = Reemplazar
' .Forward = True
' .Wrap = Microsoft.Office.Interop.Word.WdFindWrap.wdFindContinue
' .Format = False
' .MatchCase = True
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
' End With
' ObjSelection.Find.Execute(Replace:=Microsoft.Office.Interop.Word.WdReplace.wdReplaceAll)
'End Sub
#End Region
#Region " F O T O G R A F I A S"
Protected Sub CargaImagenesEvento()
Dim ObjEventosAgenda As New ClsOIEventos
If ObjEventosAgenda.GetEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, CveProspecto, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, -1, -1, UsuarioActual.CveEmpresa) Then
GVEventoAgenda.DataSource = ObjEventosAgenda.DtResultados.FiltraParametros("Imagen1 <> '' OR Imagen2 <> '' OR Imagen3 <> ''")
GVEventoAgenda.DataBind()
End If
ObjEventosAgenda.Dispose()
End Sub
Protected Sub GvEventoAgenda_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(200)
End If
End If
End Sub
#End Region
#Region "M a p a"
Private Sub CargaMapa()
Dim dbLayer As AspMap.Layer
Dim feature As AspMap.Feature
'Dim FillColor, LineColor As Color
Mapa.RemoveAllLayers()
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.LightGray
' feature.Symbol.Size = 12
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DodgerBlue
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
' If Not Page.IsPostBack Then Mapa.Extent = dbLayer.Extent : Mapa.Extent.Inflate(50, 50)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DodgerBlue
' feature.Symbol.FillColor = Color.LightGray
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DarkGray
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.FillColor = ColorTranslator.FromHtml("#FF9E78")
' feature.Symbol.Size = 0
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 8
' feature.MinScale = 700
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 10
' feature.MaxScale = 700
' feature.MinScale = 450
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 14
' feature.MaxScale = 449
' feature.MinScale = 200
' dbLayer.Renderer.Add(feature)
' dbLayer.LabelField = "TEXTSTRING"
' dbLayer.LabelExpression = "REPLACE(TEXTSTRING,""Z"","""")"
' dbLayer.ShowLabels = True
' dbLayer.Symbol.Size = 0
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 12
' feature.LabelFont.Bold = True
' feature.MinScale = 700
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 14
' feature.LabelFont.Bold = True
' feature.MaxScale = 700
' feature.MinScale = 450
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 20
' feature.LabelFont.Bold = True
' feature.MaxScale = 449
' feature.MinScale = 200
' dbLayer.Renderer.Add(feature)
' dbLayer.LabelField = "TEXTSTRING"
' dbLayer.ShowLabels = True
' dbLayer.Symbol.Size = 0
'End If
dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", AppDomain.CurrentDomain.BaseDirectory, 1))
dbLayer.Name = "Stand"
If dbLayer IsNot Nothing Then
'If Not dbLayer.AddRelate("FID_", DTApartados, "IDGis") Then
'End If
'feature = New AspMap.Feature()
''el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
'feature.Expression = String.Format("CveCliente > 0")
'feature.Symbol.FillColor = ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.LineColor = ColorTranslator.FromHtml("#E5E5E5")
'dbLayer.Renderer.Add(feature)
If IDSeleccionados.Count > 0 Then
For Each s As String In IDSeleccionados
feature = New AspMap.Feature()
'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
feature.Expression = String.Format("FID_ = {0}", s)
feature.Symbol.FillColor = Color.DarkRed
feature.Symbol.LineColor = Color.Red
dbLayer.Renderer.Add(feature)
Next
End If
'feature = New AspMap.Feature()
''el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
'feature.Expression = String.Format("Tipo = 1")
'feature.Symbol.FillColor = Color.LightGray 'ColorTranslator.FromHtml("#52A5A5")
'feature.Symbol.LineColor = Color.CadetBlue
'dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 10")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#1BA39C")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#1BBC9B")
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 30")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#C49F47")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#F4D03F")
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 300")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#E5E5E5")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#525E64")
dbLayer.Renderer.Add(feature)
'feature = New AspMap.Feature()
'feature.Expression = String.Format("Tipo = 4")
'feature.Symbol.FillColor = Color.LightGray ' ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.LineColor = ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.Size = 1
'dbLayer.Renderer.Add(feature)
'Dim records As AspMap.Recordset = dbLayer.SearchShape(Mapa.Extent, SearchMethod.Inside)
'Do While Not records.EOF
' Dim tooltip As String = "<b>75m2</b><br><b>5 x 5 </b> "
' ' Mapa.Hotspots.Add(records.RecordExtent.Center, 15, tooltip)
' records.MoveNext()
'Loop
feature = New AspMap.Feature()
feature.LabelFont.Size = 7
feature.MinScale = 700
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.LabelFont.Size = 10
feature.MaxScale = 700
feature.MinScale = 450
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.LabelFont.Size = 14
feature.MaxScale = 449
feature.MinScale = 200
dbLayer.Renderer.Add(feature)
'dbLayer.LabelField = "CLAVE"
'dbLayer.LabelExpression = "REPLACE(CLAVE,""Z"","""")"
'dbLayer.ShowLabels = True
'dbLayer.Symbol.Size = 0
'If Not Page.IsPostBack Then
' 'If Mapa.Markers.Count > 0 Then
' Mapa.ZoomScale(dbLayer.Recordset.RecordExtent.Center, 5500000)
' 'End If
'End If
End If
End Sub
Protected Sub Map1_InfoTool(ByVal sender As Object, ByVal e As InfoToolEventArgs)
Dim records As AspMap.Recordset = Mapa.Identify(e.InfoPoint, 10)
If records.Layer.Name = "Stand" Then
' CargaInformacion(records("ID").ToString.ToEntero)
IDSeleccionados.Clear()
If records("FID_").ToString.toentero > 30 Then
IDSeleccionados.Add(records("FID_").ToString)
HdnIDUbicacion.Value = records("FID_").ToString
If CveProspecto > 0 Then BtnCambiaUbicacion.Visible = True
Else
BtnCambiaUbicacion.Visible = False
Alert("El lote se encuentra apartado/vendido")
End If
' solo los de a zona oro y platino
'If records("CveCliente").ToString.ToEntero = 0 And Not IDSeleccionados.Contains(records("ID").ToString) Then
' If records("Tipo").ToString.ToEntero.Contiene(2, 3) Then
' IDSeleccionados.Add(records("ID").ToString)
' Dim dr As DataRow = TmpDT.NewRow
' Dim Zona As String = ""
' Dim Stand As String = ""
' Dim CvePS As Integer = 0
' 'Select Case records("Tipo").ToString.ToEntero
' ' Case 1 : Zona = "ZONA COBRE" : CvePS = 38255
' ' Case 2 : Zona = "ZONA ORO" : CvePS = 38253
' ' Case 3 : Zona = "ZONA PLATINO" : CvePS = 38252
' ' Case 4 : Zona = "ZONA PLATA" : CvePS = 38254
' 'End Select
' 'Dim Rst As Recordset = Mapa("Texto").SearchShape(records.Shape, SearchMethod.Inside)
' 'If Not Rst.EOF() Then
' ' Stand = Rst("TEXTSTRING").ToString.Replace("Z", "")
' 'End If
' dr("IDGis") = records("ID").ToString.ToEntero
' dr("Tipo") = records("Tipo").ToString.ToEntero
' dr("Zona") = Zona
' dr("Clave") = records("Clave").ToString.Replace("Z", "")
' dr("CvePS") = CvePS
' TmpDT.Rows.Add(dr)
' End If
'Else
' IDSeleccionados.Remove(records("ID").ToString)
' Dim i As Integer = -1
' For Each drr As DataRow In TmpDT.Rows
' i += 1
' If drr("IDGis").ToString = records("ID").ToString Then
' Exit For
' End If
' Next
' TmpDT.Rows.RemoveAt(i)
' TmpDT.AcceptChanges()
'End If
''BtnApartar.Visible = TmpDT.Rows.Count > 0
'divSel.Visible = TmpDT.Rows.Count > 0
'GvSel.DataSource = TmpDT
'GvSel.DataBind()
CargaMapa()
End If
End Sub
Private Sub BtnCambiaUbicacion_Click(sender As Object, e As EventArgs) Handles BtnCambiaUbicacion.Click
Dim Prosp As New ClsProspectos
If Prosp.UpdateProspectosGis(HdnIDUbicacion.Value.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProspecto) Then
Alert("La Ubicación ha sido guardada.")
End If
Prosp.Dispose()
End Sub
'Private Sub CargaInformacion(ByVal pCveID As Integer)
' RegistraScript("$get('DivAlta').style.display=''; $(""#DivAlta"").center(); ")
' CveID = pCveID
' CargaMapa()
'End Sub
#End Region
End Class

View File

@@ -0,0 +1,81 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProspeccion.aspx.vb" Inherits="Prospeccion_RepProspeccion" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
<asp:HyperLink runat="server" NavigateUrl="/Prospeccion/Prospectos.aspx" ID="HplAddCotizacion"> <i class="fa fa-plus"></i> Agregar Prospecto</asp:HyperLink>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="UPEncabezado" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" />
</div>
<div class="titlefiltros caption ">
<div class="row" style="padding-top: 10px;">
<label class="col-md-1 truncate"> Vendedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="Vendedor" DataValueField="CveVendedor">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" DataTextField="ProspectoEstatus" DataValueField="CveProspectoEstatus" runat="server" Width="150px"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Clasificación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProspectoClasificacion" CssClass="form-control input-sm select2me" DataTextField="ProspectoClasificacion" DataValueField="CveProspectoClasificacion" Width="155px" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Agrupador:</label>
<div class="col-md-2">
<asp:DropDownList ID="DDlGrupo" CssClass="form-control input-sm select2me" Width="80px" runat="server">
<asp:ListItem Value="1" Selected="true" Text="Vendedor"></asp:ListItem>
<asp:ListItem Value="2" Text="Clasificación"></asp:ListItem>
<asp:ListItem Value="3" Text="Estatus"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<%--<asp:GridView ID="GVDatos2" runat="server"></asp:GridView>--%>
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CveVendedor,CveEstatus,CveClasificacion" AutoGenerateColumns="false" CssClass ="table table-hover table-advance" style="min-width:500px;" GridLines="none" EmptyDataText="No hay Datos" ToolTip=" ">
<Columns>
<asp:TemplateField HeaderText="Agrupador">
<ItemTemplate>
<asp:HyperLink ID="HplLink" Target="_blank" runat="server"><%# Eval("Agrupador") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<ItemTemplate>
<asp:HyperLink ID="HplLink2" Target="_blank" runat="server"><%# Eval("Total") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

View File

@@ -0,0 +1,49 @@

Imports Extensiones
Partial Class Prospeccion_RepProspeccion
Inherits ClsPaginas
'Confinguración
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) : DdlVendedor.DataBind() : DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlEstatus.DataSource = GlobalDTProspectosEstatus(UsuarioActual.CveEmpresa) : DdlEstatus.DataBind() : DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProspectoClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlProspectoClasificacion.DataBind() : DdlProspectoClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
CargaDatos()
End If
End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero
Dim CveClasificacion As Integer = DdlProspectoClasificacion.SelectedValue.ToEntero
Dim CveEstatus As integer=DdlEstatus.SelectedValue.ToEntero
Dim Gpo As Integer = DDlGrupo.SelectedValue.ToEntero
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
Dim ObjPros As New ClsProspectos
If ObjPros.GetRepProspeccion(CveVendedor, CveClasificacion, CveEstatus, Gpo, CveEmpresa) Then
GVDatos.DataSource = ObjPros.DtResultados
GVDatos.DataBind()
End If
ObjPros.Dispose()
UpDatos.Update()
End Sub
Private Sub GVDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim CveVendedor As String = e.Row.DataKey("CveVendedor")
Dim CveClasificacion As String = e.Row.DataKey("CveClasificacion")
Dim CveEstatus As String = e.Row.DataKey("CveEstatus")
'CveVendedor,CveEstatus,CveClasificacion
Dim hl1 As HyperLink = e.Row.FCHyperLink("HplLink")
Dim hl2 As HyperLink = e.Row.FCHyperLink("HplLink2")
hl1.NavigateUrl = String.Format("/prospeccion/RepProspeccionDetalle.aspx?CveVendedor={0}&CveEstatus={1}&CveClasificacion={2}", CveVendedor, CveEstatus, CveClasificacion)
hl2.NavigateUrl = String.Format("/prospeccion/RepProspeccionDetalle.aspx?CveVendedor={0}&CveEstatus={1}&CveClasificacion={2}", CveVendedor, CveEstatus, CveClasificacion)
End If
End Sub
End Class

View File

@@ -0,0 +1,83 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProspeccionDetalle.aspx.vb" Inherits="Prospeccion_RepProspeccionDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
<asp:HyperLink runat="server" NavigateUrl="/Prospeccion/Prospectos.aspx" ID="HplAddCotizacion"> <i class="fa fa-plus"></i> Agregar Prospecto</asp:HyperLink>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="UPEncabezado" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Consultar" />
</div>
<div class="titlefiltros caption ">
<div class="row" style="padding-top: 10px;">
<label class="col-md-1 truncate"> Vendedor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" Style="max-width: 200px" DataTextField="Vendedor" DataValueField="CveVendedor">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" DataTextField="ProspectoEstatus" DataValueField="CveProspectoEstatus" runat="server" Width="150px"></asp:DropDownList>
</div>
<label class="col-md-1 truncate">Clasificación:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlProspectoClasificacion" CssClass="form-control input-sm select2me" DataTextField="ProspectoClasificacion" DataValueField="CveProspectoClasificacion" Width="155px" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<asp:GridView ID="GVDatos2" runat="server"></asp:GridView>--%>
<asp:GridView ID="GVDatos" runat="server" AutoGenerateColumns="false" CssClass ="table table-hover table-advance Widthall" GridLines="none" EmptyDataText="No hay Datos" ToolTip=" ">
<Columns>
<asp:TemplateField HeaderText="Nombre Completo">
<ItemTemplate>
<asp:HyperLink ID="HplProspecto" Target="_blank" NavigateUrl='<%# String.Format("/Prospeccion/Prospectos.aspx?CveProspecto={0}", Eval("CveProspecto")) %>' runat="server"><%# Eval("NombreCompleto") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Telefono" HeaderText="Telefono" />
<asp:BoundField DataField="TelefonoOtro" HeaderText="Telefono Otro" />
<asp:TemplateField HeaderText="Domicilio">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ciudad">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
</asp:Content>

View File

@@ -0,0 +1,76 @@

Imports Extensiones
Partial Class Prospeccion_RepProspeccionDetalle
Inherits ClsPaginas
'Confinguración
#Region "Propiedades"
Private Property CveVendedor As Integer
Get
Return If(IsNothing(ViewState("CveVendedor")), -1, ViewState("CveVendedor").ToString.ToEntero)
End Get
Set(value As Integer)
ViewState("CveVendedor") = value
End Set
End Property
Private Property CveClasificacion As Integer
Get
Return If(IsNothing(ViewState("CveClasificacion")), -1, ViewState("CveClasificacion").ToString.ToEntero)
End Get
Set(value As Integer)
ViewState("CveClasificacion") = value
End Set
End Property
Private Property CveEstatus As Integer
Get
Return If(IsNothing(ViewState("CveEstatus")), -1, ViewState("CveEstatus").ToString.ToEntero)
End Get
Set(value As Integer)
ViewState("CveEstatus") = value
End Set
End Property
#End Region
Private Function RequestValue(Name As String, DefaultValue As Integer) As Integer
If Not IsNothing(Request(Name)) AndAlso IsNumeric(Request(Name)) Then
Return Request(Name).ToString.ToEntero
End If
Return DefaultValue
End Function
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CveVendedor = RequestValue("CveVendedor", CveVendedor)
CveClasificacion = RequestValue("CveClasificacion", CveClasificacion)
CveEstatus = RequestValue("CveEstatus", CveEstatus)
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) : DdlVendedor.DataBind() : DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
DdlEstatus.DataSource = GlobalDTProspectosEstatus(UsuarioActual.CveEmpresa) : DdlEstatus.DataBind() : DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProspectoClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlProspectoClasificacion.DataBind() : DdlProspectoClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlVendedor.SelectedValueExist(CveVendedor.ToString())
DdlEstatus.SelectedValueExist(CveEstatus.ToString())
DdlProspectoClasificacion.SelectedValueExist(CveClasificacion.ToString())
CargaDatos()
End If
End Sub
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero
Dim CveClasificacion As Integer = DdlProspectoClasificacion.SelectedValue.ToEntero
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
Dim ObjPros As New ClsProspectos
If ObjPros.GetRepProspeccionDetalle(CveVendedor, CveClasificacion, CveEstatus, CveEmpresa) Then
GVDatos.DataSource = ObjPros.DtResultados
GVDatos.DataBind()
End If
ObjPros.Dispose()
UpDatos.Update()
End Sub
End Class

View File

@@ -0,0 +1,138 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepProspectosGIS.aspx.vb" Inherits="Prospeccion_RepProspectosGIS" %>
<%@ Register Assembly="AspMapNET" Namespace="AspMap.Web" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Gráfico
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="UPPGIS" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<table style="width:1000px" border="0" cellpadding="0" cellspacing="0">
<tr><td style="width:1000px"><cc1:Map ID="Mapa" runat="server" Height="700px" Width="994px" BorderWidth="1px" MapUnit="Meter" oninfotool="Map1_InfoTool" ImageFormat="Png" EnableSession="false" PixelPerInch="100" ImageTempDirectory="/Temp" BackColor="White" FontQuality="ClearType" ImageResolution="100" MapTool="Info" ImagePriority="High" PanCursor="url(/imagenes/hand-drag.cur),default" />
</td>
<td style="vertical-align: top;">
<div style="z-index: 1000; border: 1px solid; ">
<table width="200px" cellpadding="0" cellspacing="0" style="font-family: Century Gothic, verdana; font-size:12px;">
<tr><td colspan="3">&nbsp;&nbsp; Ubicaciones <br/><br/></td></tr>
<tr><td ><img width="25px" height="20px" border="0px" src="/Imagenes/transparente.gif" style="background-color:#1BA39C;" /></td><td>Vendidos</td><td> &nbsp;&nbsp;&nbsp;&nbsp;8</td></tr>
<tr><td><img width="25px" height="20px" border="0px" src="/Imagenes/transparente.gif" style="background-color:#C49F47;" /></td><td>Apartados</td><td> &nbsp;&nbsp; 20</td></tr>
<tr><td><img width="25px" height="20px" border="0px" src="/Imagenes/transparente.gif" style="background-color:#E87E04;" /></td><td>Ubicados</td><td> &nbsp;&nbsp; 10</td></tr>
</table>
</div>
<br/><br/>
<%--<div id="divSel" runat="server" Visible="False" style="position:absolute; left:700px; top:10px; z-index: 1000; border: 1px solid; height: 125px; overflow-y:scroll; background-color:white; ">
<asp:GridView ID="GvSel" runat="server" Visible="True" Font-Names="Century Gothic" Font-Size="10" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<Columns>
<asp:TemplateField >
<ItemTemplate>
<asp:Literal ID="LitZona" runat="server" Text='<%# string.format("{0}",Eval("Zona")) %>' />
</ItemTemplate>
<HeaderTemplate>
<asp:Literal ID="LitSel" runat="server"></asp:Literal>
</HeaderTemplate>
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:Literal ID="LitClave" runat="server" Text='<%# string.format("{0}",Eval("Clave")) %>' />
</ItemTemplate>
<HeaderTemplate>
</HeaderTemplate>
<ItemStyle Width="100px"></ItemStyle>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</div>
<asp:Button ID="BtnApartar2" runat="server" Text="Apartar" Visible="False" Font-Names="Century Gothic" Font-Size="10" /> --%>
</td></tr>
</table>
<div id="DivRegistracliente" style="display:none; font-family: Century Gothic, verdana; background-color:white; z-index: 5000; font-size:12px; border: 1px gray solid; box-shadow: 10px 10px 5px #888888; ">
<table border="0" cellpadding="0" width="894px">
<tr> <td colspan="4" style="background-color:#5D7B9D; text-align: center; height: 20px;">
<asp:Label ID="Label3" Font-Bold="True" runat="server" Text="Datos de Facturación" ForeColor="White"></asp:Label></td></tr>
<tr>
<td>Razón Social</td><td>
<asp:TextBox ID="TxtFiscalRazon" Width="250px" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVRazon" runat="server" Display="None" ControlToValidate="TxtFiscalRazon" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Razón Social''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERazon" runat="server" HighlightCssClass="vco" TargetControlID="RFVRazon" Width="300px"/>
</td>
<td>RFC</td><td>
<asp:TextBox ID="TxtFiscalRFC" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVRFC" runat="server" Display="None" ControlToValidate="TxtFiscalRFC" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''RFC''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCERFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVRFC" Width="300px"/>
</td>
</tr>
<tr>
<td>Calle</td><td>
<asp:TextBox ID="TxtFiscalCalle" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCalle" runat="server" Display="None" ControlToValidate="TxtFiscalCalle" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Calle''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCalle" Width="300px"/>
</td>
<td>Número</td><td>
<asp:TextBox ID="TxtFiscalNumero" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" Display="None" ControlToValidate="TxtFiscalNumero" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Número''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CVENumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"/>
</td>
</tr>
<tr>
<td>Num. Int.</td><td>
<asp:TextBox ID="TxtFiscalNumeroInterior" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
</td>
<td>Colonia</td><td>
<asp:TextBox ID="TxtFiscalColonia" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVColonia" runat="server" Display="None" ControlToValidate="TxtFiscalColonia" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Colonia''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEColonia" runat="server" HighlightCssClass="vco" TargetControlID="RFVColonia" Width="300px"/>
</td>
</tr>
<tr> <td>CP</td><td>
<asp:TextBox ID="TxtFiscalCP" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCP" runat="server" Display="None" ControlToValidate="TxtFiscalCP" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Código Postal''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiscalCP" runat="server" HighlightCssClass="vco" TargetControlID="RFVCP" Width="300px"/>
</td>
<td>Localidad</td><td>
<asp:TextBox ID="TxtLocalidad" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVLocalidad" runat="server" Display="None" ControlToValidate="TxtLocalidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Localidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCELocalidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVLocalidad" Width="300px"/>
</td>
</tr>
<tr>
<td>Ciudad</td><td>
<asp:TextBox ID="TxtFiscalCiudad" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCiudad" runat="server" Display="None" ControlToValidate="TxtFiscalCiudad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ciudad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRegistro"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECiudad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCiudad" Width="300px"/>
</td>
<td>Estado</td><td>
<asp:DropDownList ID="DdlFiscalEstado" DataTextField="Estado" DataValueField="CveEstado" runat="server" Font-Names="Century Gothic" Font-Size="11"></asp:DropDownList>
</td>
</tr>
<tr><td colspan="4" style="text-align:center;">
<asp:Button ID="BtnRegistroCliente" runat="server" Text="Registrar Cliente" Font-Names="Century Gothic" Font-Size="11" ValidationGroup="GrpRegistro"/> <asp:Button ID="BtnCancelar" OnClientClick="$get('DivRegistracliente').style.display='none'; return false;" runat="server" Text="Cancelar" Font-Names="Century Gothic" Font-Size="11" ValidationGroup="GrpRegistro" /></td></tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

View File

@@ -0,0 +1,468 @@
Imports System.Data
Imports System.Drawing
Imports AspMap
Imports Extensiones
Imports AspMap.Web
Partial Class Prospeccion_RepProspectosGIS
Inherits ClsPaginas
#Region "Propiedades"
Private Property TmpDT As DataTable
Get
Return CType(ViewState("TmpDT"), DataTable)
End Get
Set(value As DataTable)
ViewState("TmpDT") = value
End Set
End Property
Private Property DTPS As DataTable
Get
Return CType(ViewState("DTPS"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTPS") = value
End Set
End Property
Private Property DTApartados As DataTable
Get
Return CType(ViewState("DTApartados"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTApartados") = value
End Set
End Property
Private Property CveID As Integer
Get
Return ViewState("CveID").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveID") = value
End Set
End Property
Private Property IDSeleccionados As ArrayList
Get
Return CType(ViewState("IDSeleccionados"), ArrayList)
End Get
Set(value As ArrayList)
ViewState("IDSeleccionados") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CveID = 0
IDSeleccionados = New ArrayList
'' set the transparency of the main map image to display other layers over the satellite map
Mapa.ImageFormat = ImageFormat.Png
Mapa.ImageOpacity = 0.8
TmpDT = New DataTable
TmpDT.Columns.Add("IDGis", GetType(Integer))
TmpDT.Columns.Add("Tipo", GetType(Double))
TmpDT.Columns.Add("Zona", GetType(String))
TmpDT.Columns.Add("Clave", GetType(String))
TmpDT.Columns.Add("CvePS", GetType(Integer))
DdlFiscalEstado.DataSource = GlobalDTGralEstados(1) : DdlFiscalEstado.DataBind()
CargaVendidos()
End If
CargaMapa()
End Sub
Private Sub CargaVendidos()
Dim AIM As New ClsAIMMGM
If AIM.GetStand() Then
DTApartados = AIM.DtResultados
End If
AIM.Dispose()
'carga las ventas
' Dim CveCliente As Integer
'Dim dtt As DataTable = DTApartados.FiltraParametros("", DistinctColumns:={"CveCliente"})
'For Each drr As DataRow In dtt.Rows
' Dim Errorr As Boolean = False
' Dim Venta As New ClsVentas
' Venta.IniciaTransacSQL()
' Dim dtc As DataTable = DTApartados.FiltraParametros("CveCliente = " & drr("CveCliente").ToString)
' If Venta.AddVenta("Rem", 0, drr("CveCliente").ToString.ToEntero, -1, dtc.SUM("Precio"), 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, Now, "", "", Now, -1, -1, "", "", "", 0, 0, 0, DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, -1, -1, 0, 0, 43) Then
' Dim CveVenta As Integer = Venta.CveVenta
' For Each dr As DataRow In dtc.Rows
' Dim CveUnidadMedida As Integer
' Dim Importe As Double = 0
' Dim PS As New ClsProductosServicios
' If PS.GetPS(dr("CvePS").ToString.ToEntero, -1, 43) Then
' If PS.DtResultados.Rows.Count > 0 Then
' CveUnidadMedida = PS.DtResultados.Rows(0)("CveUnidadMedida").ToString.ToEntero
' End If
' End If
' PS.Dispose()
' If Not Venta.AddVentaDetalle(CveVenta, dr("CvePS").ToString.ToEntero, 1, CveUnidadMedida, dr("Precio").ToString.ToDouble, 0, dr("Precio").ToString.ToDouble, dr("Clave").ToString, 0, 0, -1) Then
' Errorr = True
' Exit Sub
' Else
' 'If Not AIM.AddStand(dr("IDGis").ToString.ToEntero, CveCliente, dr("Clave").ToString, dr("CvePS").ToString.ToEntero, Venta.CveVentaDetalle) Then
' ' Errorr = True
' 'End If
' End If
' Next
' Else
' Errorr = True
' End If
' If Not Errorr Then
' Venta.Commit()
' Alert("Su Apartado se ha realizado correctamente.", TipoMensaje.MsgInformacion)
' Else
' Venta.RollBack()
' End If
' Venta.Dispose()
'Next
'AIM.Dispose()
End Sub
#Region "M a p a"
Private Sub CargaMapa()
Dim dbLayer As AspMap.Layer
Dim feature As AspMap.Feature
'Dim FillColor, LineColor As Color
Mapa.RemoveAllLayers()
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Accesos.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.LightGray
' feature.Symbol.Size = 12
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DodgerBlue
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
' If Not Page.IsPostBack Then Mapa.Extent = dbLayer.Extent : Mapa.Extent.Inflate(50, 50)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Edificios2.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DodgerBlue
' feature.Symbol.FillColor = Color.LightGray
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Cajones_Polyline.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.LineColor = Color.DarkGray
' feature.Symbol.Size = 1
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lineas.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Symbol.FillColor = ColorTranslator.FromHtml("#FF9E78")
' feature.Symbol.Size = 0
' dbLayer.Renderer.Add(feature)
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Texto.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 8
' feature.MinScale = 700
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 10
' feature.MaxScale = 700
' feature.MinScale = 450
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 14
' feature.MaxScale = 449
' feature.MinScale = 200
' dbLayer.Renderer.Add(feature)
' dbLayer.LabelField = "TEXTSTRING"
' dbLayer.LabelExpression = "REPLACE(TEXTSTRING,""Z"","""")"
' dbLayer.ShowLabels = True
' dbLayer.Symbol.Size = 0
'End If
'dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\TextoEspecial.shp", AppDomain.CurrentDomain.BaseDirectory, 43))
'If dbLayer IsNot Nothing Then
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 12
' feature.LabelFont.Bold = True
' feature.MinScale = 700
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 14
' feature.LabelFont.Bold = True
' feature.MaxScale = 700
' feature.MinScale = 450
' dbLayer.Renderer.Add(feature)
' feature = New AspMap.Feature()
' feature.LabelFont.Size = 20
' feature.LabelFont.Bold = True
' feature.MaxScale = 449
' feature.MinScale = 200
' dbLayer.Renderer.Add(feature)
' dbLayer.LabelField = "TEXTSTRING"
' dbLayer.ShowLabels = True
' dbLayer.Symbol.Size = 0
'End If
dbLayer = Mapa.AddLayer(String.Format("{0}Empresas\{1}\GIS\Lotes.shp", AppDomain.CurrentDomain.BaseDirectory, 1))
dbLayer.Name = "Stand"
If dbLayer IsNot Nothing Then
If Not dbLayer.AddRelate("FID_", DTApartados, "IDGis") Then
End If
'feature = New AspMap.Feature()
''el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
'feature.Expression = String.Format("CveCliente > 0")
'feature.Symbol.FillColor = ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.LineColor = ColorTranslator.FromHtml("#E5E5E5")
'dbLayer.Renderer.Add(feature)
'If IDSeleccionados.Count > 0 Then
' For Each s As String In IDSeleccionados
' feature = New AspMap.Feature()
' 'el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
' feature.Expression = String.Format("FID_ = {0}", s)
' feature.Symbol.FillColor = Color.DarkRed
' feature.Symbol.LineColor = Color.Red
' dbLayer.Renderer.Add(feature)
' Next
'End If
'feature = New AspMap.Feature()
''el campo de la bd es: CveSubTipoQueja, pero cuando se genera el SHP, corta las columnas a 10 caracteres
'feature.Expression = String.Format("Tipo = 1")
'feature.Symbol.FillColor = Color.LightGray 'ColorTranslator.FromHtml("#52A5A5")
'feature.Symbol.LineColor = Color.CadetBlue
'dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 10")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#1BA39C")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#1BBC9B")
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 30")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#C49F47")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#F4D03F")
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 40")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#E87E04")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#F7CA18")
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.Expression = String.Format("FID_ < 300")
feature.Symbol.FillColor = ColorTranslator.FromHtml("#E5E5E5")
feature.Symbol.LineColor = ColorTranslator.FromHtml("#525E64")
dbLayer.Renderer.Add(feature)
'feature = New AspMap.Feature()
'feature.Expression = String.Format("Tipo = 4")
'feature.Symbol.FillColor = Color.LightGray ' ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.LineColor = ColorTranslator.FromHtml("#E9EDEF")
'feature.Symbol.Size = 1
'dbLayer.Renderer.Add(feature)
'Dim records As AspMap.Recordset = dbLayer.SearchShape(Mapa.Extent, SearchMethod.Inside)
'Do While Not records.EOF
' Dim tooltip As String = "<b>75m2</b><br><b>5 x 5 </b> "
' ' Mapa.Hotspots.Add(records.RecordExtent.Center, 15, tooltip)
' records.MoveNext()
'Loop
feature = New AspMap.Feature()
feature.LabelFont.Size = 7
feature.MinScale = 700
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.LabelFont.Size = 10
feature.MaxScale = 700
feature.MinScale = 450
dbLayer.Renderer.Add(feature)
feature = New AspMap.Feature()
feature.LabelFont.Size = 14
feature.MaxScale = 449
feature.MinScale = 200
dbLayer.Renderer.Add(feature)
'dbLayer.LabelField = "CLAVE"
'dbLayer.LabelExpression = "REPLACE(CLAVE,""Z"","""")"
'dbLayer.ShowLabels = True
'dbLayer.Symbol.Size = 0
'If Not Page.IsPostBack Then
' 'If Mapa.Markers.Count > 0 Then
' Mapa.ZoomScale(dbLayer.Recordset.RecordExtent.Center, 5500000)
' 'End If
'End If
End If
End Sub
Protected Sub Map1_InfoTool(ByVal sender As Object, ByVal e As InfoToolEventArgs)
Response.Redirect("/Prospeccion/RepProspeccion.aspx")
'Dim records As AspMap.Recordset = Mapa.Identify(e.InfoPoint, 10)
'If records.Layer.Name = "Stand" Then
' ' CargaInformacion(records("ID").ToString.ToEntero)
' ' RegistraScript("AbrirVentana('/Prospeccion/RepProspectosGis.aspx')")
' ' Server.Transfer("/Prospeccion/RepProspectosGis.aspx")
' Response.Redirect("/Prospeccion/RepProspectosGis.aspx")
' ' solo los de a zona oro y platino
' 'If records("CveCliente").ToString.ToEntero = 0 And Not IDSeleccionados.Contains(records("ID").ToString) Then
' ' If records("Tipo").ToString.ToEntero.Contiene(2, 3) Then
' ' IDSeleccionados.Add(records("ID").ToString)
' ' Dim dr As DataRow = TmpDT.NewRow
' ' Dim Zona As String = ""
' ' Dim Stand As String = ""
' ' Dim CvePS As Integer = 0
' ' 'Select Case records("Tipo").ToString.ToEntero
' ' ' Case 1 : Zona = "ZONA COBRE" : CvePS = 38255
' ' ' Case 2 : Zona = "ZONA ORO" : CvePS = 38253
' ' ' Case 3 : Zona = "ZONA PLATINO" : CvePS = 38252
' ' ' Case 4 : Zona = "ZONA PLATA" : CvePS = 38254
' ' 'End Select
' ' 'Dim Rst As Recordset = Mapa("Texto").SearchShape(records.Shape, SearchMethod.Inside)
' ' 'If Not Rst.EOF() Then
' ' ' Stand = Rst("TEXTSTRING").ToString.Replace("Z", "")
' ' 'End If
' ' dr("IDGis") = records("ID").ToString.ToEntero
' ' dr("Tipo") = records("Tipo").ToString.ToEntero
' ' dr("Zona") = Zona
' ' dr("Clave") = records("Clave").ToString.Replace("Z", "")
' ' dr("CvePS") = CvePS
' ' TmpDT.Rows.Add(dr)
' ' End If
' 'Else
' ' IDSeleccionados.Remove(records("ID").ToString)
' ' Dim i As Integer = -1
' ' For Each drr As DataRow In TmpDT.Rows
' ' i += 1
' ' If drr("IDGis").ToString = records("ID").ToString Then
' ' Exit For
' ' End If
' ' Next
' ' TmpDT.Rows.RemoveAt(i)
' ' TmpDT.AcceptChanges()
' 'End If
' 'BtnApartar.Visible = TmpDT.Rows.Count > 0
' 'divSel.Visible = TmpDT.Rows.Count > 0
' 'GvSel.DataSource = TmpDT
' 'GvSel.DataBind()
' CargaMapa()
'End If
End Sub
'Private Sub CargaInformacion(ByVal pCveID As Integer)
' RegistraScript("$get('DivAlta').style.display=''; $(""#DivAlta"").center(); ")
' CveID = pCveID
' CargaMapa()
'End Sub
#End Region
End Class