+
-
-
+ data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF ">
@@ -264,7 +270,7 @@
-
+
diff --git a/Transportes/ListadoContratos.aspx.vb b/Transportes/ListadoContratos.aspx.vb
index ddec16a91..49595fc44 100644
--- a/Transportes/ListadoContratos.aspx.vb
+++ b/Transportes/ListadoContratos.aspx.vb
@@ -1,6 +1,6 @@
Option Explicit On
Option Strict On
-Imports Extensiones
+Imports Extensiones.ModExtensiones
Partial Class ListadoContratos
Inherits ClsPaginas
@@ -19,11 +19,11 @@ Partial Class ListadoContratos
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
If ObjAF.DtResultados.Rows.Count > 0 Then
DdlTransporte.DataSource = ObjAF.DtResultados
- DdlTransporte.Items.Insert(0, New ListItem("Seleccione", "0"))
+ DdlTransporte.Items.Insert(0, New ListItem("Seleccione", ""))
End If
End If
- ObjAF.Dispose()
DdlTransporte.DataBind()
+ ObjAF.Dispose()
End Sub
Private Sub CargaDatos()
@@ -35,7 +35,7 @@ Partial Class ListadoContratos
GvContratos.DataBind()
End Sub
- Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
+ Protected Sub MostrarModal()
TxtDescripcion.Text = ""
TxtFechaSalida.Text = ""
TxtFechaRegreso.Text = ""
@@ -45,7 +45,9 @@ Partial Class ListadoContratos
BtnGuardar.Text = "Guardar"
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
End Sub
-
+ Private Sub LBAgregarContrato_Click(sender As Object, e As EventArgs) Handles LBAgregarContrato.Click
+ MostrarModal()
+ End Sub
Protected Sub AddContrato(sender As Object, e As EventArgs)
If DdlClientes.SelectedValue = "" Then
@@ -57,51 +59,29 @@ Partial Class ListadoContratos
ObjContratos.IniciaTransacSQL()
Try
- If BtnGuardar.Text = "Guardar" Then
- Dim CveEstatusInicial As Integer = 10
- Dim CveContratoHijo As Integer = -1
- Dim CveContratoTipo As Integer = 2
+ Dim CveEstatusInicial As Integer = 10
+ Dim CveContratoHijo As Integer = -1
+ Dim CveContratoTipo As Integer = 2
- If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
- CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
- End If
+ If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
+ CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
+ End If
- CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
+ CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
- If CveContratoHijo > 0 Then
- ObjContratos.Commit()
- Alert("Agregado Correctamente.")
- TxtDescripcion.Text = ""
- TxtFechaSalida.Text = ""
- TxtFechaRegreso.Text = ""
- TxtObservaciones.Text = ""
- TxtUbicacion.Text = ""
- DdlClientes.SelectedValue = ""
- DdlTransporte.SelectedValue = ""
+ If CveContratoHijo > 0 Then
+ ObjContratos.Commit()
+ Alert("Agregado Correctamente.")
+ TxtDescripcion.Text = ""
+ TxtFechaSalida.Text = ""
+ TxtFechaRegreso.Text = ""
+ TxtObservaciones.Text = ""
+ TxtUbicacion.Text = ""
+ DdlClientes.SelectedValue = ""
+ DdlTransporte.SelectedValue = ""
- End If
- Else
- Dim id As Integer = Convert.ToInt32(Request.QueryString("CveContrato"))
-
- Dim ContratoEditado As New ClsContratos
- ContratoEditado.GetContratos(id, UsuarioActual.CveEmpresa)
-
- Dim CveEstatusInicial As Integer = 10
- Dim Editar As Boolean = False
- Dim CveContratoTipo As Integer = 2
-
- If ContratoEditado.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
- CveEstatusInicial = ContratoEditado.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
- End If
-
- Editar = ContratoEditado.UpdateContratos(ContratoEditado.CveContrato, id.ToString, TxtDescripcion.Text, ContratoEditado.NumeroLicitacion, ContratoEditado.CveProveedor, ContratoEditado.CveCliente, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", ContratoEditado.CveSubProyecto, ContratoEditado.PorIVA, ContratoEditado.PorAnticipo, ContratoEditado.PorAmortizacionAnticipo, ContratoEditado.PorGarantia, "", "", ContratoEditado.CveContratoPadre, ContratoEditado.CveUsuario, ContratoEditado.CveEmpresa, False, -1, -1, -1, ContratoEditado.CveMoneda, ContratoEditado.ModalidadDetalle, CveContratoTipo:=ContratoEditado.CveContratoTipo, CveContratosEstatus:=ContratoEditado.CveContratosEstatus)
-
- If Editar = True Then
- ContratoEditado.Commit()
- Alert("El contrato se modificó correctamente.")
- End If
End If
Catch ex As Exception
@@ -116,9 +96,9 @@ Partial Class ListadoContratos
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
+
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
- Page.Response.Write("")
Dim fechaInicial As DateTime
Dim fechaFinal As DateTime
@@ -126,7 +106,7 @@ Partial Class ListadoContratos
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
TxtObservaciones.Text = GvRow.DataKey("DescripcionContrato")
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
- 'DdlTransporte.SelectedValue = GvRow.DataKey("CveActivoFijo")
+ DdlTransporte.SelectedValue = GvRow.DataKey("CveTipoAF")
If DateTime.TryParse(GvRow.DataKey("FechaInicial").ToString, fechaInicial) And DateTime.TryParse(GvRow.DataKey("FechaFinal").ToString, fechaFinal) Then
TxtFechaSalida.Text = fechaInicial.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
TxtFechaRegreso.Text = fechaFinal.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
diff --git a/Transportes/ListadoViajes.aspx b/Transportes/ListadoViajes.aspx
index 9d52a1a92..c22a2f64a 100644
--- a/Transportes/ListadoViajes.aspx
+++ b/Transportes/ListadoViajes.aspx
@@ -14,17 +14,21 @@
.fecha {
padding: 3px;
}
- .masivo{
- color:green;
- }
+ .masivo {
+ color: green;
+ }