-- option strict on
This commit is contained in:
@@ -39,7 +39,7 @@ Partial Class Acarreos_Acarreos
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveAcarreo")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveAcarreo(HdnID.Value) Then
|
||||
If ObjAcar.RemoveAcarreo(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -49,7 +49,7 @@ Partial Class Acarreos_Acarreos
|
||||
|
||||
Private Sub GvAcarreo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvAcarreo.RowDataBound
|
||||
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").ForeColor = Drawing.Color.Green
|
||||
|
||||
@@ -58,7 +58,7 @@ Partial Class Acarreos_Acarreos
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveTipoAcarreo") = True Then
|
||||
If e.Row.DBCampo("CveTipoAcarreo") = "True" Then
|
||||
e.Row.FCLabel("LblTipoAcarreo").Text = "Destino"
|
||||
|
||||
Else
|
||||
|
||||
@@ -80,7 +80,7 @@ Partial Class Acarreos_AcarreosAutoConciliacion
|
||||
|
||||
Private Sub CargaGvNoMatch()
|
||||
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.DataBind()
|
||||
End If
|
||||
@@ -109,7 +109,7 @@ Partial Class Acarreos_AcarreosAutoConciliacion
|
||||
|
||||
Private Sub CargaGvMatch()
|
||||
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.DataBind()
|
||||
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("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"
|
||||
|
||||
Else
|
||||
|
||||
@@ -31,7 +31,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
|
||||
ObjAcar.IniciaTransacSQL()
|
||||
For Each Gvr As GridViewRow In GvPreEstimacion.Rows
|
||||
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
|
||||
Exit For
|
||||
End If
|
||||
@@ -80,7 +80,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
|
||||
|
||||
Private Sub CargaDdlNumContrato()
|
||||
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.DataSource = ObjAcar.DtResultados
|
||||
DdlNumContrato.DataBind()
|
||||
@@ -94,7 +94,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
|
||||
GvPreEstimacion.DataBind()
|
||||
If Not DdlTransportista.SelectedValue = "-1" Then
|
||||
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.DataBind()
|
||||
End If
|
||||
@@ -113,7 +113,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
|
||||
If Not DdlNumContrato.SelectedValue = "-1" Then
|
||||
DdlTransportista.Items.Clear()
|
||||
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.DataSource = ObjAcar.DtResultados
|
||||
DdlTransportista.DataBind()
|
||||
@@ -131,7 +131,7 @@ Partial Class Acarreos_AcarreosPreEstimacion
|
||||
DdlMaterial.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlMaterial.DataBind()
|
||||
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.DataBind()
|
||||
End If
|
||||
|
||||
@@ -211,7 +211,7 @@ Partial Class Acarreos_CatChoferes
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveChofer(HdnID.Value, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAcar.RemoveChofer(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
@@ -223,7 +223,7 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound
|
||||
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").ForeColor = Drawing.Color.Green
|
||||
|
||||
@@ -247,9 +247,9 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
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()
|
||||
|
||||
End If
|
||||
@@ -271,11 +271,10 @@ Partial Class Acarreos_CatChoferes
|
||||
DdlLocalidad.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.DataBind()
|
||||
|
||||
DdlColonia.DataSource = GlobalDTGralColonias("-1", "-1", "-1", DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=If(TxtCP.Text.Trim.Length > 0, TxtCP.Text.ToEntero, -1))
|
||||
DdlColonia.DataBind()
|
||||
|
||||
@@ -283,27 +282,18 @@ Partial Class Acarreos_CatChoferes
|
||||
|
||||
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlLocalidad.SelectedValueExist(-1)
|
||||
|
||||
|
||||
DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1"))
|
||||
DdlColonia.SelectedValueExist(-1)
|
||||
|
||||
|
||||
UpAddChofer.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlColonias_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlColonia.SelectedValue.ToEntero > 0 Then
|
||||
validaCodigoPostal()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub validaCodigoPostal()
|
||||
|
||||
Dim CPTxt As Integer = TxtCP.Text.ToEntero()
|
||||
|
||||
@@ -25,7 +25,7 @@ Partial Class Acarreos_CatMateriales
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
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()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -76,7 +76,7 @@ Partial Class Acarreos_CatMateriales
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveMaterial")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveMaterial(HdnID.Value) Then
|
||||
If ObjAcar.RemoveMaterial(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -86,7 +86,7 @@ Partial Class Acarreos_CatMateriales
|
||||
|
||||
Private Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMaterial.RowDataBound
|
||||
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").ForeColor = Drawing.Color.Green
|
||||
|
||||
|
||||
@@ -41,16 +41,16 @@ Partial Class Acarreos_CatTransportistas
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAcar.AddTransportista(TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue) Then
|
||||
CargaDatos()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
If ObjAcar.AddTransportista(TxtTransportista.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero) Then
|
||||
CargaDatos()
|
||||
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
|
||||
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"))
|
||||
ObjAcar.Dispose()
|
||||
UpDatos.Update()
|
||||
@@ -90,7 +90,7 @@ Partial Class Acarreos_CatTransportistas
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveTransportista")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveTransportista(HdnID.Value) Then
|
||||
If ObjAcar.RemoveTransportista(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -100,7 +100,7 @@ Partial Class Acarreos_CatTransportistas
|
||||
|
||||
Private Sub GvTransportista_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTransportista.RowDataBound
|
||||
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").ForeColor = Drawing.Color.Green
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ Partial Class Acarreos_CatUnidades
|
||||
Dim Estatus = 0
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
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()
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
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()
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -103,7 +103,7 @@ Partial Class Acarreos_CatUnidades
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveUnidad")
|
||||
UpDatos.Update()
|
||||
If ObjAcar.RemoveUnidad(HdnID.Value) Then
|
||||
If ObjAcar.RemoveUnidad(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -113,7 +113,7 @@ Partial Class Acarreos_CatUnidades
|
||||
|
||||
Private Sub GvUnidad_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvUnidad.RowDataBound
|
||||
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").ForeColor = Drawing.Color.Green
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ Partial Class Acarreos_ContratosAcarreos
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveAcarreoProyecto")
|
||||
UpDatos.Update()
|
||||
If Not ObjAcar.RemoveAcarreosMaterialVolumen(HdnID.Value) Then
|
||||
If Not ObjAcar.RemoveAcarreosMaterialVolumen(HdnID.Value.ToEntero) Then
|
||||
ErrorClasif = True
|
||||
End If
|
||||
If Not ObjAcar.RemoveAcarreosTarifas(HdnID.Value) Then
|
||||
If Not ObjAcar.RemoveAcarreosTarifas(HdnID.Value.ToEntero) Then
|
||||
ErrorClasif = True
|
||||
End If
|
||||
If Not ObjAcar.RemoveAcarreosProyectos(HdnID.Value) Then
|
||||
If Not ObjAcar.RemoveAcarreosProyectos(HdnID.Value.ToEntero) Then
|
||||
ErrorClasif = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -93,11 +93,10 @@ Partial Class Acarreos_ContratosAcarreos
|
||||
DdlSubProyectoOrigen.SelectedValue = dr("CveSubProyectoOrigen").ToString
|
||||
TxtDescripcion.Text = dr("Descripcion").ToString
|
||||
TxtNumContrato.Text = dr("NumContrato").ToString
|
||||
TxtFechaInicio.Text = dr("FechaInicio").ToString.ToDate
|
||||
TxtFechaFin.Text = dr("FechaFin").ToString.ToDate
|
||||
TxtFechaInicio.Text = dr("FechaInicio").ToString.ToDate.ToShortDateString
|
||||
TxtFechaFin.Text = dr("FechaFin").ToString.ToDate.ToShortDateString
|
||||
BtnAgregarContratoAcarreo.Text = "Guardar Cambios"
|
||||
DTMaterialVolumen = GvMaterialVolumen.DataSource
|
||||
DTTarifa = GvTarifa.DataSource
|
||||
|
||||
End If
|
||||
ObjAcar.Dispose()
|
||||
End If
|
||||
@@ -252,31 +251,31 @@ Partial Class Acarreos_ContratosAcarreos
|
||||
ErrorClasif = True
|
||||
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
|
||||
End If
|
||||
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
|
||||
End If
|
||||
Next
|
||||
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
|
||||
End If
|
||||
Next
|
||||
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
|
||||
End If
|
||||
_CveAcarreoProyecto = ObjAcar._CveAcarreoProyecto
|
||||
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
|
||||
End If
|
||||
Next
|
||||
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
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -121,7 +121,7 @@ Partial Class Acarreos_RepAcarreos
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
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.DataBind()
|
||||
End If
|
||||
|
||||
@@ -33,14 +33,14 @@ Partial Class Acarreos_RepAcarreosDetalle
|
||||
CargaDdlTransportista()
|
||||
CargaDdlMaterial()
|
||||
CargaDdlNumContrato()
|
||||
DdlAgrupador.SelectedValue = IfNull(Request("Grupo"), "1").ToString.ToEntero
|
||||
DdlChofer.SelectedValue = IfNull(Request("CveChofer"), "-1").ToString.ToEntero
|
||||
DdlSubProyectoOrigen.SelectedValue = IfNull(Request("CveSubProyectoOrigen"), "-1").ToString.ToEntero
|
||||
DdlSubProyectoDestino.SelectedValue = IfNull(Request("CveSubProyectoDestino"), "-1").ToString.ToEntero
|
||||
DdlTransportista.SelectedValue = IfNull(Request("CveTransportista"), "-1").ToString.ToEntero
|
||||
DdlUnidad.SelectedValue = IfNull(Request("CveUnidad"), "-1").ToString.ToEntero
|
||||
DdlMaterial.SelectedValue = IfNull(Request("CveMaterial"), "-1").ToString.ToEntero
|
||||
DdlNumContrato.SelectedValue = IfNull(Request("CveAcarreoProyecto"), "-1").ToString.ToEntero
|
||||
DdlAgrupador.SelectedValue = IfNull(Request("Grupo"), "1").ToString
|
||||
DdlChofer.SelectedValue = IfNull(Request("CveChofer"), "-1").ToString
|
||||
DdlSubProyectoOrigen.SelectedValue = IfNull(Request("CveSubProyectoOrigen"), "-1").ToString
|
||||
DdlSubProyectoDestino.SelectedValue = IfNull(Request("CveSubProyectoDestino"), "-1").ToString
|
||||
DdlTransportista.SelectedValue = IfNull(Request("CveTransportista"), "-1").ToString
|
||||
DdlUnidad.SelectedValue = IfNull(Request("CveUnidad"), "-1").ToString
|
||||
DdlMaterial.SelectedValue = IfNull(Request("CveMaterial"), "-1").ToString
|
||||
DdlNumContrato.SelectedValue = IfNull(Request("CveAcarreoProyecto"), "-1").ToString
|
||||
Gpo = IfNull(Request("Gpo"), "-1").ToString
|
||||
txtFechaF.Text = IfNull(Request("FFinal"), "-1").ToString
|
||||
txtFechaI.Text = IfNull(Request("FInicial"), "-1").ToString
|
||||
@@ -62,7 +62,7 @@ Partial Class Acarreos_RepAcarreosDetalle
|
||||
|
||||
Private Sub CargaDatos()
|
||||
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.DataBind()
|
||||
Gpo = "-1"
|
||||
@@ -143,7 +143,7 @@ Partial Class Acarreos_RepAcarreosDetalle
|
||||
e.Row.FCLiteral("LtlUnidad").Text = e.Row.DBCampo("Unidad")
|
||||
e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("Volumen")
|
||||
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")
|
||||
End If
|
||||
e.Row.FCLiteral("LtlVolumen").Text = e.Row.DBCampo("TotalVolumen")
|
||||
|
||||
@@ -120,9 +120,9 @@ Partial Class Acarreos_RepContratosAcarreos
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
Dim ObjAcar As New ClsAcarreos()
|
||||
If ObjAcar.GetRepContratosAcarreos(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
DdlNumContrato.SelectedValue, DdlTransportista.SelectedValue, DdlSubProyectoOrigen.SelectedValue,
|
||||
DdlSubProyectoDestino.SelectedValue, DdlProveedor.SelectedValue,
|
||||
DdlMaterial.SelectedValue, DdlAgrupador.SelectedValue) Then
|
||||
DdlNumContrato.SelectedValue.ToEntero, DdlTransportista.SelectedValue.ToEntero, DdlSubProyectoOrigen.SelectedValue.ToEntero,
|
||||
DdlSubProyectoDestino.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||
DdlMaterial.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjAcar.DtResultados
|
||||
GvDatos.DataBind()
|
||||
DTCont = ObjAcar.DtResultados
|
||||
|
||||
@@ -106,15 +106,15 @@ Partial Class Acarreos_RepContratosAcarreosDetalle
|
||||
CargaDatos()
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
NumAcarreosEstimados = FormatNumber(NumAcarreosEstimados + Gvr.DataKey("NumAcarreosEstimados"), 2, , , TriState.True)
|
||||
NumAcarreosXEstimar = FormatNumber(NumAcarreosXEstimar + Gvr.DataKey("NumAcarreosXEstimar"), 2, , , TriState.True)
|
||||
NumAcarreosEstimados = NumAcarreosEstimados + Gvr.DataKey("NumAcarreosEstimados").ToEntero
|
||||
NumAcarreosXEstimar = NumAcarreosXEstimar + Gvr.DataKey("NumAcarreosXEstimar").ToEntero
|
||||
|
||||
If Gvr.DataKey("SerieFolio") = "" Then
|
||||
VolXEstimar = FormatNumber(VolXEstimar + Gvr.DataKey("VolTot"), 2, , , TriState.True)
|
||||
PresXEstimar = FormatNumber(PresXEstimar + Gvr.DataKey("Importe"), 2, , , TriState.True)
|
||||
VolXEstimar = VolXEstimar + Gvr.DataKey("VolTot").ToDouble
|
||||
PresXEstimar = PresXEstimar + Gvr.DataKey("Importe").ToDouble
|
||||
Else
|
||||
VolEstimado = FormatNumber(VolEstimado + Gvr.DataKey("VolTot"), 2, , , TriState.True)
|
||||
PresEstimado = FormatNumber(PresEstimado + Gvr.DataKey("Importe"), 2, , , TriState.True)
|
||||
VolEstimado = VolEstimado + Gvr.DataKey("VolTot").ToDouble
|
||||
PresEstimado = PresEstimado + Gvr.DataKey("Importe").ToDouble
|
||||
End If
|
||||
Next
|
||||
LblVolEstimado.Text = FormatNumber(VolEstimado.ToString, 2, , , TriState.True)
|
||||
|
||||
Reference in New Issue
Block a user