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

112
SCT/Licencias.aspx Normal file
View File

@@ -0,0 +1,112 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Licencias.aspx.vb" Inherits="SCT_Licencias" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
<asp:ImageButton ToolTip="Nuevo Usuarios" ID="ImgAddUsuario" ImageUrl="/Imagenes/BotonAgregar.gif" PostBackUrl="LicenciasDetalle.aspx" CommandArgument="-1" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
Listado de Licencias
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<script language="javascript" type="text/javascript">
function C() {
return confirm('¿Está seguro que desea eliminar el Usuario?');
}
function AsignaPermisos(Rol) {
$get("LblUsrEdit").innerText = Rol;
$("#DivPermisos").show();
$("#DivPermisos").center();
}
function AsignaProcesos(Rol) {
$get("LblProcesoEdit").innerText = Rol;
$("#DivProcesos").show();
$("#DivProcesos").center();
}
$(function () {
$("#DivPermisos").draggable();
});
</script>
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="1" rules="all" style="border-collapse: collapse;">
<tr class="Titulos">
<td width="80px"><asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="Licencia"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgUsuario" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="140px"><asp:LinkButton ID="LbNombre" runat="server" CausesValidation="false" Text="Apellido Paterno"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgNombre" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="140px"><asp:LinkButton ID="LbRol" runat="server" CausesValidation="false" Text="Apellido Materno"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgRol" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="250px"><asp:LinkButton ID="LBCorreo" runat="server" CausesValidation="false" Text="Nombres"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgCorreo" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="150px"><asp:LinkButton ID="LnkEmpresa" runat="server" CausesValidation="false" Text="Tipo Licencia"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEmpresa" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="90px"><asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="Expedicion"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgEstatus" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
<td width="90px"><asp:LinkButton ID="LbFecha" runat="server" CausesValidation="false" Text="Vencimiento"></asp:LinkButton>&nbsp;<asp:ImageButton ID="ImgFecha" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se Encontró Usuarios Registrado" ToolTip="Listado de Usuarios">
<Columns>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:LinkButton ID="LtlLicencia" runat="server" Text='<%# Eval("NumeroLicencia", "{0}")%>' PostBackUrl="LicenciasDetalle.aspx" CommandArgument='<%# Eval("CveLicencia")%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LBUsuario" runat="server" Text='<%# Eval("ApellidoPaterno") %>' ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LBUsuario2" runat="server" Text='<%# Eval("ApellidoMaterno") %>' ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LBUsuario3" runat="server" Text='<%# Eval("Nombres")%>' ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlRol" runat="server" Text='<%# Eval("TipoLicencia", "{0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlCorreo" runat="server" Text='<%# Eval("FechaExpedicion", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlEmoresa" runat="server" Text='<%# Eval("FechaVencimiento","{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
<asp:HiddenField ID="HdnCveUsuario" runat="server" Value="0" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>La información se está procesando...</td>
</tr>
<tr>
<td><img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" /></td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

250
SCT/Licencias.aspx.vb Normal file
View File

@@ -0,0 +1,250 @@
Imports System.Data
Imports System.Drawing
Imports Extensiones
Partial Class SCT_Licencias
Inherits ClsPaginas
Public ReadOnly Property CurrentLicencia() As Integer
Get
Return HdnCveUsuario.Value.ToEntero
End Get
End Property
#Region "Permisos"
Private Property PermisoEditar As Boolean
Get
Return CType(ViewState("PermisoEditar"), Boolean)
End Get
Set(value As Boolean)
ViewState("PermisoEditar") = value
End Set
End Property
Private Property PermisoModulos As Boolean
Get
Return CType(ViewState("PermisoModulos"), Boolean)
End Get
Set(value As Boolean)
ViewState("PermisoModulos") = value
End Set
End Property
Private Property PermisoProcesos As Boolean
Get
Return CType(ViewState("PermisoProcesos"), Boolean)
End Get
Set(value As Boolean)
ViewState("PermisoProcesos") = value
End Set
End Property
Private Property PermisoRestablecerContraseña As Boolean
Get
Return CType(ViewState("PermisoProcesos"), Boolean)
End Get
Set(value As Boolean)
ViewState("PermisoProcesos") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
ViewState("Orden") = ""
ViewState("OUsr") = "Usuario DESC"
ViewState("OPwd") = "Contraseña DESC"
ViewState("ONom") = "Nombre DESC"
ViewState("ORol") = "Rol DESC"
ViewState("OCorreo") = "Correo DESC"
ViewState("OSupervisa") = "Supervisa DESC"
ViewState("OAutoriza") = "Autoriza DESC"
ViewState("OEmpresa") = "Empresa DESC"
ViewState("OEst") = "Estatus DESC"
ViewState("OFech") = "FechaIng DESC"
ViewState("OUsuarioCreo") = "UsuarioCreo DESC"
ViewState("CveRol") = -1
'CargaRoles()
CargaDatos()
End If
End Sub
Private Sub CargaGrid(ByVal Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(GlobalDTUsuarios, "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = GlobalDTUsuarios
End If
GvDatos.DataBind()
UpDatos.Update()
End Sub
Public Sub CargaDatos()
Dim TipoLicencia As String = If(Request("TipoLicencia") IsNot Nothing, Request("TipoLicencia").ToString, "-1")
Dim NumeroLicencia As String = If(Request("NumeroLicencia") IsNot Nothing, Request("NumeroLicencia").ToString, "")
Dim FechaExpInicio As String = If(Request("FechaExpInicio") IsNot Nothing, Request("FechaExpInicio").ToString, "")
Dim FechaExpFin As String = If(Request("FechaExpFin") IsNot Nothing, Request("FechaExpFin").ToString, "")
Dim Lic As New ClsSCTLicencias
Dim dtt As DataTable = Nothing
If Lic.GetLicencias(-1, TipoLicencia, NumeroLicencia, FechaExpInicio, FechaExpFin) Then
dtt = Lic.DtResultados
Else
GvDatos.DataSource = Nothing
End If
Lic.Dispose()
GvDatos.DataSource = dtt
GvDatos.DataBind()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
HdnCveUsuario.Value = e.CommandArgument.ToString
End Sub
Protected Sub GvDatos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowState = DataControlRowState.Alternate OrElse e.Row.RowState = DataControlRowState.Normal Then
If e.Row.RowIndex <= 1 Then
e.Row.Cells(0).Width = Unit.Pixel(80)
e.Row.Cells(1).Width = Unit.Pixel(136)
e.Row.Cells(2).Width = Unit.Pixel(137)
e.Row.Cells(3).Width = Unit.Pixel(245)
e.Row.Cells(4).Width = Unit.Pixel(143)
e.Row.Cells(5).Width = Unit.Pixel(80)
e.Row.Cells(6).Width = Unit.Pixel(80)
'e.Row.Cells(7).Width = Unit.Pixel(75)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
'e.Row.FCLiteral("LtlUsuario").Text = "<a class=""Texto"" href=""/Sistemas/UsuarioDetalle.aspx?CveUsuario=" & e.Row.DBCampo("CveUsuario") & """>" & e.Row.FCLiteral("LtlUsuario").Text & "</a>"
End If
End If
End Sub
#Region "Ordenamiento"
Protected Sub LbUsuario_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LbUsuario.Click, ImgUsuario.Click
If ViewState("OUsr").ToString() = "Usuario DESC" Then
ViewState("OUsr") = "Usuario ASC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OUsr") = "Usuario DESC"
ImgUsuario.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OUsr")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbNombre_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LbNombre.Click, ImgNombre.Click
If ViewState("ONom").ToString() = "Nombre DESC" Then
ViewState("ONom") = "Nombre ASC"
ImgNombre.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("ONom") = "Nombre DESC"
ImgNombre.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("ONom")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbRol_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LbRol.Click, ImgRol.Click
If ViewState("ORol").ToString() = "Rol DESC" Then
ViewState("ORol") = "Rol ASC"
ImgRol.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("ORol") = "Rol DESC"
ImgRol.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("ORol")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbCorreo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LBCorreo.Click, ImgCorreo.Click
If ViewState("OCorreo").ToString() = "Correo DESC" Then
ViewState("OCorreo") = "Correo ASC"
ImgRol.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OCorreo") = "Correo DESC"
ImgRol.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OCorreo")
CargaGrid(ViewState("Orden").ToString)
End Sub
Protected Sub LbEmpresa_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LnkEmpresa.Click, ImgEmpresa.Click
If ViewState("OEmpresa").ToString() = "Empresa DESC" Then
ViewState("OEmpresa") = "Empresa ASC"
ImgRol.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEmpresa") = "Empresa DESC"
ImgRol.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEmpresa")
CargaGrid(ViewState("Orden").ToString)
End Sub
Protected Sub LbEstatus_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LbEstatus.Click, ImgEstatus.Click
If ViewState("OEst").ToString() = "Estatus DESC" Then
ViewState("OEst") = "Estatus ASC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OEst") = "Estatus DESC"
ImgEstatus.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OEst")
CargaGrid(ViewState("Orden").ToString())
End Sub
Protected Sub LbFecha_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LbFecha.Click, ImgFecha.Click
If ViewState("OFech").ToString() = "FechaIng DESC" Then
ViewState("OFech") = "FechaIng ASC"
ImgFecha.ImageUrl = "/Imagenes/FlechasArriba.gif"
Else
ViewState("OFech") = "FechaIng DESC"
ImgFecha.ImageUrl = "/Imagenes/FlechasAbajo.gif"
End If
ViewState("Orden") = ViewState("OFech")
CargaGrid(ViewState("Orden").ToString())
End Sub
#End Region
Protected Sub ImgAddUsuario_Click(sender As Object, e As ImageClickEventArgs) Handles ImgAddUsuario.Click
HdnCveUsuario.Value = "-1"
End Sub
End Class

134
SCT/LicenciasDetalle.aspx Normal file
View File

@@ -0,0 +1,134 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="LicenciasDetalle.aspx.vb" Inherits="SCT_LicenciasDetalle" %>
<%@ PreviousPageType VirtualPath="Licencias.aspx" %>
<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 Permisos y Licencias"></asp:Literal>&nbsp;<asp:Literal ID="LtlUsuarios" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<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>
<table border="0" class="contenido">
<tr>
<td>
<div>
<fieldset>
<legend><b>Datos del Solicitante</b></legend>
<table border="0">
<tr>
<td>Apellido Paterno:</td>
<td>
<asp:TextBox ID="TxtUsuario" runat="server" Width="200"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVUsuario" runat="server" ControlToValidate="TxtUsuario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEUsuario" runat="server" HighlightCssClass="vco" TargetControlID="RFVUsuario" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Apellido Materno:</td>
<td>
<asp:TextBox ID="TxtContraseña" runat="server" Width="200"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVContraseña" runat="server" ControlToValidate="TxtContraseña" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Contraseña del Usuario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEContraseña" runat="server" HighlightCssClass="vco" TargetControlID="RFVContraseña" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Nombres:</td>
<td>
<asp:TextBox ID="TxtNombre" runat="server" Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombre" runat="server" ControlToValidate="TxtNombre" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre del ActivoFijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombre" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombre" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Fecha Nacimiento:</td>
<td>
<asp:TextBox ID="TxtFechaNacimiento" runat="server" Width="80px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="ImageButton2" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaNacimiento" PopupButtonID="ImageButton2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha Expedición''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
</tr>
<tr>
<td>CURP:</td>
<td>
<asp:TextBox ID="TxtCorreo" runat="server" Width="200px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCorreo" runat="server" ControlToValidate="TxtCorreo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo del ActivoFijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECorreo" runat="server" HighlightCssClass="vco" TargetControlID="RFVCorreo" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Teléfono Emergencia:</td>
<td>
<asp:TextBox ID="TxtTelefonoEmergencia" runat="server" Width="200px"></asp:TextBox>
</tr>
<tr>
<td>Tipo Licencia:</td>
<td>
<asp:DropDownList ID="DdlRol" runat="server" Width="206px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Pasaje y exclusivo de turismo" Value="Pasaje y exclusivo de turismo"></asp:ListItem>
<asp:ListItem Text="Carga Trailer" Value="Carga Trailer"></asp:ListItem>
<asp:ListItem Text="Carga de 2 o 3 ejes" Value="Carga de 2 o 3 ejes"></asp:ListItem>
<asp:ListItem Text="Chofer Guia Turistas" Value="Chofer Guia Turistas"></asp:ListItem>
<asp:ListItem Text="Carga de Materiales y residuos peligrosos" Value="Carga de Materiales y residuos peligrosos"></asp:ListItem>
<asp:ListItem Text="Puertos y aeropuertos" Value="Puertos y aeropuertos"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>Número de Licencia:</td>
<td>
<asp:TextBox ID="TxtNumeroLicencia" runat="server" Width="200px"></asp:TextBox>
</tr>
<tr>
<td>Expedición:</td>
<td>
<asp:TextBox ID="TxtFechaExpedicion" runat="server" Width="80px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaExpedicion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="TxtFechaExpedicion" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="TxtFechaExpedicion" Display="None" ErrorMessage="El campo <b>''Fecha Expedición''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
</tr>
<tr>
<td>Vencimiento:</td>
<td>
<asp:TextBox ID="TxtFechaVencimiento" runat="server" Width="80px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="ImageButton1" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaVencimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaVencimiento" PopupButtonID="ImageButton1" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaVencimiento" Display="None" ErrorMessage="El campo <b>''Fecha Expedición''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
</tr>
</table>
</fieldset>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="center">
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
<asp:Button ID="BtnCancelar" runat="server" Text="Cancelar" OnClientClick="javascript:window.location.href='/SCT/Licencias.aspx';return false" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>

View File

@@ -0,0 +1,135 @@
Option Explicit On
Option Strict On
Imports Extensiones
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Data
Imports System.Drawing
Partial Class SCT_LicenciasDetalle
Inherits ClsPaginas
'Configuración
#Region "P R O P I E D A D E S"
Private ReadOnly Property CveLicencia As Integer
Get
Return ViewState("CveLicencia").ToString.ToEntero
End Get
End Property
Private ReadOnly Property CveRol As Integer
Get
Return ViewState("CveRol").ToString.ToEntero
End Get
End Property
Private ReadOnly Property ImgConsecutivo As String
Get
Return ViewState("ImgConsecutivo").ToString
End Get
End Property
Private ReadOnly Property CveEmpresa As String
Get
Return ViewState("CveEmpresa").ToString
End Get
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("Orden") = ""
If Page.PreviousPage Is Nothing Then
'redireccionar a la de usuarios
'PnlGeneral.Visible = False
ViewState("CveLicencia") = -1
Exit Sub
End If
ViewState("CveLicencia") = PreviousPage.CurrentLicencia
If CveLicencia.ToEntero >= 0 Then
'ViewState("CveUsuario") = Request("CveUsuario")
CargaDatos()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
LtlTitulo.Text = "Consulta del Permiso o Licencia:"
'ImgAddVenta
'If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero
'HLAgregarEvento.HRef =
'
'LtlAgregar.Text = "<a class=""Texto thickbox"" href=""/Planeacion/PopUpEventos.aspx?TipoReferencia=AF&Referencia=" & CveUsuario & "&TB_iframe=true&height=300&width=350"" />Agregar Evento</a>"
Else
'Configuración de Modalidad Insert
'LblFechaCaptura.Text = Now.ToShortDateString()
'LblUsuarioCapturo.Text = UsuarioActual.Usuario
ViewState("CveLicencia") = -1
End If
End If
End Sub
Public Sub CargaDatos()
Dim ObjUsuario As New ClsSCTLicencias
If ObjUsuario.GetLicencias(CveLicencia, "-1", "", "", "") Then
If ObjUsuario.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjUsuario.DtResultados.FiltroPrimero("")
'LtlUsuarios.Text = dr("ApellidoPaterno").ToString
TxtContraseña.Text = dr("ApellidoPaterno").ToString
TxtUsuario.Text = dr("ApellidoMaterno").ToString
TxtNombre.Text = dr("Nombres").ToString
DdlRol.SelectedValue = dr("TipoLicencia").ToString
TxtNumeroLicencia.Text = dr("NumeroLicencia").ToString
TxtFechaExpedicion.Text = dr("FechaExpedicion").ToString
TxtFechaVencimiento.Text = dr("FechaVencimiento").ToString
TxtFechaNacimiento.Text = dr("FechaNacimiento").ToString
TxtCorreo.Text = dr("CURP").ToString
TxtTelefonoEmergencia.Text = dr("TelefonoEmergencia").ToString
Else
Alert("El Usuario Solicitado no existe, Revise su búsqueda.", TipoMensaje.MsgAdvertencia)
BtnGuardar.Enabled = False
End If
End If
ObjUsuario.Dispose()
End Sub
'Private Sub EliminarUsuario()
' Dim ObjUsuario As New ClsSisUsuarios()
' If ObjUsuario.RemoveUsuario(CveUsuario) Then
' Alert("El Usuario se eliminó correctamente.", TipoMensaje.MsgInformacion, "window.location.href=""/Sistemas/Usuarios.aspx""")
' End If
' ObjUsuario.Dispose()
'End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
Dim ObjUsuario As New ClsSCTLicencias
If CveLicencia = -1 Then
If ObjUsuario.AddLicencia(TxtUsuario.Text.Trim, TxtContraseña.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue, TxtNumeroLicencia.Text, TxtFechaExpedicion.Text.Trim.ToDate, TxtFechaVencimiento.Text.ToDate, TxtFechaNacimiento.Text.ToDate, TxtCorreo.Text, TxtTelefonoEmergencia.Text) > 0 Then
Alert("La Licencia se Guardó Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/SCT/Licencias.aspx"";")
End If
'Else
' If ObjUsuario.UpdateUsuario(TxtUsuario.Text.Trim, TxtContraseña.Text.Trim, TxtNombre.Text.Trim, DdlRol.SelectedValue.ToEntero, TxtCorreo.Text.Trim, DdlSupervisa.SelectedValue.ToEntero,
' DdlAutoriza.SelectedValue.ToEntero, 1, ChkEstatus.Checked, UsuarioActual.CveEmpresa, CveUsuario) Then
' End If
' Alert("Los Datos del Usuario se actualizaron Correctamente", TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Usuarios.aspx"";")
End If
ObjUsuario.Dispose()
End Sub
End Class

View File

@@ -0,0 +1,289 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepGISSucesos.aspx.vb" Inherits="SCT_RepGISSucesos" %>
<%@ Register Assembly="AspMapNET" Namespace="AspMap.Web" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" Runat="Server">
<script type="text/javascript">
function AltaReporte(x, y) {
$("#DivAltaReporte").show();
$("#DivAltaReporte").center();
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" Runat="Server">
<table width="100%" border="0" cellpadding="0" id="TbMapa">
<tr><td colspan="2">
<table width="100%">
<tr>
<td>Tipo:</td>
<td>
<asp:DropDownList ID="DdlTipoEvento" runat="server">
<asp:ListItem Value="-1">Todos</asp:ListItem>
<asp:ListItem Value="100">Accidentes</asp:ListItem>
<asp:ListItem Value="101">Licitaciones</asp:ListItem>
<asp:ListItem Value="102">Bloqueos</asp:ListItem>
<asp:ListItem Value="103">Tramos Reparación</asp:ListItem>
<asp:ListItem Value="104">LLuvia</asp:ListItem>
<asp:ListItem Value="105">Antenas</asp:ListItem>
</asp:DropDownList></td>
<td>&nbsp;F.Inicio:&nbsp;</td>
<td>
<asp:TextBox ID="txtFechaI" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>&nbsp;
</td>
<td>&nbsp;F.Fin:&nbsp;</td>
<td>
<asp:TextBox ID="txtFechaF" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioProg" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioProg" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>&nbsp;
</td>
<td> <asp:Button runat="server" Text="Consultar" ID="BtnConsultar"></asp:Button></td>
</tr>
</table>
</td></tr>
<tr>
<td>
<asp:UpdatePanel ID="UPPGIS" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<cc1:Map ID="Mapa" runat="server" Height="500px" Width="930px" MapUnit="Meter" oninfotool="Map1_InfoTool" ImageFormat="Png" EnableSession="false" PixelPerInch="100" ImageTempDirectory="/Temp" BackColor="#f2efe9" FontQuality="ClearType" ImageResolution="100" MapTool="Info" ImagePriority="High" PanCursor="url(/imagenes/hand-drag.cur),default" />
<cc1:zoombar id="ZBMapa" runat="server" position="TopLeft" map="Mapa" enableviewstate="true"
visible="true" />
&nbsp;<asp:Label ID="LblCoords" runat="server" Text="" ClientIDMode="Static"></asp:Label>
<asp:Label ID="Label1" runat="server" Text="" ClientIDMode="Static" Visible="false"></asp:Label>
<asp:HiddenField ID="HdnPosX" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnPosY" runat="server" ClientIDMode="Static" Value="0" />
<asp:Label ID="LblMsg" runat="server" Text="" Visible="true"></asp:Label>
<asp:HiddenField ID="HdnEscala" runat="server" />
<asp:Panel ID="divPuntoDetalle" runat="server" ClientIDMode="Static" Width="300px" BackColor="White" Style=" border: solid 1px black;color: Black; display: none; position:relative; left:0 ; ">
<table border="0" width="300px" cellpadding="0" cellspacing="1">
<tr class="Titulos">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="TbInfoPunto" style="cursor:move;">
<tr>
<td style="width: 245px">Información</td>
<td style="padding-right: 4px; padding-top: 4px" valign="top"><img alt="" src="/imagenes/cerrarX.jpg" style="cursor: pointer;" onclick="$get('divPuntoDetalle').style.display='none';" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<asp:Table ID="tbPuntoDetalle" runat="server"></asp:Table>
</td>
</tr>
</table>
</asp:Panel>
<div id="DivAltaReporte" style="border-color: #000000; border-width: 2px; display: none; z-index: 5000;" class="ui-widget-content">
<asp:UpdatePanel ID="UPPAltaRep" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="1" style="background-color:White;" width="500px">
<tr class="Titulos">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="TbRep" style="cursor:move;">
<tr>
<td style="width:95%">Reporte</td>
<td valign="top"><img alt="" src="/imagenes/cerrarX.jpg" style="cursor: pointer;" onclick="$get('DivAltaReporte').style.display='none';" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<br />
<table border="0" cellpadding="0" cellspacing="1">
<tr>
<td style="width:350px">
<div style="width:350px;">
<fieldset>
<legend><b>Datos del Reporte</b></legend>
<table border="0" cellspacing="1" cellpadding="0" id="TbDatos" runat="server">
<tr align="left" style="display:none;">
<td>Folio:&nbsp;</td><td><b><asp:Label ID="LblFolio" runat="server" Text=""></asp:Label></b></td>
</tr>
<tr align="left">
<td>Fecha:&nbsp;</td>
<td><b><asp:Label ID="LblFecha" runat="server" Text=""></asp:Label></b></td>
</tr>
<tr align="left">
<td>Tipo:&nbsp;</td>
<td>&nbsp;<asp:DropDownList ID="DdlAddTipoEvento" runat="server">
<asp:ListItem Value="100">Accidentes</asp:ListItem>
<asp:ListItem Value="101">Licitaciones</asp:ListItem>
<asp:ListItem Value="102">Bloqueos</asp:ListItem>
<asp:ListItem Value="103">Tramos Reparación</asp:ListItem>
<asp:ListItem Value="104">LLuvia</asp:ListItem>
<asp:ListItem Value="105">Antenas</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr align="left">
<td>Asunto:</td><td>&nbsp;<b><asp:TextBox ID="TxtAsunto" runat="server" Width="250px"></asp:TextBox></b></td>
</tr>
<tr align="left">
<td>Descripcion:</td><td>&nbsp;<b><asp:TextBox ID="TxtDescripcion" TextMode="MultiLine" Rows="3" Width="250px" runat="server" Text=""></asp:TextBox></b></td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" /></td>
</tr>
</table>
</fieldset>
</div>
</td>
<td style="vertical-align:top;">
<div style="width:50px;" runat="server" Visible="false" id="divEstatus">
<fieldset>
<legend><b>Estatus</b></legend>
<asp:DropDownList ID="DDlEstatus" runat="server">
<asp:ListItem Value="1">Activo</asp:ListItem>
<asp:ListItem Value="2">Inactiva</asp:ListItem>
</asp:DropDownList>
<asp:HiddenField ID="HdnEstatus" runat="server" />
</fieldset>
</div>
</td>
</tr>
<tr id="TrDatosTecnicos" runat="server" Visible="false">
<td colspan="2">
<div style="width:350px;">
<fieldset>
<legend><b>Datos Técnicos</b></legend>
<table border="0" cellspacing="1" cellpadding="0" id="Table1" runat="server">
<tr><td style="width: 100px;">Altura:</td><td>50mts</td></tr>
<tr><td>Bandas:</td><td>902-928 MHZ</td></tr>
<tr><td>Propietario:</td><td>SCT</td></tr>
<tr><td>Vencimiento:</td><td>31 Diciembre 2018</td></tr>
</table>
</fieldset>
</div>
</td>
</tr>
<tr><td colspan="2">
<asp:Panel ID="PnlObservaciones" GroupingText="<b>Observaciones</b>" runat="server">
<table border="0" cellpadding="0" cellspacing="0" id="TbObservaciones" runat="server">
<tr>
<td><asp:TextBox ID="TxtObservaciones" runat="server" TextMode="MultiLine" Width="400px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVAddObservaciones" runat="server" ErrorMessage="*" ValidationGroup="GrpAddObservaciones" ControlToValidate="TxtObservaciones"></asp:RequiredFieldValidator>
<asp:Button ID="BtnAddObservacion" runat="server" Text="Guardar" ClientIDMode="Static" Visible="false" ValidationGroup="GrpAddObservaciones" /></td>
</tr>
</table>
<asp:GridView ID="GvObservaciones" runat="server" AutoGenerateColumns="false" Width="585px">
<Columns>
<asp:BoundField DataField="Comentario" ItemStyle-Width="365px" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<div class="truncate" style="width:65px" title="<%# Eval("FechaIng") %>"><asp:Literal ID="LblCorreo" runat="server" Text='<%# Bind("FechaIng") %>'></asp:Literal></div>
</ItemTemplate>
<ItemStyle Width="65px" HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField HeaderText="Usuario">
<ItemTemplate>
<div class="truncate" style="width:120px" title="<%# Eval("Nombre") %>"><asp:Literal ID="LblCorreo2" runat="server" Text='<%# Bind("Nombre") %>'></asp:Literal></div>
</ItemTemplate>
<ItemStyle Width="120px" HorizontalAlign="Left" />
</asp:TemplateField>
</Columns>
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</td>
</tr>
</table>
</ContentTemplate></asp:UpdatePanel>
</div>
</ContentTemplate>
<Triggers>
</Triggers>
</asp:UpdatePanel>
</td>
<td>
<table style="width: 40px" border="1" cellspacing="0">
<tr style="height: 20px">
<td class="Titulo" colspan="2">
Herr
</td>
</tr>
<tr style="height: 20px">
<td>
<cc1:maptoolbutton id="ZITMapa" behavior="ZITMapa" runat="server" tooltip="Acercar"
imageurl="/imagenes/ZoomInTool.gif" map="Mapa" maptool="ZoomIn" argument="ZoomIn" />
</td>
<td>
<cc1:maptoolbutton id="ZOTMapa" runat="server" tooltip="Alejar" imageurl="/imagenes/ZoomOutTool.gif"
maptool="ZoomOut" map="Mapa" argument="ZoomOut" />
</td>
</tr>
<tr style="height: 20px">
<td style="height: 20px">
<cc1:maptoolbutton id="PTMapa" runat="server" tooltip="Mover Mapa" imageurl="/imagenes/PanToolControl.gif"
maptool="Pan" map="Mapa" />
</td>
<td>
<cc1:MapToolButton ID="PTInfo" runat="server" ToolTip="Información" ImageUrl="/imagenes/information.png"
Map="Mapa" MapTool="Info" Argument="Info" />
</td>
</tr>
<tr><td> <cc1:MapToolButton ID="PSTMapa" runat="server" ToolTip="Agregar Suceso" ImageUrl="/imagenes/SCT/BotonAgregar.gif"
Map="Mapa" MapTool="Info" Argument="Agregar" /></td><td></td></tr>
<tr style="height: 20px">
<td colspan="2">
&nbsp;
</td>
</tr>
<tr><td>
<asp:ImageButton ID="ImgAccidente" ImageUrl="/Imagenes/SCT/Accidente.jpg" ToolTip="Accidente" Height="20px" runat="server" /></td><td><asp:ImageButton ID="ImgLicitaciones" ImageUrl="/Imagenes/SCT/dinero.jpg" ToolTip="Licitaciones" Height="20px" runat="server" /></td></tr>
<tr><td>
<asp:ImageButton ID="ImgBloqueo" ImageUrl="/Imagenes/SCT/bloqueo.jpg" ToolTip="Bloqueo" Height="20px" runat="server" /></td><td><asp:ImageButton ID="ImgReparacion" ImageUrl="/Imagenes/SCT/reparacion.jpg" ToolTip="Tramo Reparación" Height="20px" runat="server" /></td></tr>
<tr><td>
<asp:ImageButton ID="ImgLluvia" ImageUrl="/Imagenes/SCT/lluvia.jpg" ToolTip="LLuvia" Height="20px" runat="server" /></td><td><asp:ImageButton ID="ImgAntena" runat="server" ImageUrl="/Imagenes/SCT/Antena.jpg" Height="20px" Visible="true"/></td></tr>
</table>
</td>
</tr>
<tr>
<td>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="False">
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
<Columns>
<asp:BoundField DataField="TipoEvento" HeaderText="Suceso" />
<asp:BoundField DataField="Asunto" HeaderText="Asunto" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" >
<ItemStyle Width="250px" />
</asp:BoundField>
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="Fecha" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Content>

View File

@@ -0,0 +1,355 @@

Imports AspMap
Imports System.Drawing
Imports System.Data
Imports Extensiones
Imports AspMap.Web
Imports AspMap.Web.Extensions
Imports System.IO
Partial Class SCT_RepGISSucesos
Inherits ClsPaginas
Private Property FraccSeleccionado() As String
Get
Return ViewState("FraccSeleccionado").ToString
End Get
Set(ByVal value As String)
ViewState("FraccSeleccionado") = value
End Set
End Property
Private Property CveEvento() As Integer
Get
Return ViewState("CveEvento").ToString.ToEntero
End Get
Set(ByVal value As Integer)
ViewState("CveEvento") = value
End Set
End Property
Private Property DtDatos() As DataTable
Get
Return CType(ViewState("DtDatos"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DtDatos") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
' You have to sign up for a Maps API key at http://code.google.com/apis/maps/signup.html.
Dim gml As GoogleMapsLayer = New GoogleMapsLayer()
gml.MapType = GoogleMapType.Normal
Mapa.BackgroundLayer = gml
'' set the transparency of the main map image to display other layers over the satellite map
Mapa.ImageFormat = ImageFormat.Png
Mapa.ImageOpacity = 0.8
If Not Page.IsPostBack Then
CargaMarcadores()
'If Mapa.Markers.Count > 0 Then
' Mapa.ZoomScale(New AspMap.Point(Mapa.Markers(0).Position.X, Mapa.Markers(0).Position.Y), 5000000)
'End If
End If
FraccSeleccionado = "Demo"
CargaMapa()
End Sub
Private Function CargaMarcadores() As Boolean
Mapa.Markers.Clear()
Dim Retorno As Boolean = False
Dim FI, FF As Nullable(Of Date)
If txtFechaI.Text <> "" Then FI = txtFechaI.Text.ToDate
If txtFechaF.Text <> "" Then FF = txtFechaF.Text.ToDate
Dim Dt As DataTable
Dim Mar As New ClsOIEventos
If Mar.GetEventos(-1, DdlTipoEvento.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, 1, FI, FF) Then
Dt = Mar.DtResultados
Gv.DataSource = Dt
Gv.DataBind()
DtDatos = Dt
'GeneraSHPReporte(Dt, AppDomain.CurrentDomain.BaseDirectory & "GIS\Sucesos.shp", "Sucesos")
Dim dbLayer As AspMap.Layer
dbLayer = Mapa.AddSpatialDataLayer(Dt, "WkbGeometry")
dbLayer.Name = "a"
'CargaMapa()
'Dim ImgUrl As String = ""
'For Each Dr As DataRow In Dt.Rows
' Select Case Dr("CveTipoEvento").ToString
' Case "100" : ImgUrl = "/Imagenes/SCT/accidente.jpg"
' Case "101" : ImgUrl = "/Imagenes/SCT/dinero.jpg"
' Case "102" : ImgUrl = "/Imagenes/SCT/bloqueo.jpg"
' Case "103" : ImgUrl = "/Imagenes/SCT/reparacion.jpg"
' Case "104" : ImgUrl = "/Imagenes/SCT/lluvia.jpg"
' End Select
' Dim symbol As MarkerSymbol = New MarkerSymbol(ImgUrl, 20, 20, 10, 10)
' Mapa.Markers.Add(New Marker(New AspMap.Point(Dr("STX").ToString.ToDouble, Dr("STY").ToString.ToDouble), symbol, Dr("Asunto").ToString, Dr("Descripcion").ToString))
'Next
End If
Mar.Dispose()
return true
End Function
Private Sub CargaMapa()
Dim dbLayer As AspMap.Layer
Dim feature As AspMap.Feature
'Dim FillColor, LineColor As Color
'Mapa.RemoveAllLayers()
'dbLayer = Mapa.AddLayer(AppDomain.CurrentDomain.BaseDirectory & "GIS\Sucesos.shp")
dbLayer = Mapa.AddSpatialDataLayer(DtDatos, "WkbGeometry")
dbLayer.Name = "Sucesos"
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.Expression = String.Format("CveTipoEvento = 100")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\accidente.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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("CveTipoEvento = 101")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\dinero.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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("CveTipoEvento = 102")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\bloqueo.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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("CveTipoEvento = 103")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\reparacion.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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("CveTipoEvento = 104")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\lluvia.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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("CveTipoEvento = 105")
feature.Symbol.Bitmap = String.Format("{0}Imagenes\SCT\Antena.jpg", AppDomain.CurrentDomain.BaseDirectory)
feature.Symbol.PointStyle = AspMap.PointStyle.Bitmap
feature.Symbol.TransparentColor = Color.White
feature.Symbol.Size = 30
dbLayer.Renderer.Add(feature)
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)
If e.Argument = "Agregar" Then
'RegistraScript("$get('divPuntoDetalle').style.display='';")
HdnPosX.Value = e.InfoPoint.X.ToString
HdnPosY.Value = e.InfoPoint.y.ToString
BtnGuardar.Visible = True
divEstatus.Visible = False
TxtAsunto.Text = ""
TxtDescripcion.Text = ""
PnlObservaciones.Visible = False
RegistraScript(String.Format("AltaReporte({0},{1});", e.InfoPoint.X, e.InfoPoint.Y))
Else
If e.Argument = "Info" Then
Dim records As AspMap.Recordset = Mapa.Identify(e.InfoPoint, 10)
If records.Layer.Name = "Sucesos" Then
CargaInformacion(records("CveEvento").ToString.toentero)
End If
End If
End If
End Sub
Private Sub CargaInformacion(ByVal pCveEvento As Integer)
'Dim ObjSuceso As New ClsOIEventos
'ObjSuceso.GetEventos(pCveEvento, -1, -1, UsuarioActual.CveEmpresa, -1)
'TbDatos.Rows(0).Visible = True : TbDatos.Rows(4).Visible = True
'If ObjSuceso.DtResultados IsNot Nothing AndAlso ObjSuceso.DtResultados.Rows.Count = 1 Then
' Dim dt As DataTable = Nothing
' Dim dr As DataRow = ObjSuceso.DtResultados.Rows(0)
' CveEvento = pCveEvento
' LblFolio.Text = dr("CveEvento").ToString
' LblFecha.Text = dr("FechaIng").ToString
' DdlAddTipoEvento.SelectedValue = dr("CveTipoEvento").ToString
' If dr("CveTipoEvento") = "105" Then
' TrDatosTecnicos.Visible = True
' Else
' TrDatosTecnicos.Visible = False
' End If
' divEstatus.Visible = True
' TxtAsunto.Text = dr("Asunto").ToString
' TxtDescripcion.Text = dr("Descripcion").ToString
' PnlObservaciones.Visible = True
' BtnGuardar.Visible = False
' DDlEstatus.SelectedValue = dr("CveEstatusEvento").ToString
' HdnEstatus.Value = dr("CveEstatusEvento").ToString
' 'DdlSubTipoQueja.DataSource = GlobalDTSubTiposQuejas(DdlTipoQueja.SelectedValue.ToEntero, -1)
' 'DdlSubTipoQueja.DataBind()
' 'DdlSubTipoQueja.SelectedValue = dr("CveSubTipoQueja").ToString
' 'DdlTipoQueja.Enabled = False : DdlSubTipoQueja.Enabled = False : DdlMedioCaptacion.enabled = False
' 'LblEstatus.Text = dr("Estatus").ToString
' 'LblColonia.Text = dr("Colonia").ToString
' 'LblUsuario.Text = dr("Nombre").ToString
' 'HplLuminaria.NavigateUrl = "/Luminarias2.aspx?CveLuminaria=" & dr("CveLuminaria").ToString
' 'ObjSuceso.GetEventosComentarios(pCveEvento)
' GvObservaciones.DataSource = ObjSuceso.DtResultados
' GvObservaciones.DataBind()
' BtnAddObservacion.Visible = True
' 'TbObservaciones.Visible =
' UPPAltaRep.Update()
' RegistraScript(String.Format("AltaReporte({0},{1});", 0, 0))
End If
ObjSuceso.Dispose()
End Sub
Protected Sub BtnAddObservacion_Click(sender As Object, e As EventArgs) Handles BtnAddObservacion.Click
'Dim Obs As New ClsOIEventos
'Obs.AddEventoComentario(CveEvento, TxtObservaciones.Text, "", UsuarioActual.CveUsuario)
'GvObservaciones.DataSource = Obs.DtResultados
'GvObservaciones.DataBind()
'TxtObservaciones.Text = ""
'Obs.Dispose()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
CargaMarcadores()
End Sub
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim OI As New ClsOIEventos
Dim i As Integer = OI.AddEvento(DdlAddTipoEvento.SelectedValue.ToEntero, TxtAsunto.Text, TxtDescripcion.Text, 1, UsuarioActual.CveUsuario, 0, Now, Now, -1, UsuarioActual.CveEmpresa, String.Format("POINT({0} {1})", HdnPosX.Value.ToDouble, HdnPosY.Value.ToDouble))
ClsTecnoMovil.SendMsg("Se ha registrado un evento tipo " & DdlAddTipoEvento.SelectedItem.Text & ": " & TxtAsunto.Text, "6621190043")
Dim ObjMail As New ClsSisMail()
ObjMail.Mandacorreo(UsuarioActual.Empresa, "julian@adsistemas.mx", DdlAddTipoEvento.SelectedItem.Text, "Se ha registrado un evento tipo " & DdlAddTipoEvento.SelectedItem.Text & ": " & TxtAsunto.Text.Trim & "<br />" & "Descripción: " & TxtDescripcion.Text.Trim)
Dim Dt As DataTable = OI.DtResultados
Gv.DataSource = Dt
Gv.DataBind()
DtDatos = Dt
CargaMarcadores()
'Mapa.Markers.Add(New Marker(New AspMap.Point(HdnPosX.Value.ToDouble, HdnPosY.Value.ToDouble), TxtAsunto.Text, TxtDescripcion.Text))
CargaMapa()
OI.Dispose()
UPPGIS.Update()
UPDatos.Update()
RegistraScript("$(""#DivAltaReporte"").hide();")
'Mapa.Markers.Add(New Marker(New AspMap.Point(HdnPosX.Value.ToDouble, HdnPosY.Value.ToDouble), TxtAsunto.Text, TxtDescripcion.Text))
End Sub
Public Sub GeneraSHPReporte(ByRef dt As DataTable, PathSHP As String, LayerNombre As String)
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
Try
Dim Mapa As New Map
Dim dbLayer As AspMap.Layer
Dim a As AspMap.Data.SpatialDatabaseLayer()
dbLayer = Mapa.AddSpatialDataLayer(dt, "WkbGeometry")
dbLayer.Name = LayerNombre
dbLayer.CoordinateSystem = AspMap.CoordSystem.WGS1984
Dim Tmp As DateTime = Now
While (IsFileLocked(PathSHP)) 'hago un ciclo para esperar para liberar los archivos
If Tmp.AddSeconds(15) < Now Then Exit While
End While
Dim ret As Boolean = dbLayer.Recordset.Export(PathSHP)
If ret Then
Dim GenIndexSHP As New AspMap.Tools
GenIndexSHP.BuildIndex(PathSHP, 15)
Else
Dim Msg As String = "No se pudo generar el archivo"
Msg.Alert(Msg, TipoMensaje.MsgError)
End If
dbLayer.Dispose()
Mapa.Dispose()
Catch ex As Exception
Dim a As Integer = 0
End Try
End If
End Sub
Public Function IsFileLocked(path As String, Optional access As FileAccess = FileAccess.Write) As Boolean
Try
If File.Exists(path) Then
Using fs As New FileStream(path, FileMode.Open, access, FileShare.ReadWrite)
End Using
End If
Catch e As IOException
Return True ' (Marshal.GetHRForException(e) And &HFFFF) = 32
End Try
Return False
End Function
Protected Sub DDlEstatus_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDlEstatus.SelectedIndexChanged
Dim OI As New ClsOIEventos
OI.UpdateEstatusEvento(DDlEstatus.SelectedValue.ToEntero, 0, CveEvento, UsuarioActual.CveUsuario)
OI.Dispose()
End Sub
End Class

196
SCT/RepLicencias.aspx Normal file
View File

@@ -0,0 +1,196 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false"
CodeFile="RepLicencias.aspx.vb" Inherits="SCT_RepLicencias" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="/Imagenes/separador02.gif" alt="" />
</td>
<td align="center" style="width: 55px">
</td>
</tr>
</table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
Reporte de Licencias y Permisos
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr align="left" class="SubTotales">
<td>
&nbsp;Tipo Licencia:&nbsp;
</td>
<td>
<asp:DropDownList ID="DdlTipoLicencia" runat="server" >
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Pasaje y exclusivo de turismo" Value="Pasaje y exclusivo de turismo"></asp:ListItem>
<asp:ListItem Text="Carga Trailer" Value="Carga Trailer"></asp:ListItem>
<asp:ListItem Text="Carga de 2 o 3 ejes" Value="Carga de 2 o 3 ejes"></asp:ListItem>
<asp:ListItem Text="Chofer Guia Turistas" Value="Chofer Guia Turistas"></asp:ListItem>
<asp:ListItem Text="Carga de Materiales y residuos peligrosos" Value="Carga de Materiales y residuos peligrosos"></asp:ListItem>
<asp:ListItem Text="Puertos y aeropuertos" Value="Puertos y aeropuertos"></asp:ListItem>
</asp:DropDownList>
</td>
<td>
&nbsp;# Licencia:&nbsp;
</td>
<td>
<asp:TextBox ID="TxtNumLicencia" runat="server" Width="65px"></asp:TextBox>
</td>
<td>
Estatus:
</td>
<td>
<asp:DropDownList ID="DdlEstatus" runat="server" Width="100px">
<Items>
<asp:ListItem Value="-1" Selected="True">Todas</asp:ListItem>
<asp:ListItem Value="Vencida">Vencida</asp:ListItem>
<asp:ListItem Value="Activa">Activa</asp:ListItem>
</Items>
</asp:DropDownList>
</td>
<td>
&nbsp;Agrupador:&nbsp;
</td>
<td>
<asp:DropDownList ID="DdlAgrupador" runat="server" Width="120px">
<Items>
<asp:ListItem Value="TipoLicencia" Selected="True">Tipo Licencia</asp:ListItem>
<asp:ListItem Value="Estatus">Estatus</asp:ListItem>
</Items>
</asp:DropDownList>
</td>
</tr>
<tr align="left" class="SubTotales">
<td>
&nbsp;F.Exp.Inicio:&nbsp;
</td>
<td>
<asp:TextBox ID="txtFechaI" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png"
ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI"
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
</ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI"
PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True">
</ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI"
Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha."
ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI"
Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco"
TargetControlID="rfvFechaI" Width="350px">
</ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco"
TargetControlID="cvFechaI" Width="350px">
</ajax:ValidatorCalloutExtender>
&nbsp;
&nbsp;F.Exp.Fin:&nbsp;
<asp:TextBox ID="txtFechaF" runat="server" Width="65px"></asp:TextBox>
&nbsp;<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png"
ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF"
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
</ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF"
PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True">
</ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF"
Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha."
ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF"
Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco"
TargetControlID="rfvFechaF" Width="350px">
</ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco"
TargetControlID="cvFechaF" Width="350px">
</ajax:ValidatorCalloutExtender>
&nbsp;
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
&nbsp;&nbsp;
</td>
<td>
</td>
<td>
<asp:Button ID="cmdConsultar" runat="server" Text="Consultar" />
</td>
</tr>
</table>
<asp:UpdatePanel runat="server" ID="UPPDatos" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con el filtro actual"
Width="100%">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Literal ID="LblTitulo" runat="server"></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlAgrupador" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
Total
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:ButtonField />
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="upProgress" runat="server" DisplayAfter="0">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
La información se está procesando...
</td>
</tr>
<tr>
<td>
<img src="/Imagenes/Cargando.gif" style="border-width: 0px;" alt="" />
</td>
</tr>
</table>
</center>
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</asp:Content>

134
SCT/RepLicencias.aspx.vb Normal file
View File

@@ -0,0 +1,134 @@
Option Explicit On
'Option Strict On
Imports System.Data
Imports AspMap
Imports System.Drawing
Imports Extensiones
Imports System.IO
Imports AspMap.Web
Partial Class SCT_RepLicencias
Inherits ClsPaginas
Private Property GISTmpConsulta As String
Get
GISTmpConsulta = ViewState("GISTmpConsulta").ToString
End Get
Set(value As String)
ViewState("GISTmpConsulta") = value
End Set
End Property
Private Property DTLeyendas() As DataTable
Get
Return DirectCast(ViewState("DTLeyendas"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DTLeyendas") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
GISTmpConsulta = "Estudios.shp"
'divLeyendas.Style("max-height") = Mapa.Height.ToString
'DTLeyendas = New DataTable
' 'creo las columnas
' Dim auto As New DataColumn("AutoID", Type.GetType("System.Int32")) : DTLeyendas.Columns.Add(auto) : auto.AutoIncrement = True : auto.AutoIncrementSeed = 1 : auto.ReadOnly = True
' DTLeyendas.Columns.Add("Color", Type.GetType("System.Int32"))
' DTLeyendas.Columns.Add(New DataColumn With {.ColumnName = "Estilo", .DataType = Type.GetType("System.Int32"), .DefaultValue = 1})
' DTLeyendas.Columns.Add("Texto", Type.GetType("System.String"))
' DTLeyendas.Columns.Add("Expresion", Type.GetType("System.String"))
' DTLeyendas.Columns.Add("RutaURL", Type.GetType("System.String"))
' DTLeyendas.Columns.Add("Cantidad", Type.GetType("System.Int32"))
' DTLeyendas.Columns.Add("Imagen", Type.GetType("System.String"))
End If
End Sub
Public Sub CargaDatos()
Dim ObjEstudio As New ClsSCTLicencias
Dim CvePadron As Integer = -1
'Dim Nombre As String = If(TxtNombre.Text = "", "-1", TxtNombre.Text)
'Dim RPU As String = If(TxtRPU.Text = "", "-1", TxtRPU.Text)
'Dim Calle As String = If(TxtCalle.Text = "", "-1", TxtCalle.Text)
Dim GEOM As String = "-1" 'If(TxtGeom.Text = "", "-1", TxtGeom.Text)
Dim GRP As String = DdlAgrupador.SelectedValue
Dim FechaInicio As String = If(txtFechaI.Text = "", "-1", txtFechaI.Text)
Dim FechaFin As String = If(txtFechaF.Text = "", "-1", txtFechaF.Text)
If ObjEstudio.GetLicenciasAgrupador(DdlTipoLicencia.SelectedValue, TxtNumLicencia.Text, DdlEstatus.SelectedValue, txtFechaI.Text, txtFechaF.Text, DdlAgrupador.SelectedValue) Then
GvDatos.DataSource = ObjEstudio.DtResultados
GvDatos.DataBind()
End If
'If ObjEstudio.GetEstudios(-1, "-1", "-1", "-1", DdlPoblacion.SelectedValue.ToEntero, DdlColonia.SelectedValue.ToEntero, DdlPoblaciones.SelectedValue.ToEntero, DdlColonias.SelectedValue.ToEntero,
' DdlTransformadorDueño.SelectedValue.ToEntero, If(TxtRPU.Text = "", "-1", TxtRPU.Text), DdlTarifa.SelectedValue.ToEntero, -1, DdlMureteBuenEstado.SelectedValue.ToEntero, DdlTipoSuministro.SelectedValue.ToEntero, HdnGeom.Value, DdlAgrupador.SelectedValue) Then
'If ObjEstudio.GetLicencias(CvePoblacion, CveColonia, DdlTarifa.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "", FechaInicio, FechaFin, DdlAgrupador.Text) Then
' ViewState("DTEstudios") = ObjEstudio.DtResultados
'Else
' Me.GvDatos.DataSource = Nothing
'End If
ObjEstudio.Dispose()
'If ViewState("Orden").ToString() <> String.Empty Then
' CargaGrid(ViewState("Orden").ToString())
'Else
'CargaGrid("")
'End If
'LblHerram.ToolTip = Mapa.MapScale.ToString
End Sub
Private Sub CargaGrid(Orden As String)
If Orden <> String.Empty Then
Dim DV As New DataView(CType(ViewState("DTEstudios"), DataTable), "", Orden, DataViewRowState.CurrentRows)
GvDatos.DataSource = DV.ToTable()
DV.Dispose()
Else
GvDatos.DataSource = CType(ViewState("DTEstudios"), DataTable)
End If
GvDatos.DataBind()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.Header Then
e.Row.FCLiteral("LblTitulo").Text = DdlAgrupador.SelectedItem.Text
ElseIf e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(500)
e.Row.Cells(1).Width = Unit.Pixel(100)
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.FCLiteral("LtlAgrupador").Text = String.Format("&nbsp;<a class='Texto' href='/SCT/Licencias.aspx?TipoLicencia={0}&FechaExpInicio={1}&FechaExpFin={2}&Estatus={3}&NumeroLicencia={4}&GRP={5}'>{5}</a>", e.Row.DBCampo("TipoLicencia"), e.Row.DBCampo("FechaExpInicio"), e.Row.DBCampo("FechaExpFin"), e.Row.DBCampo("Estatus"), e.Row.DBCampo("NumeroLicencia"), e.Row.DBCampo("Agrupador"))
e.Row.FCLiteral("LtlTotal").Text = String.Format("&nbsp;<a class='Texto' href='/SCT/Licencias.aspx?TipoLicencia={0}&FechaExpInicio={1}&FechaExpFin={2}&Estatus={3}&NumeroLicencia={4}&GRP={5}'>{6}</a>", e.Row.DBCampo("TipoLicencia"), e.Row.DBCampo("FechaExpInicio"), e.Row.DBCampo("FechaExpFin"), e.Row.DBCampo("Estatus"), e.Row.DBCampo("NumeroLicencia"), e.Row.DBCampo("Agrupador"), e.Row.DBCampo("Cantidad"))
'e.Row.FCLiteral("LtlTotal").Text = String.Format("<a class='Texto' href='/TS/RepEstudiosDetalle.aspx?CvePoblacion={0}&CveColonia={1}&CveUsuario={2}&CveEstatus={3}&CveTarifa={4}&FechaInicio={5}&FechaFin={6}&GRP={7}'>{8}</a>", e.Row.DBCampo("CvePoblacion"), e.Row.DBCampo("CveColonia"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatus"), e.Row.DBCampo("CveTarifa"), e.Row.DBCampo("FechaInicio"), e.Row.DBCampo("FechaFin"), e.Row.DBCampo("Agrupador"), e.Row.DBCampo("Cantidad").ToEntero)
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
End If
End Sub
Protected Sub cmdConsultar_Click(sender As Object, e As System.EventArgs) Handles cmdConsultar.Click
CargaDatos()
End Sub
End Class