option strict on

This commit is contained in:
2023-08-24 00:38:39 -07:00
parent 85d1bcd386
commit 4c6f8bbaef
15 changed files with 96 additions and 103 deletions

View File

@@ -104,7 +104,7 @@ Partial Class GPS_CatDispositivos
e.Row.VerticalAlign = VerticalAlign.Middle e.Row.VerticalAlign = VerticalAlign.Middle
' e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveDispositivo").ToString ' e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveDispositivo").ToString
If e.Row.DBCampo("CveEstatus") = 1 Then If e.Row.DBCampo("CveEstatus") = "1" 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

@@ -24,7 +24,7 @@ Partial Class GPS_CatModelos
e.Row.VerticalAlign = VerticalAlign.Middle e.Row.VerticalAlign = VerticalAlign.Middle
e.Row.FCHyperLink("ImgE").NavigateUrl = $"/GPS/WizardModelo.aspx?CveModelo={e.Row.DataKey("CveModelo").ToString}" e.Row.FCHyperLink("ImgE").NavigateUrl = $"/GPS/WizardModelo.aspx?CveModelo={e.Row.DataKey("CveModelo").ToString}"
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

@@ -19,7 +19,7 @@ Partial Class GPS_PlanesDatos
DdlProveedorComunicacion.DataBind() DdlProveedorComunicacion.DataBind()
End If End If
ObjGps.Dispose() ObjGps.Dispose()
DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", -1)) DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
@@ -37,12 +37,12 @@ Partial Class GPS_PlanesDatos
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 ObjGps.PlanesDatosAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text, Estatus, TxtCapacidad.Text, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text, UsuarioActual.CveEmpresa) Then If ObjGps.PlanesDatosAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text.ToDecimal, Estatus, TxtCapacidad.Text.ToEntero, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text, UsuarioActual.CveEmpresa) 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 ObjGps.PlanesDatosUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text, Estatus, TxtCapacidad.Text, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text) Then If ObjGps.PlanesDatosUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text.ToDecimal, Estatus, TxtCapacidad.Text.ToEntero, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -97,7 +97,7 @@ Partial Class GPS_PlanesDatos
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CvePlanDato") HdnID.Value = GvRow.DataKey("CvePlanDato")
UpDatos.Update() UpDatos.Update()
If ObjGps.PlanesDatosRemove(HdnID.Value) Then If ObjGps.PlanesDatosRemove(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -112,7 +112,7 @@ Partial Class GPS_PlanesDatos
Private Sub GvPlanesDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPlanesDatos.RowDataBound Private Sub GvPlanesDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPlanesDatos.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
@@ -120,7 +120,7 @@ Partial Class GPS_PlanesDatos
e.Row.FCLabel("LblEstatus").Text = "Inactivo" e.Row.FCLabel("LblEstatus").Text = "Inactivo"
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
End If End If
If e.Row.DBCampo("Importe") = True Then If e.Row.DBCampo("Importe") = "True" Then
e.Row.FCLabel("LblImporte").Text = "$" + e.Row.FCLabel("LblImporte").Text.FormatoNumero() e.Row.FCLabel("LblImporte").Text = "$" + e.Row.FCLabel("LblImporte").Text.FormatoNumero()
End If End If
End If End If

View File

@@ -48,7 +48,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
Private Sub CargaDdlClientes() Private Sub CargaDdlClientes()
Dim ObjGps As New ClsClientes() Dim ObjGps As New ClsClientes()
If ObjGps.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, -1, -1) Then If ObjGps.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, "-1", -1) Then
DdlFiltroCliente.DataSource = ObjGps.DtResultados DdlFiltroCliente.DataSource = ObjGps.DtResultados
DdlFiltroCliente.DataBind() DdlFiltroCliente.DataBind()
End If End If
@@ -128,7 +128,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
If UsuarioActual.Empresa.Funcionalidad(541) = "1" Then If UsuarioActual.Empresa.Funcionalidad(541) = "1" Then
Estatus = 0 Estatus = 0
End If End If
If ObjGps.ProveedoresComunicacionCuentasAdd(DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then If ObjGps.ProveedoresComunicacionCuentasAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then
CargaDatos() CargaDatos()
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -137,7 +137,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
envirCorreoActivacion() envirCorreoActivacion()
Estatus = 1 Estatus = 1
End If End If
If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -232,7 +232,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveProveedorComunicacionCuenta") HdnID.Value = GvRow.DataKey("CveProveedorComunicacionCuenta")
UpDatos.Update() UpDatos.Update()
If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value) Then If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
End If End If
@@ -247,7 +247,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
Private Sub GvProveedorComunicacionCuenta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvProveedorComunicacionCuenta.RowDataBound Private Sub GvProveedorComunicacionCuenta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvProveedorComunicacionCuenta.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
@@ -306,7 +306,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas
Dim Imei As String = TxtImei.Text Dim Imei As String = TxtImei.Text
Dim CveUsuarioResguardante As Integer = DDlResguardante.SelectedValue.ToEntero() Dim CveUsuarioResguardante As Integer = DDlResguardante.SelectedValue.ToEntero()
If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If

View File

@@ -12,15 +12,15 @@ Partial Class GPS_TipoComunicacion
Private Sub BtnAgregarTipoComunicacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoComunicacion.Click Private Sub BtnAgregarTipoComunicacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoComunicacion.Click
Dim ObjGps As New ClsGPS Dim ObjGps As New ClsGPS
Dim Estatus = 0 Dim Estatus As Boolean = False
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = True
If HdnModalidad.Value = "A" Then If HdnModalidad.Value = "A" Then
If ObjGps.TipoComunicacionAdd(TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then If ObjGps.TipoComunicacionAdd(TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) 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 ObjGps.TipoComunicacionUpdate(HdnID.Value, TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then If ObjGps.TipoComunicacionUpdate(HdnID.Value.ToEntero, TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then
CargaDatos() CargaDatos()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -66,7 +66,7 @@ Partial Class GPS_TipoComunicacion
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveTipoComunicacion") HdnID.Value = GvRow.DataKey("CveTipoComunicacion")
UpDatos.Update() UpDatos.Update()
If ObjGps.TipoComunicacionDelete(HdnID.Value) Then If ObjGps.TipoComunicacionDelete(HdnID.Value.ToEntero) Then
CargaDatos() CargaDatos()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -88,7 +88,7 @@ Partial Class GPS_TipoComunicacion
Private Sub GvTipoComunicacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTipoComunicacion.RowDataBound Private Sub GvTipoComunicacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTipoComunicacion.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

@@ -132,7 +132,7 @@ Partial Class GPS_RepCombustible2
If DTDatos.Rows.Count > 0 Then If DTDatos.Rows.Count > 0 Then
LtlDistancia.Text = $"{DTDatos.Rows(0)("KmRecorridos")}" LtlDistancia.Text = $"{DTDatos.Rows(0)("KmRecorridos")}"
lblVelocidad.Text = $"{DTDatos.Rows(0)("SPD")}" lblVelocidad.Text = $"{DTDatos.Rows(0)("SPD")}"
lblRendBruto.Text = $"{DTDatos.Rows(0)("KmRecorridos") / DTDatos.Rows(0)("CombustibleConsumido"):N2}" lblRendBruto.Text = $"{DTDatos.Rows(0)("KmRecorridos").ToString.ToDecimal / DTDatos.Rows(0)("CombustibleConsumido").ToString.ToDecimal:N2}"
LtlCombustibleInicial.Text = $"{DTDatos.Rows(0)("CombustibleInicial")}" LtlCombustibleInicial.Text = $"{DTDatos.Rows(0)("CombustibleInicial")}"
LtlCombustibleFinal.Text = $"{DTDatos.Rows(0)("CombustibleFinal")}" LtlCombustibleFinal.Text = $"{DTDatos.Rows(0)("CombustibleFinal")}"
LtlNoCargas.Text = $"{DTDatos.Rows(0)("CCargas")}" LtlNoCargas.Text = $"{DTDatos.Rows(0)("CCargas")}"
@@ -172,7 +172,7 @@ Partial Class GPS_RepCombustible2
' LtlCostoCombustibleF.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleFinal").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}" ' LtlCostoCombustibleF.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleFinal").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}"
' LtlCostoInicial.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}" ' LtlCostoInicial.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}"
' lCombustibleConsumido.Text = CombustibleConsumido.ToString.FormatoNumero ' lCombustibleConsumido.Text = CombustibleConsumido.ToString.FormatoNumero
lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString - GPS.DtResultados.Rows(0)("Horas").ToString.ToLong) / 60).ToString.FormatoNumero} Hrs." lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString.ToEntero - GPS.DtResultados.Rows(0)("Horas").ToString.ToLong) / 60).ToString.FormatoNumero} Hrs."
lblMovimiento.Text = $"{(GPS.DtResultados.Rows(0)("Horas").ToString.ToDecimal / 60).ToString.FormatoNumero} Hrs" lblMovimiento.Text = $"{(GPS.DtResultados.Rows(0)("Horas").ToString.ToDecimal / 60).ToString.FormatoNumero} Hrs"
LtlRalenti.Text = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString.FormatoNumero} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString} Minutos)" LtlRalenti.Text = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString.FormatoNumero} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString} Minutos)"

View File

@@ -16,8 +16,6 @@ Partial Class GPS_Soporte
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CargaDispositivos() CargaDispositivos()
@@ -45,7 +43,7 @@ Partial Class GPS_Soporte
Private Sub CargaDatos() Private Sub CargaDatos()
Dim GPS As New ClsGPS Dim GPS As New ClsGPS
If GPS.DispositivosGet(DdlDispositivo.SelectedValue, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then If GPS.DispositivosGet(DdlDispositivo.SelectedValue.ToEntero, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then
TxtIp.Text = GPS.DtResultados.Rows(0)("IP").ToString TxtIp.Text = GPS.DtResultados.Rows(0)("IP").ToString
TxtPuerto.Text = "80" TxtPuerto.Text = "80"
TxtAPN.Text = GPS.DtResultados.Rows(0)("APN").ToString TxtAPN.Text = GPS.DtResultados.Rows(0)("APN").ToString
@@ -85,7 +83,7 @@ Partial Class GPS_Soporte
If DdlTipoConsulta.SelectedValue = "Last" Then If DdlTipoConsulta.SelectedValue = "Last" Then
If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "Top 1") Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "Top 1") Then
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
Dim Coord As String = SQLToGmaps(GPS.DtResultados.Rows(0)("Punto"), "POINT") Dim Coord As String = SQLToGmaps(GPS.DtResultados.Rows(0)("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}');")
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
GvVLog.DataSource = GPS.DtResultados GvVLog.DataSource = GPS.DtResultados
@@ -98,7 +96,7 @@ Partial Class GPS_Soporte
If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "TOP 10") Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "TOP 10") Then
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng").ToString}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng").ToString}');")
Next Next
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
@@ -112,7 +110,7 @@ Partial Class GPS_Soporte
If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddHours(-1), DateTime.Today.AddDays(1)) Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddHours(-1), DateTime.Today.AddDays(1)) Then
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');")
Next Next
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
@@ -126,7 +124,7 @@ Partial Class GPS_Soporte
If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddDays(-1).AddHours(-1), DateTime.Today) Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddDays(-1).AddHours(-1), DateTime.Today) Then
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');")
Next Next
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
@@ -141,7 +139,7 @@ Partial Class GPS_Soporte
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = TmpDT.NewRow Dim dr As DataRow = TmpDT.NewRow
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');")
Next Next
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
@@ -158,7 +156,7 @@ Partial Class GPS_Soporte
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = TmpDT.NewRow Dim dr As DataRow = TmpDT.NewRow
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');")
Next Next
GvReportes.DataSource = GPS.DtResultados GvReportes.DataSource = GPS.DtResultados
@@ -219,10 +217,10 @@ Partial Class GPS_Soporte
Dim Var As String = "" Dim Var As String = ""
For Each coordenada As String In CoordsPuntos For Each coordenada As String In CoordsPuntos
If coordenada Is CoordsPuntos.Last Then If coordenada Is CoordsPuntos.Last Then
Dim latlng() As String = coordenada.Trim.Split(" ") Dim latlng() As String = coordenada.Trim.Split(" "c)
Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}" Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}"
Else Else
Dim latlng() As String = coordenada.Trim.Split(" ") Dim latlng() As String = coordenada.Trim.Split(" "c)
Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}," Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }},"
End If End If
Next Next
@@ -231,11 +229,11 @@ Partial Class GPS_Soporte
Private Sub CreaTmpDT(Opcion As String) Private Sub CreaTmpDT(Opcion As String)
TmpDT = New DataTable TmpDT = New DataTable
If Opcion = 1 Then If Opcion = "1" Then
TmpDT.Columns.Add("Fecha", GetType(String)) TmpDT.Columns.Add("Fecha", GetType(String))
TmpDT.Columns.Add("Valor", GetType(String)) TmpDT.Columns.Add("Valor", GetType(String))
TmpDT.Columns.Add("CveTrama", GetType(Integer)) TmpDT.Columns.Add("CveTrama", GetType(Integer))
ElseIf Opcion = 2 Then ElseIf Opcion = "2" Then
TmpDT.Columns.Add("Trama", GetType(String)) TmpDT.Columns.Add("Trama", GetType(String))
TmpDT.Columns.Add("CveTrama", GetType(Integer)) TmpDT.Columns.Add("CveTrama", GetType(Integer))
End If End If
@@ -255,7 +253,7 @@ Partial Class GPS_Soporte
Protected Sub BtnCargaLog_Click(sender As Object, e As EventArgs) Handles BtnCargaLog.Click Protected Sub BtnCargaLog_Click(sender As Object, e As EventArgs) Handles BtnCargaLog.Click
Dim GPS As New ClsGPS Dim GPS As New ClsGPS
If GPS.DispositivosGet(DdlDispositivo.SelectedValue, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then If GPS.DispositivosGet(DdlDispositivo.SelectedValue.ToEntero, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then
ltlSerieLog.Text = GPS.DtResultados.Rows(0)("Serie").ToString ltlSerieLog.Text = GPS.DtResultados.Rows(0)("Serie").ToString
Else Else
Alert("No se encontraron resultados con el equipo seleccionado", TipoMensaje.MsgAdvertencia) Alert("No se encontraron resultados con el equipo seleccionado", TipoMensaje.MsgAdvertencia)
@@ -278,10 +276,9 @@ Partial Class GPS_Soporte
Private Sub CargaLog() Private Sub CargaLog()
Dim GPS As New ClsGPS Dim GPS As New ClsGPS
CreaTmpDT(2) CreaTmpDT("2")
RegistraScript("DeleteMarkers();") RegistraScript("DeleteMarkers();")
If DdlTipoConsultaLog.SelectedValue = "Last" Then If DdlTipoConsultaLog.SelectedValue = "Last" Then
If GPS.GetRepDispositivo(DdlDispositivosLog.SelectedValue.ToEntero, MinFecha, MaxFecha) Then If GPS.GetRepDispositivo(DdlDispositivosLog.SelectedValue.ToEntero, MinFecha, MaxFecha) Then
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
@@ -330,7 +327,7 @@ Partial Class GPS_Soporte
If GPS.DtResultados.Rows.Count > 0 Then If GPS.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = TmpDT.NewRow Dim dr As DataRow = TmpDT.NewRow
For Each row As DataRow In GPS.DtResultados.Rows For Each row As DataRow In GPS.DtResultados.Rows
Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT")
dr = TmpDT.NewRow dr = TmpDT.NewRow
dr("Trama") = row("Trama").ToString dr("Trama") = row("Trama").ToString
dr("CveTrama") = row("CveTrama").ToString dr("CveTrama") = row("CveTrama").ToString
@@ -383,7 +380,7 @@ Partial Class GPS_Soporte
Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles btnAgregar.Click Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles btnAgregar.Click
Dim GPS As New ClsGPS Dim GPS As New ClsGPS
If GPS.DispositivosGet(-1, -1, DdlClientes.SelectedValue, UsuarioActual.CveEmpresa) Then If GPS.DispositivosGet(-1, -1, DdlClientes.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvConsultaM.DataSource = GPS.DtResultados GvConsultaM.DataSource = GPS.DtResultados
Else Else
GvConsultaM.DataSource = GPS.DtResultados GvConsultaM.DataSource = GPS.DtResultados

View File

@@ -65,7 +65,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("######.###") e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("######.###")
Else Else
e.Row.FCCheckBox("Chk").Visible = False e.Row.FCCheckBox("Chk").Visible = False
e.Row.FCRangeValidator("RVR").MaximumValue = 0 e.Row.FCRangeValidator("RVR").MaximumValue = "0"
End If End If
End If End If
End Sub End Sub
@@ -169,7 +169,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Cantidad = Row("Cantidad").ToString.ToDecimal() Cantidad = Row("Cantidad").ToString.ToDecimal()
Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal()
Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() Dim CveUM As Integer = Row("CveUM").ToString().ToEntero()
Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS").ToString().ToEntero()) 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS")).ToString().ToEntero() 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero()
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
Dim Serie As String = Row("Serie").ToString() Dim Serie As String = Row("Serie").ToString()
Dim Lote As String = Row("Lote").ToString() Dim Lote As String = Row("Lote").ToString()
@@ -329,7 +329,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "") Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "")
If Tipo = "EXCEL" Then If Tipo = "EXCEL" Then
Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero() Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero()
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}") Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
CargarArchivo(Directorio, file.filename, CveAlmacen, CveSubProyecto) CargarArchivo(Directorio, file.filename, CveAlmacen, CveSubProyecto)
Else Else
@@ -445,7 +445,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim SerieSalida As String = RowExistencia("Serie").ToString() Dim SerieSalida As String = RowExistencia("Serie").ToString()
Dim LoteSalida As String = RowExistencia("Lote").ToString() Dim LoteSalida As String = RowExistencia("Lote").ToString()
Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate
Dim PUSalida As Decimal = RowExistencia("PU").ToString() Dim PUSalida As Decimal = RowExistencia("PU").ToString.ToDecimal
'condicion para ajustar la seccion y permita hacer los cambios en el trigger 'condicion para ajustar la seccion y permita hacer los cambios en el trigger
If CveSeccionAlmacenSalida > 0 Then If CveSeccionAlmacenSalida > 0 Then

View File

@@ -213,14 +213,14 @@ Partial Class Inventarios_CatUnidades
If CveCamion <= 0 Then If CveCamion <= 0 Then
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then
Alert("Unidad agregada correctamente") Alert("Unidad agregada correctamente")
Else Else
ErrorPrceso = True ErrorPrceso = True
End If End If
Else Else
If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then
Alert("Unidad actualizada correctamente") Alert("Unidad actualizada correctamente")
Else Else
ErrorPrceso = True ErrorPrceso = True

View File

@@ -116,7 +116,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub CargaGvAlmacen() Private Sub CargaGvAlmacen()
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetallesAlmacen(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesAlmacen(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
GvAlmacen.DataSource = ObjInventario.DtResultados GvAlmacen.DataSource = ObjInventario.DtResultados
GvAlmacen.DataBind() GvAlmacen.DataBind()
End If End If
@@ -125,7 +125,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub CargaGvClasificacion() Private Sub CargaGvClasificacion()
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetallesClasificacion(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesClasificacion(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
GvClasificacion.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") GvClasificacion.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
GvClasificacionExcluida.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") GvClasificacionExcluida.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0")
End If End If
@@ -137,7 +137,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub CargaGvProductosServicios() Private Sub CargaGvProductosServicios()
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetallesProductosServicios(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesProductosServicios(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
GvPS.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") GvPS.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
GvPSExcluye.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") GvPSExcluye.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0")
End If End If
@@ -150,7 +150,7 @@ Partial Class Inventarios_InventarioFisico
Private Sub CargaGvProveedores() Private Sub CargaGvProveedores()
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetallesProveedores(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesProveedores(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
GvProveedor.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") GvProveedor.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
@@ -160,7 +160,7 @@ Partial Class Inventarios_InventarioFisico
Private Sub CargaGvUsuarios() Private Sub CargaGvUsuarios()
Dim ObjInventario As New ClsInventarios() Dim ObjInventario As New ClsInventarios()
If ObjInventario.GetInventarioFisicoDetallesUsuarios(HdnID.Value, UsuarioActual.CveEmpresa) Then If ObjInventario.GetInventarioFisicoDetallesUsuarios(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then
gvUsuarios.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") gvUsuarios.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1")
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
@@ -244,7 +244,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub BtnAgregarProductosServicios_Click(sender As Object, e As EventArgs) Handles BtnAgregarProductosServicios.Click Private Sub BtnAgregarProductosServicios_Click(sender As Object, e As EventArgs) Handles BtnAgregarProductosServicios.Click
If DdlProductosServicios.SelectedValue = -1 Then If DdlProductosServicios.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvPS.DataSource = Nothing GvPS.DataSource = Nothing
GvPS.DataBind() GvPS.DataBind()
@@ -262,7 +262,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub BtnAddPSExcluye_Click(sender As Object, e As EventArgs) Handles BtnAddPSExcluye.Click Private Sub BtnAddPSExcluye_Click(sender As Object, e As EventArgs) Handles BtnAddPSExcluye.Click
If DdlPSExcluye.SelectedValue = -1 Then If DdlPSExcluye.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvPSExcluye.DataSource = Nothing GvPSExcluye.DataSource = Nothing
GvPSExcluye.DataBind() GvPSExcluye.DataBind()
@@ -302,7 +302,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Private Sub BtnAgregarClasificaciones_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificaciones.Click Private Sub BtnAgregarClasificaciones_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificaciones.Click
If DdlClasificacion.SelectedValue = -1 Then If DdlClasificacion.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvClasificacion.DataSource = Nothing GvClasificacion.DataSource = Nothing
GvClasificacion.DataBind() GvClasificacion.DataBind()
@@ -331,7 +331,7 @@ Partial Class Inventarios_InventarioFisico
End Sub End Sub
Protected Sub BtnClasificacionExcluida_Click(sender As Object, e As EventArgs) Protected Sub BtnClasificacionExcluida_Click(sender As Object, e As EventArgs)
If DdlClasificacionExcluida.SelectedValue = -1 Then If DdlClasificacionExcluida.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvClasificacionExcluida.DataSource = Nothing GvClasificacionExcluida.DataSource = Nothing
GvClasificacionExcluida.DataBind() GvClasificacionExcluida.DataBind()
@@ -359,7 +359,7 @@ Partial Class Inventarios_InventarioFisico
#Region "PROVEEDORES" #Region "PROVEEDORES"
Private Sub BtnAgregarProveedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarProveedor.Click Private Sub BtnAgregarProveedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarProveedor.Click
If DdlProveedor.SelectedValue = -1 Then If DdlProveedor.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvPS.DataSource = Nothing GvPS.DataSource = Nothing
GvPS.DataBind() GvPS.DataBind()
@@ -396,7 +396,7 @@ Partial Class Inventarios_InventarioFisico
#Region "USUARIOS" #Region "USUARIOS"
Private Sub btnAddUsuarios_Click(sender As Object, e As EventArgs) Handles btnAddUsuarios.Click Private Sub btnAddUsuarios_Click(sender As Object, e As EventArgs) Handles btnAddUsuarios.Click
If DdlUsuarios.SelectedValue = -1 Then If DdlUsuarios.SelectedValue = "-1" Then
Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion)
GvPS.DataSource = Nothing GvPS.DataSource = Nothing
GvPS.DataBind() GvPS.DataBind()
@@ -448,7 +448,7 @@ Partial Class Inventarios_InventarioFisico
Dim Cerrado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3)) Dim Cerrado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3))
Dim Bloqueado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(4)) Dim Bloqueado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(4))
ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value, CveUsuario, Cerrado, Bloqueado) ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value.ToEntero, CveUsuario, Cerrado, Bloqueado)
gvUsuarios.DataSource = tDTUsuario gvUsuarios.DataSource = tDTUsuario
gvUsuarios.DataBind() gvUsuarios.DataBind()
upUsuarios.Update() upUsuarios.Update()
@@ -462,7 +462,7 @@ Partial Class Inventarios_InventarioFisico
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
HdnID.Value = GvRow.DataKey("CveInventarioFisico") HdnID.Value = GvRow.DataKey("CveInventarioFisico")
UppInventarioFisico.Update() UppInventarioFisico.Update()
If ObjInventario.RemoveInventarioFisico(HdnID.Value) Then If ObjInventario.RemoveInventarioFisico(HdnID.Value.ToEntero) Then
CargaDatos(UsuarioActual.CveEmpresa) CargaDatos(UsuarioActual.CveEmpresa)
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
End If End If
@@ -503,8 +503,8 @@ Partial Class Inventarios_InventarioFisico
myModalLabel.InnerText = "Actualizar Inventario Fisico" myModalLabel.InnerText = "Actualizar Inventario Fisico"
TxtTitulo.Text = GvRow.DataKey("InventarioFisico") TxtTitulo.Text = GvRow.DataKey("InventarioFisico")
TxtObservaciones.Text = GvRow.DataKey("Observaciones") TxtObservaciones.Text = GvRow.DataKey("Observaciones")
FechaInicio = GvRow.DataKey("FechaInicio").ToEntero FechaInicio = GvRow.DataKey("FechaInicio")
FechaFin = GvRow.DataKey("FechaFin").ToEntero FechaFin = GvRow.DataKey("FechaFin")
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero)
chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString) chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString)
divUsuarios.Visible = chkUsarApp.Checked divUsuarios.Visible = chkUsarApp.Checked
@@ -513,13 +513,13 @@ Partial Class Inventarios_InventarioFisico
CargaGvProductosServicios() CargaGvProductosServicios()
CargaGvProveedores() CargaGvProveedores()
CargaGvUsuarios() CargaGvUsuarios()
tDTClasif = GvClasificacion.DataSource tDTClasif = CType(GvClasificacion.DataSource, DataTable)
tDTClasifExcluye = GvClasificacionExcluida.DataSource tDTClasifExcluye = CType(GvClasificacionExcluida.DataSource, DataTable)
tDTPS = GvPS.DataSource tDTPS = CType(GvPS.DataSource, DataTable)
tDTPSExcluye = GvPSExcluye.DataSource tDTPSExcluye = CType(GvPSExcluye.DataSource, DataTable)
tDTProv = GvProveedor.DataSource tDTProv = CType(GvProveedor.DataSource, DataTable)
tDTUsuario = gvUsuarios.DataSource tDTUsuario = CType(gvUsuarios.DataSource, DataTable)
tALM = GvAlmacen.DataSource tALM = CType(GvAlmacen.DataSource, DataTable)
UpAddInventarioFisico.Update() UpAddInventarioFisico.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddInventarioFisico")) RegistraScript(String.Format("$('#{0}').modal('show');", "divAddInventarioFisico"))
End Sub End Sub
@@ -748,7 +748,7 @@ Partial Class Inventarios_InventarioFisico
Else Else
ErrorClasif = False ErrorClasif = False
End If End If
If ErrorClasif = False And HdnID.Value > 0 Then If ErrorClasif = False And HdnID.Value.ToEntero > 0 Then
ObjInventario.Commit() ObjInventario.Commit()
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddInventarioFisico")) RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddInventarioFisico"))
@@ -823,7 +823,7 @@ Partial Class Inventarios_InventarioFisico
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 ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue, UsuarioActual.CveUsuario) Then If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
gvIF.DataSource = ObjInventario.DtResultados gvIF.DataSource = ObjInventario.DtResultados
gvIF.DataBind() gvIF.DataBind()
gvIF.Columns(1).HeaderText = LblSubProyecto.Text gvIF.Columns(1).HeaderText = LblSubProyecto.Text

View File

@@ -27,13 +27,9 @@ Partial Class Inventarios_Paquetes
Private Sub CargaDatos() Private Sub CargaDatos()
Dim ps As New ClsProductosServicios Dim ps As New ClsProductosServicios
If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1", 1) Then
gvPaquetes.DataSource = ps.DtResultados gvPaquetes.DataSource = ps.DtResultados
dtPaquetes = ps.DtResultados dtPaquetes = ps.DtResultados
End If End If
gvPaquetes.EditIndex = -1 gvPaquetes.EditIndex = -1
gvPaquetes.DataBind() gvPaquetes.DataBind()

View File

@@ -80,7 +80,7 @@ Partial Class Inventarios_RepAnomalias
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
CveInventarioFisico = If(Request("CveInventarioFisico") IsNot Nothing AndAlso Request("CveInventarioFisico").ToEntero() > 0, Request("CveInventarioFisico").ToEntero(), -1).ToString CveInventarioFisico = If(Request("CveInventarioFisico") IsNot Nothing AndAlso Request("CveInventarioFisico").ToEntero() > 0, Request("CveInventarioFisico").ToEntero(), -1)
EsAvance = If(Request("EsAvance") IsNot Nothing, CBool(Request("EsAvance").ToEntero), False) EsAvance = If(Request("EsAvance") IsNot Nothing, CBool(Request("EsAvance").ToEntero), False)
If CveInventarioFisico > 0 Then If CveInventarioFisico > 0 Then
@@ -107,12 +107,12 @@ Partial Class Inventarios_RepAnomalias
GvF.Columns(3).Visible = True 'proveedor GvF.Columns(3).Visible = True 'proveedor
GvS.Columns(3).Visible = True 'proveedor GvS.Columns(3).Visible = True 'proveedor
GvC.Columns(3).Visible = True 'proveedor GvC.Columns(3).Visible = True 'proveedor
GvF.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo GvF.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo
GvS.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo GvS.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo
GvC.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo GvC.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo
GvGrupos.Columns(1).Visible = True 'clasificación GvGrupos.Columns(1).Visible = True 'clasificación
GvGrupos.Columns(2).Visible = True 'proveedor GvGrupos.Columns(2).Visible = True 'proveedor
GvGrupos.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo GvGrupos.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo
End If End If
If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1, UsuarioActual.CveUsuario) Then If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1, UsuarioActual.CveUsuario) Then
@@ -396,7 +396,7 @@ Partial Class Inventarios_RepAnomalias
If e.Row.Cells(7).Text = MinFecha.ToString Then If e.Row.Cells(7).Text = MinFecha.ToString Then
e.Row.Cells(7).Text = "" e.Row.Cells(7).Text = ""
End If End If
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString
End If End If
If e.Row.RowType = DataControlRowType.Header Then If e.Row.RowType = DataControlRowType.Header Then
If CreandoNuevoInventario Then If CreandoNuevoInventario Then
@@ -416,7 +416,7 @@ Partial Class Inventarios_RepAnomalias
If e.Row.Cells(7).Text = MinFecha.ToString Then If e.Row.Cells(7).Text = MinFecha.ToString Then
e.Row.Cells(7).Text = "" e.Row.Cells(7).Text = ""
End If End If
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString
End If End If
If e.Row.RowType = DataControlRowType.Header Then If e.Row.RowType = DataControlRowType.Header Then
If CreandoNuevoInventario Then If CreandoNuevoInventario Then

View File

@@ -33,19 +33,19 @@ Partial Class Inventarios_RepExistenciasCostos
ViewState("TmpPS") = value ViewState("TmpPS") = value
End Set End Set
End Property End Property
Public Property FechaFinal As String Public Property FechaFinal As Date
Get Get
Return ViewState("FechaFinal").ToString Return ViewState("FechaFinal").ToString.ToDate
End Get End Get
Set(value As String) Set(value As Date)
ViewState("FechaFinal") = value ViewState("FechaFinal") = value
End Set End Set
End Property End Property
Public Property FechaInicial As String Public Property FechaInicial As Date
Get Get
Return ViewState("FechaInicial").ToString Return ViewState("FechaInicial").ToString.ToDate
End Get End Get
Set(value As String) Set(value As Date)
ViewState("FechaInicial") = value ViewState("FechaInicial") = value
End Set End Set
End Property End Property
@@ -54,7 +54,7 @@ Partial Class Inventarios_RepExistenciasCostos
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
TxtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString TxtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString
TxtFechaF.Text = Now.LastDayOfMonth TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
If Request("CvePS") IsNot Nothing AndAlso Request("CveProveedor") IsNot Nothing AndAlso If Request("CvePS") IsNot Nothing AndAlso Request("CveProveedor") IsNot Nothing AndAlso
Request("CveMoneda") IsNot Nothing AndAlso Request("CveConcepto") IsNot Nothing AndAlso Request("CveMoneda") IsNot Nothing AndAlso Request("CveConcepto") IsNot Nothing AndAlso
@@ -69,9 +69,9 @@ Partial Class Inventarios_RepExistenciasCostos
If(Request("FechaI").ToString.Trim <> "-1", Request("FechaI").ToString.Trim.ToDate, MinFecha), If(Request("FechaI").ToString.Trim <> "-1", Request("FechaI").ToString.Trim.ToDate, MinFecha),
If(Request("FechaF").ToString.Trim <> "-1", Request("FechaF").ToString.Trim.ToDate, MaxFecha), If(Request("FechaF").ToString.Trim <> "-1", Request("FechaF").ToString.Trim.ToDate, MaxFecha),
CveAlmacen, CveAlmacen,
IIf(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero), If(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero),
IIf(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero), If(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero),
IIf(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero) If(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero)
) )
Panel1.Visible = False Panel1.Visible = False
Else Else

View File

@@ -1,11 +1,11 @@
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Partial Class RepNotasSinAlmacen Partial Class RepNotasSinAlmacen
Inherits ClsPaginas Inherits ClsPaginas
#Region "propiedades" #Region "propiedades"
Private Property dt As DataTable Private Property dt As DataTable
Get Get
Try Try
@@ -27,19 +27,19 @@ Partial Class RepNotasSinAlmacen
ViewState("dtReporte") = value ViewState("dtReporte") = value
End Set End Set
End Property End Property
Public Property FechaInicial As String Public Property FechaInicial As Date
Get Get
Return ViewState("FechaInicial").ToString Return ViewState("FechaInicial").ToString.ToDate
End Get End Get
Set(value As String) Set(value As Date)
ViewState("FechaInicial") = value ViewState("FechaInicial") = value
End Set End Set
End Property End Property
Public Property FechaFinal As String Public Property FechaFinal As Date
Get Get
Return ViewState("FechaFinal").ToString Return ViewState("FechaFinal").ToString.ToDate
End Get End Get
Set(value As String) Set(value As Date)
ViewState("FechaFinal") = value ViewState("FechaFinal") = value
End Set End Set
End Property End Property
@@ -250,8 +250,8 @@ Partial Class RepNotasSinAlmacen
params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString()))
params.Add(New ReportParameter("FechaInicio", FechaInicial)) params.Add(New ReportParameter("FechaInicio", FechaInicial.ToShortDateString))
params.Add(New ReportParameter("FechaFin", FechaFinal)) params.Add(New ReportParameter("FechaFin", FechaFinal.ToShortDateString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
If Tab.ActiveTabIndex = 0 Then If Tab.ActiveTabIndex = 0 Then

View File

@@ -36,7 +36,7 @@ Partial Class Inventarios_RepRSCO
LnkDescargaExcel.Visible = False LnkDescargaExcel.Visible = False
If ObjInventarios.RepCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 1, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then If ObjInventarios.RepCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, True, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
DTDatos = ObjInventarios.DtResultados DTDatos = ObjInventarios.DtResultados
GvDatos.DataSource = DTDatos GvDatos.DataSource = DTDatos