-- option strict on

This commit is contained in:
2023-08-23 00:03:35 -07:00
parent a9e785216f
commit 407256f079
13 changed files with 66 additions and 77 deletions

View File

@@ -39,7 +39,7 @@ Partial Class Acarreos_Acarreos
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveAcarreo") HdnID.Value = GvRow.DataKey("CveAcarreo")
UpDatos.Update() UpDatos.Update()
If ObjAcar.RemoveAcarreo(HdnID.Value) Then If ObjAcar.RemoveAcarreo(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -49,7 +49,7 @@ Partial Class Acarreos_Acarreos
Private Sub GvAcarreo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcarreo.RowDataBound Private Sub GvAcarreo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcarreo.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveEstatus") = True Then If e.Row.DBCampo("CveEstatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
@@ -58,7 +58,7 @@ Partial Class Acarreos_Acarreos
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
End If End If
If e.Row.DBCampo("CveTipoAcarreo") = True Then If e.Row.DBCampo("CveTipoAcarreo") = "True" Then
e.Row.FCLabel("LblTipoAcarreo").Text = "Destino" e.Row.FCLabel("LblTipoAcarreo").Text = "Destino"
Else Else

View File

@@ -80,7 +80,7 @@ Partial Class Acarreos_AcarreosAutoConciliacion
Private Sub CargaGvNoMatch() Private Sub CargaGvNoMatch()
Dim ObjAcar As New ClsAcarreos() Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetAcarreosConcluidosNoMatch(DdlSubProyectoOrigen.SelectedValue, DdlSubProyectoDestino.SelectedValue, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, DdlUnidad.SelectedValue, DdlChofer.SelectedValue, DdlMaterial.SelectedValue, DdlNumContrato.SelectedValue) Then If ObjAcar.GetAcarreosConcluidosNoMatch(DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue.ToEntero, DdlUnidad.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, DdlMaterial.SelectedValue.ToEntero, DdlNumContrato.SelectedValue.ToEntero) Then
GvDatosNoMatch.DataSource = ObjAcar.DtResultados GvDatosNoMatch.DataSource = ObjAcar.DtResultados
GvDatosNoMatch.DataBind() GvDatosNoMatch.DataBind()
End If End If
@@ -109,7 +109,7 @@ Partial Class Acarreos_AcarreosAutoConciliacion
Private Sub CargaGvMatch() Private Sub CargaGvMatch()
Dim ObjAcar As New ClsAcarreos() Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetAcarreosConcluidosMatch(DdlSubProyectoOrigen.SelectedValue, DdlSubProyectoDestino.SelectedValue, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, DdlUnidad.SelectedValue, DdlChofer.SelectedValue, DdlMaterial.SelectedValue, DdlNumContrato.SelectedValue) Then If ObjAcar.GetAcarreosConcluidosMatch(DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue.ToEntero, DdlUnidad.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, DdlMaterial.SelectedValue.ToEntero, DdlNumContrato.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjAcar.DtResultados GvDatos.DataSource = ObjAcar.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
End If End If
@@ -168,7 +168,7 @@ Partial Class Acarreos_AcarreosAutoConciliacion
e.Row.FCLiteral("LtlVolumen").Text = FormatNumber(e.Row.FCLiteral("LtlVolumen").Text, 2, , , TriState.True) e.Row.FCLiteral("LtlVolumen").Text = FormatNumber(e.Row.FCLiteral("LtlVolumen").Text, 2, , , TriState.True)
e.Row.FCLiteral("LtlKm").Text = FormatNumber(e.Row.FCLiteral("LtlKm").Text, 2, , , TriState.True) e.Row.FCLiteral("LtlKm").Text = FormatNumber(e.Row.FCLiteral("LtlKm").Text, 2, , , TriState.True)
If e.Row.DBCampo("CveTipoAcarreo") = True Then If e.Row.DBCampo("CveTipoAcarreo") = "True" Then
e.Row.FCLabel("LblTipoAcarreo").Text = "Destino" e.Row.FCLabel("LblTipoAcarreo").Text = "Destino"
Else Else

View File

@@ -31,7 +31,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
ObjAcar.IniciaTransacSQL() ObjAcar.IniciaTransacSQL()
For Each Gvr As GridViewRow In GvPreEstimacion.Rows For Each Gvr As GridViewRow In GvPreEstimacion.Rows
If CType(Gvr.FindControl("ChkRow"), System.Web.UI.WebControls.CheckBox).Checked = True Then If CType(Gvr.FindControl("ChkRow"), System.Web.UI.WebControls.CheckBox).Checked = True Then
If Not ObjAcar.AddPreEstimacion(DdlNumContrato.SelectedValue, DdlTransportista.SelectedValue, TxtNumPreEstimacion.Text, TxtFechaPreEstimacion.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Not ObjAcar.AddPreEstimacion(DdlNumContrato.SelectedValue.ToEntero, DdlTransportista.SelectedValue.ToEntero, TxtNumPreEstimacion.Text.ToEntero, TxtFechaPreEstimacion.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
ErrorAdd = True ErrorAdd = True
Exit For Exit For
End If End If
@@ -80,7 +80,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
Private Sub CargaDdlNumContrato() Private Sub CargaDdlNumContrato()
Dim ObjAcar As New ClsAcarreos Dim ObjAcar As New ClsAcarreos
If ObjAcar.GetAcarreosProyectos(-1, UsuarioActual.CveEmpresa, -1, -1) Then If ObjAcar.GetAcarreosProyectos(-1, UsuarioActual.CveEmpresa, -1, "-1") Then
DdlNumContrato.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlNumContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlNumContrato.DataSource = ObjAcar.DtResultados DdlNumContrato.DataSource = ObjAcar.DtResultados
DdlNumContrato.DataBind() DdlNumContrato.DataBind()
@@ -94,7 +94,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
GvPreEstimacion.DataBind() GvPreEstimacion.DataBind()
If Not DdlTransportista.SelectedValue = "-1" Then If Not DdlTransportista.SelectedValue = "-1" Then
Dim ObjAcar As New ClsAcarreos Dim ObjAcar As New ClsAcarreos
If ObjAcar.GetAcarreosConcluidos(DdlTransportista.SelectedValue, UsuarioActual.CveEmpresa, DdlNumContrato.SelectedValue, 0, DdlMaterial.SelectedValue) Then If ObjAcar.GetAcarreosConcluidos(DdlTransportista.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlNumContrato.SelectedValue.ToEntero, 0, DdlMaterial.SelectedValue.ToEntero) Then
GvPreEstimacion.DataSource = ObjAcar.DtResultados GvPreEstimacion.DataSource = ObjAcar.DtResultados
GvPreEstimacion.DataBind() GvPreEstimacion.DataBind()
End If End If
@@ -113,7 +113,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
If Not DdlNumContrato.SelectedValue = "-1" Then If Not DdlNumContrato.SelectedValue = "-1" Then
DdlTransportista.Items.Clear() DdlTransportista.Items.Clear()
Dim ObjAcar As New ClsAcarreos Dim ObjAcar As New ClsAcarreos
If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1, DdlNumContrato.SelectedValue) Then If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1, DdlNumContrato.SelectedValue.ToEntero) Then
DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlTransportista.DataSource = ObjAcar.DtResultados DdlTransportista.DataSource = ObjAcar.DtResultados
DdlTransportista.DataBind() DdlTransportista.DataBind()
@@ -131,7 +131,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlMaterial.DataBind() DdlMaterial.DataBind()
Dim ObjAcar As New ClsAcarreos Dim ObjAcar As New ClsAcarreos
If ObjAcar.GetAcarreosMaterialVolumen(DdlNumContrato.SelectedValue, UsuarioActual.CveEmpresa, -1) Then If ObjAcar.GetAcarreosMaterialVolumen(DdlNumContrato.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1) Then
DdlMaterial.DataSource = ObjAcar.DtResultados DdlMaterial.DataSource = ObjAcar.DtResultados
DdlMaterial.DataBind() DdlMaterial.DataBind()
End If End If

View File

@@ -211,7 +211,7 @@ Partial Class Acarreos_CatChoferes
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveChofer") HdnID.Value = GvRow.DataKey("CveChofer")
UpDatos.Update() UpDatos.Update()
If ObjAcar.RemoveChofer(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjAcar.RemoveChofer(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
Else Else
@@ -223,7 +223,7 @@ Partial Class Acarreos_CatChoferes
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
@@ -247,9 +247,9 @@ Partial Class Acarreos_CatChoferes
DdlMunicipio.Items.Clear() DdlMunicipio.Items.Clear()
If DdlEstado.SelectedValue > 0 Then If DdlEstado.SelectedValue.ToEntero > 0 Then
DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue) DdlMunicipio.DataSource = GlobalDTGralMunicipios("-1", CveEstado:=DdlEstado.SelectedValue.ToEntero)
DdlMunicipio.DataBind() DdlMunicipio.DataBind()
End If End If
@@ -271,11 +271,10 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.Items.Clear() DdlLocalidad.Items.Clear()
DdlColonia.Items.Clear() DdlColonia.Items.Clear()
If DdlMunicipio.SelectedValue > 0 Then If DdlMunicipio.SelectedValue.ToEntero > 0 Then
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero)
DdlLocalidad.DataBind() DdlLocalidad.DataBind()
DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1)) DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1))
DdlColonia.DataBind() DdlColonia.DataBind()
@@ -283,27 +282,18 @@ Partial Class Acarreos_CatChoferes
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1")) DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
DdlLocalidad.SelectedValueExist(-1) DdlLocalidad.SelectedValueExist(-1)
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1")) DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
DdlColonia.SelectedValueExist(-1) DdlColonia.SelectedValueExist(-1)
UpAddChofer.Update() UpAddChofer.Update()
End Sub End Sub
Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs) Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs)
If DdlColonia.SelectedValue.ToEntero > 0 Then If DdlColonia.SelectedValue.ToEntero > 0 Then
validaCodigoPostal() validaCodigoPostal()
End If End If
End Sub End Sub
Private Sub validaCodigoPostal() Private Sub validaCodigoPostal()
Dim CPTxt As Integer = TxtCP.Text.ToEntero() Dim CPTxt As Integer = TxtCP.Text.ToEntero()

View File

@@ -25,7 +25,7 @@ Partial Class Acarreos_CatMateriales
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
ElseIf HdnModalidad.Value = "U" Then ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateMaterial(HdnID.Value, TxtMaterial.Text, Estatus, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjAcar.UpdateMaterial(HdnID.Value.ToEntero, TxtMaterial.Text, Estatus, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -76,7 +76,7 @@ Partial Class Acarreos_CatMateriales
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveMaterial") HdnID.Value = GvRow.DataKey("CveMaterial")
UpDatos.Update() UpDatos.Update()
If ObjAcar.RemoveMaterial(HdnID.Value) Then If ObjAcar.RemoveMaterial(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -86,7 +86,7 @@ Partial Class Acarreos_CatMateriales
Private Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMaterial.RowDataBound Private Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMaterial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green

View File

@@ -41,16 +41,16 @@ Partial Class Acarreos_CatTransportistas
Dim Estatus = 0 Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then If HdnModalidad.Value = "A" Then
If ObjAcar.AddTransportista(TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue) Then If ObjAcar.AddTransportista(TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateTransportista(HdnID.Value.ToEntero, TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlProveedor.SelectedValue.ToEntero) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
End If End If
ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateTransportista(HdnID.Value, TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlProveedor.SelectedValue) Then
CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddTransportista")) RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddTransportista"))
ObjAcar.Dispose() ObjAcar.Dispose()
UpDatos.Update() UpDatos.Update()
@@ -90,7 +90,7 @@ Partial Class Acarreos_CatTransportistas
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveTransportista") HdnID.Value = GvRow.DataKey("CveTransportista")
UpDatos.Update() UpDatos.Update()
If ObjAcar.RemoveTransportista(HdnID.Value) Then If ObjAcar.RemoveTransportista(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -100,7 +100,7 @@ Partial Class Acarreos_CatTransportistas
Private Sub GvTransportista_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTransportista.RowDataBound Private Sub GvTransportista_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTransportista.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green

View File

@@ -33,12 +33,12 @@ Partial Class Acarreos_CatUnidades
Dim Estatus = 0 Dim Estatus = 0
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = 1
If HdnModalidad.Value = "A" Then If HdnModalidad.Value = "A" Then
If ObjAcar.AddUnidad(TxtUnidadCodigo.Text, TxtUnidad.Text, UsuarioActual.CveUsuario, DdlTransportista.SelectedValue) Then If ObjAcar.AddUnidad(TxtUnidadCodigo.Text, TxtUnidad.Text, UsuarioActual.CveUsuario, DdlTransportista.SelectedValue.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
ElseIf HdnModalidad.Value = "U" Then ElseIf HdnModalidad.Value = "U" Then
If ObjAcar.UpdateUnidad(HdnID.Value, TxtUnidadCodigo.Text, TxtUnidad.Text, UsuarioActual.CveUsuario, DdlTransportista.SelectedValue, Estatus) Then If ObjAcar.UpdateUnidad(HdnID.Value.ToEntero, TxtUnidadCodigo.Text, TxtUnidad.Text, UsuarioActual.CveUsuario, DdlTransportista.SelectedValue.ToEntero, Estatus) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -103,7 +103,7 @@ Partial Class Acarreos_CatUnidades
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveUnidad") HdnID.Value = GvRow.DataKey("CveUnidad")
UpDatos.Update() UpDatos.Update()
If ObjAcar.RemoveUnidad(HdnID.Value) Then If ObjAcar.RemoveUnidad(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -113,7 +113,7 @@ Partial Class Acarreos_CatUnidades
Private Sub GvUnidad_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvUnidad.RowDataBound Private Sub GvUnidad_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvUnidad.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("Estatus") = True Then If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").Text = "Activo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green

View File

@@ -34,13 +34,13 @@ Partial Class Acarreos_ContratosAcarreos
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveAcarreoProyecto") HdnID.Value = GvRow.DataKey("CveAcarreoProyecto")
UpDatos.Update() UpDatos.Update()
If Not ObjAcar.RemoveAcarreosMaterialVolumen(HdnID.Value) Then If Not ObjAcar.RemoveAcarreosMaterialVolumen(HdnID.Value.ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
If Not ObjAcar.RemoveAcarreosTarifas(HdnID.Value) Then If Not ObjAcar.RemoveAcarreosTarifas(HdnID.Value.ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
If Not ObjAcar.RemoveAcarreosProyectos(HdnID.Value) Then If Not ObjAcar.RemoveAcarreosProyectos(HdnID.Value.ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If

View File

@@ -93,11 +93,10 @@ Partial Class Acarreos_ContratosAcarreos
DdlSubProyectoOrigen.SelectedValue = dr("CveSubProyectoOrigen").ToString DdlSubProyectoOrigen.SelectedValue = dr("CveSubProyectoOrigen").ToString
TxtDescripcion.Text = dr("Descripcion").ToString TxtDescripcion.Text = dr("Descripcion").ToString
TxtNumContrato.Text = dr("NumContrato").ToString TxtNumContrato.Text = dr("NumContrato").ToString
TxtFechaInicio.Text = dr("FechaInicio").ToString.ToDate TxtFechaInicio.Text = dr("FechaInicio").ToString.ToDate.ToShortDateString
TxtFechaFin.Text = dr("FechaFin").ToString.ToDate TxtFechaFin.Text = dr("FechaFin").ToString.ToDate.ToShortDateString
BtnAgregarContratoAcarreo.Text = "Guardar Cambios" BtnAgregarContratoAcarreo.Text = "Guardar Cambios"
DTMaterialVolumen = GvMaterialVolumen.DataSource
DTTarifa = GvTarifa.DataSource
End If End If
ObjAcar.Dispose() ObjAcar.Dispose()
End If End If
@@ -252,31 +251,31 @@ Partial Class Acarreos_ContratosAcarreos
ErrorClasif = True ErrorClasif = True
End If End If
If Not ObjAcar.UpdateAcarreosProyectos(CveAcarreoProyecto, DdlSubProyectoOrigen.SelectedValue, DdlSubProyectoDestino.SelectedValue, TxtFechaInicio.Text, TxtFechaFin.Text, TxtNumContrato.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario) Then If Not ObjAcar.UpdateAcarreosProyectos(CveAcarreoProyecto, DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, TxtNumContrato.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario) Then
ErrorClasif = True ErrorClasif = True
End If End If
For Each Gvr As GridViewRow In GvMaterialVolumen.Rows For Each Gvr As GridViewRow In GvMaterialVolumen.Rows
If Not ObjAcar.AddAcarreosMaterialVolumen(Gvr.DataKey("CveMaterial").ToEntero, Gvr.DataKey("Volumen"), Gvr.DataKey("Presupuesto"), Gvr.DataKey("VolumenTipo"), CveAcarreoProyecto, Gvr.DataKey("CveUnidadMedida").ToEntero) Then If Not ObjAcar.AddAcarreosMaterialVolumen(Gvr.DataKey("CveMaterial").ToEntero, Gvr.DataKey("Volumen").ToDouble, Gvr.DataKey("Presupuesto").ToDouble, Gvr.DataKey("VolumenTipo").ToDouble, CveAcarreoProyecto, Gvr.DataKey("CveUnidadMedida").ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
Next Next
For Each Gvr As GridViewRow In GvTarifa.Rows For Each Gvr As GridViewRow In GvTarifa.Rows
If Not ObjAcar.AddAcarreosTarifas(Gvr.DataKey("Tarifa"), Gvr.DataKey("DistanciaInicio"), Gvr.DataKey("DistanciaFin"), CveAcarreoProyecto, Gvr.DataKey("CveTransportista"), Gvr.DataKey("CveMaterial")) Then If Not ObjAcar.AddAcarreosTarifas(Gvr.DataKey("Tarifa").ToDouble, Gvr.DataKey("DistanciaInicio").ToDouble, Gvr.DataKey("DistanciaFin").ToDouble, CveAcarreoProyecto, Gvr.DataKey("CveTransportista").ToEntero, Gvr.DataKey("CveMaterial").ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
Next Next
Else Else
If Not ObjAcar.AddAcarreosProyectos(DdlSubProyectoOrigen.SelectedValue, DdlSubProyectoDestino.SelectedValue, TxtFechaInicio.Text, TxtFechaFin.Text, UsuarioActual.CveEmpresa, TxtNumContrato.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario) Then If Not ObjAcar.AddAcarreosProyectos(DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, UsuarioActual.CveEmpresa, TxtNumContrato.Text, TxtDescripcion.Text, UsuarioActual.CveUsuario) Then
ErrorClasif = True ErrorClasif = True
End If End If
_CveAcarreoProyecto = ObjAcar._CveAcarreoProyecto _CveAcarreoProyecto = ObjAcar._CveAcarreoProyecto
For Each Gvr As GridViewRow In GvMaterialVolumen.Rows For Each Gvr As GridViewRow In GvMaterialVolumen.Rows
If Not ObjAcar.AddAcarreosMaterialVolumen(Gvr.DataKey("CveMaterial").ToEntero, Gvr.DataKey("Volumen"), Gvr.DataKey("Presupuesto"), Gvr.DataKey("VolumenTipo"), _CveAcarreoProyecto, Gvr.DataKey("CveUnidadMedida").ToEntero) Then If Not ObjAcar.AddAcarreosMaterialVolumen(Gvr.DataKey("CveMaterial").ToEntero, Gvr.DataKey("Volumen").ToDouble, Gvr.DataKey("Presupuesto").ToDouble, Gvr.DataKey("VolumenTipo").ToDouble, _CveAcarreoProyecto, Gvr.DataKey("CveUnidadMedida").ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
Next Next
For Each Gvr As GridViewRow In GvTarifa.Rows For Each Gvr As GridViewRow In GvTarifa.Rows
If Not ObjAcar.AddAcarreosTarifas(Gvr.DataKey("Tarifa"), Gvr.DataKey("DistanciaInicio"), Gvr.DataKey("DistanciaFin"), _CveAcarreoProyecto, Gvr.DataKey("CveTransportista"), Gvr.DataKey("CveMaterial")) Then If Not ObjAcar.AddAcarreosTarifas(Gvr.DataKey("Tarifa").ToDouble, Gvr.DataKey("DistanciaInicio").ToDouble, Gvr.DataKey("DistanciaFin").ToDouble, _CveAcarreoProyecto, Gvr.DataKey("CveTransportista").ToEntero, Gvr.DataKey("CveMaterial").ToEntero) Then
ErrorClasif = True ErrorClasif = True
End If End If
Next Next

View File

@@ -121,7 +121,7 @@ Partial Class Acarreos_RepAcarreos
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
Dim ObjAcar As New ClsAcarreos() Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetRepAcarreo(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyectoOrigen.SelectedValue, DdlTransportista.SelectedValue, DdlChofer.SelectedValue, DdlUnidad.SelectedValue, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue, DdlSubProyectoDestino.SelectedValue, DdlMaterial.SelectedValue, DdlNumContrato.SelectedValue) Then If ObjAcar.GetRepAcarreo(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlTransportista.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAgrupador.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, DdlMaterial.SelectedValue.ToEntero, DdlNumContrato.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjAcar.DtResultados GvDatos.DataSource = ObjAcar.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
End If End If

View File

@@ -33,14 +33,14 @@ Partial Class Acarreos_RepAcarreosDetalle
CargaDdlTransportista() CargaDdlTransportista()
CargaDdlMaterial() CargaDdlMaterial()
CargaDdlNumContrato() CargaDdlNumContrato()
DdlAgrupador.SelectedValue = IfNull(Request("Grupo"), "1").ToString.ToEntero DdlAgrupador.SelectedValue = IfNull(Request("Grupo"), "1").ToString
DdlChofer.SelectedValue = IfNull(Request("CveChofer"), "-1").ToString.ToEntero DdlChofer.SelectedValue = IfNull(Request("CveChofer"), "-1").ToString
DdlSubProyectoOrigen.SelectedValue = IfNull(Request("CveSubProyectoOrigen"), "-1").ToString.ToEntero DdlSubProyectoOrigen.SelectedValue = IfNull(Request("CveSubProyectoOrigen"), "-1").ToString
DdlSubProyectoDestino.SelectedValue = IfNull(Request("CveSubProyectoDestino"), "-1").ToString.ToEntero DdlSubProyectoDestino.SelectedValue = IfNull(Request("CveSubProyectoDestino"), "-1").ToString
DdlTransportista.SelectedValue = IfNull(Request("CveTransportista"), "-1").ToString.ToEntero DdlTransportista.SelectedValue = IfNull(Request("CveTransportista"), "-1").ToString
DdlUnidad.SelectedValue = IfNull(Request("CveUnidad"), "-1").ToString.ToEntero DdlUnidad.SelectedValue = IfNull(Request("CveUnidad"), "-1").ToString
DdlMaterial.SelectedValue = IfNull(Request("CveMaterial"), "-1").ToString.ToEntero DdlMaterial.SelectedValue = IfNull(Request("CveMaterial"), "-1").ToString
DdlNumContrato.SelectedValue = IfNull(Request("CveAcarreoProyecto"), "-1").ToString.ToEntero DdlNumContrato.SelectedValue = IfNull(Request("CveAcarreoProyecto"), "-1").ToString
Gpo = IfNull(Request("Gpo"), "-1").ToString Gpo = IfNull(Request("Gpo"), "-1").ToString
txtFechaF.Text = IfNull(Request("FFinal"), "-1").ToString txtFechaF.Text = IfNull(Request("FFinal"), "-1").ToString
txtFechaI.Text = IfNull(Request("FInicial"), "-1").ToString txtFechaI.Text = IfNull(Request("FInicial"), "-1").ToString
@@ -62,7 +62,7 @@ Partial Class Acarreos_RepAcarreosDetalle
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ObjAcar As New ClsAcarreos() Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetRepAcarreoDetalle(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyectoOrigen.SelectedValue, DdlTransportista.SelectedValue, DdlChofer.SelectedValue, DdlUnidad.SelectedValue, UsuarioActual.CveEmpresa, Gpo, DdlAgrupador.SelectedValue, DdlSubProyectoDestino.SelectedValue, DdlMaterial.SelectedValue, DdlNumContrato.SelectedValue) Then If ObjAcar.GetRepAcarreoDetalle(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyectoOrigen.SelectedValue.ToEntero, DdlTransportista.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Gpo, DdlAgrupador.SelectedValue.ToEntero, DdlSubProyectoDestino.SelectedValue.ToEntero, DdlMaterial.SelectedValue.ToEntero, DdlNumContrato.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjAcar.DtResultados GvDatos.DataSource = ObjAcar.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
Gpo = "-1" Gpo = "-1"
@@ -143,7 +143,7 @@ Partial Class Acarreos_RepAcarreosDetalle
e.Row.FCLiteral("LtlUnidad").Text = e.Row.DBCampo("Unidad") e.Row.FCLiteral("LtlUnidad").Text = e.Row.DBCampo("Unidad")
e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("Volumen") e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("Volumen")
If e.Row.DBCampo("Folio") = "" Then If e.Row.DBCampo("Folio") = "" Then
If DdlAgrupador.SelectedValue = 6 Or DdlAgrupador.SelectedValue = 7 Or DdlAgrupador.SelectedValue = 8 Then If DdlAgrupador.SelectedValue = "6" Or DdlAgrupador.SelectedValue = "7" Or DdlAgrupador.SelectedValue = "8" Then
e.Row.FCLiteral("LtlUnidad").Text = e.Row.DBCampo("Gpo") e.Row.FCLiteral("LtlUnidad").Text = e.Row.DBCampo("Gpo")
End If End If
e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("TotalVolumen") e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("TotalVolumen")

View File

@@ -120,9 +120,9 @@ Partial Class Acarreos_RepContratosAcarreos
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
Dim ObjAcar As New ClsAcarreos() Dim ObjAcar As New ClsAcarreos()
If ObjAcar.GetRepContratosAcarreos(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, If ObjAcar.GetRepContratosAcarreos(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
DdlNumContrato.SelectedValue, DdlTransportista.SelectedValue, DdlSubProyectoOrigen.SelectedValue, DdlNumContrato.SelectedValue.ToEntero, DdlTransportista.SelectedValue.ToEntero, DdlSubProyectoOrigen.SelectedValue.ToEntero,
DdlSubProyectoDestino.SelectedValue, DdlProveedor.SelectedValue, DdlSubProyectoDestino.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
DdlMaterial.SelectedValue, DdlAgrupador.SelectedValue) Then DdlMaterial.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjAcar.DtResultados GvDatos.DataSource = ObjAcar.DtResultados
GvDatos.DataBind() GvDatos.DataBind()
DTCont = ObjAcar.DtResultados DTCont = ObjAcar.DtResultados

View File

@@ -106,15 +106,15 @@ Partial Class Acarreos_RepContratosAcarreosDetalle
CargaDatos() CargaDatos()
For Each Gvr As GridViewRow In GvDatos.Rows For Each Gvr As GridViewRow In GvDatos.Rows
NumAcarreosEstimados = FormatNumber(NumAcarreosEstimados + Gvr.DataKey("NumAcarreosEstimados"), 2, , , TriState.True) NumAcarreosEstimados = NumAcarreosEstimados + Gvr.DataKey("NumAcarreosEstimados").ToEntero
NumAcarreosXEstimar = FormatNumber(NumAcarreosXEstimar + Gvr.DataKey("NumAcarreosXEstimar"), 2, , , TriState.True) NumAcarreosXEstimar = NumAcarreosXEstimar + Gvr.DataKey("NumAcarreosXEstimar").ToEntero
If Gvr.DataKey("SerieFolio") = "" Then If Gvr.DataKey("SerieFolio") = "" Then
VolXEstimar = FormatNumber(VolXEstimar + Gvr.DataKey("VolTot"), 2, , , TriState.True) VolXEstimar = VolXEstimar + Gvr.DataKey("VolTot").ToDouble
PresXEstimar = FormatNumber(PresXEstimar + Gvr.DataKey("Importe"), 2, , , TriState.True) PresXEstimar = PresXEstimar + Gvr.DataKey("Importe").ToDouble
Else Else
VolEstimado = FormatNumber(VolEstimado + Gvr.DataKey("VolTot"), 2, , , TriState.True) VolEstimado = VolEstimado + Gvr.DataKey("VolTot").ToDouble
PresEstimado = FormatNumber(PresEstimado + Gvr.DataKey("Importe"), 2, , , TriState.True) PresEstimado = PresEstimado + Gvr.DataKey("Importe").ToDouble
End If End If
Next Next
LblVolEstimado.Text = FormatNumber(VolEstimado.ToString, 2, , , TriState.True) LblVolEstimado.Text = FormatNumber(VolEstimado.ToString, 2, , , TriState.True)