From 4c6f8bbaefbb9b58e2dd9379d848ad8bdb40bab0 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 00:38:39 -0700 Subject: [PATCH] option strict on --- GPS/CatDispositivos.aspx.vb | 2 +- GPS/CatModelos.aspx.vb | 2 +- GPS/CatPlanesDatos.aspx.vb | 12 ++--- GPS/CatProveedoresComunicacionCuentas.aspx.vb | 12 ++--- GPS/CatTipoComunicacion.aspx.vb | 10 ++-- GPS/RepCombustible2.aspx.vb | 4 +- GPS/Soporte.aspx.vb | 33 ++++++------- Inventarios/AjustesSeccionAlmacen.aspx.vb | 8 ++-- Inventarios/CatUnidades.aspx.vb | 4 +- Inventarios/InventarioFisico.aspx.vb | 48 +++++++++---------- Inventarios/Paquetes.aspx.vb | 6 +-- Inventarios/RepAnomalias.aspx.vb | 14 +++--- Inventarios/RepExistenciasCostos.aspx.vb | 20 ++++---- Inventarios/RepNotasSinAlmacen.aspx.vb | 22 ++++----- Inventarios/RepRSCO.aspx.vb | 2 +- 15 files changed, 96 insertions(+), 103 deletions(-) diff --git a/GPS/CatDispositivos.aspx.vb b/GPS/CatDispositivos.aspx.vb index 230f72a08..d840f6ac8 100644 --- a/GPS/CatDispositivos.aspx.vb +++ b/GPS/CatDispositivos.aspx.vb @@ -104,7 +104,7 @@ Partial Class GPS_CatDispositivos e.Row.VerticalAlign = VerticalAlign.Middle ' 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").ForeColor = Drawing.Color.Green diff --git a/GPS/CatModelos.aspx.vb b/GPS/CatModelos.aspx.vb index 64c9294c2..e4dfea5f0 100644 --- a/GPS/CatModelos.aspx.vb +++ b/GPS/CatModelos.aspx.vb @@ -24,7 +24,7 @@ Partial Class GPS_CatModelos e.Row.VerticalAlign = VerticalAlign.Middle 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").ForeColor = Drawing.Color.Green diff --git a/GPS/CatPlanesDatos.aspx.vb b/GPS/CatPlanesDatos.aspx.vb index 728ac9144..163fcd02e 100644 --- a/GPS/CatPlanesDatos.aspx.vb +++ b/GPS/CatPlanesDatos.aspx.vb @@ -19,7 +19,7 @@ Partial Class GPS_PlanesDatos DdlProveedorComunicacion.DataBind() End If ObjGps.Dispose() - DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", -1)) + DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", "-1")) UpDatos.Update() End Sub Private Sub CargaDatos() @@ -37,12 +37,12 @@ Partial Class GPS_PlanesDatos Dim Estatus = 0 If ChkEstatus.Checked Then Estatus = 1 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() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If 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() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -97,7 +97,7 @@ Partial Class GPS_PlanesDatos Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CvePlanDato") UpDatos.Update() - If ObjGps.PlanesDatosRemove(HdnID.Value) Then + If ObjGps.PlanesDatosRemove(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -112,7 +112,7 @@ Partial Class GPS_PlanesDatos Private Sub GvPlanesDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPlanesDatos.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 @@ -120,7 +120,7 @@ Partial Class GPS_PlanesDatos e.Row.FCLabel("LblEstatus").Text = "Inactivo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red 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() End If End If diff --git a/GPS/CatProveedoresComunicacionCuentas.aspx.vb b/GPS/CatProveedoresComunicacionCuentas.aspx.vb index d17de7a4b..b484196d6 100644 --- a/GPS/CatProveedoresComunicacionCuentas.aspx.vb +++ b/GPS/CatProveedoresComunicacionCuentas.aspx.vb @@ -48,7 +48,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Private Sub CargaDdlClientes() 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.DataBind() End If @@ -128,7 +128,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas If UsuarioActual.Empresa.Funcionalidad(541) = "1" Then Estatus = 0 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() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -137,7 +137,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas envirCorreoActivacion() Estatus = 1 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() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -232,7 +232,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveProveedorComunicacionCuenta") UpDatos.Update() - If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value) Then + If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value.ToEntero) Then CargaDatos() End If @@ -247,7 +247,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Private Sub GvProveedorComunicacionCuenta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvProveedorComunicacionCuenta.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 @@ -306,7 +306,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Dim Imei As String = TxtImei.Text 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() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If diff --git a/GPS/CatTipoComunicacion.aspx.vb b/GPS/CatTipoComunicacion.aspx.vb index 5b17e588a..90b88e795 100644 --- a/GPS/CatTipoComunicacion.aspx.vb +++ b/GPS/CatTipoComunicacion.aspx.vb @@ -12,15 +12,15 @@ Partial Class GPS_TipoComunicacion Private Sub BtnAgregarTipoComunicacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoComunicacion.Click Dim ObjGps As New ClsGPS - Dim Estatus = 0 - If ChkEstatus.Checked Then Estatus = 1 + Dim Estatus As Boolean = False + If ChkEstatus.Checked Then Estatus = True If HdnModalidad.Value = "A" Then If ObjGps.TipoComunicacionAdd(TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If 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() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -66,7 +66,7 @@ Partial Class GPS_TipoComunicacion Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveTipoComunicacion") UpDatos.Update() - If ObjGps.TipoComunicacionDelete(HdnID.Value) Then + If ObjGps.TipoComunicacionDelete(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -88,7 +88,7 @@ Partial Class GPS_TipoComunicacion Private Sub GvTipoComunicacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTipoComunicacion.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 diff --git a/GPS/RepCombustible2.aspx.vb b/GPS/RepCombustible2.aspx.vb index 646dddc4c..2af4322e4 100644 --- a/GPS/RepCombustible2.aspx.vb +++ b/GPS/RepCombustible2.aspx.vb @@ -132,7 +132,7 @@ Partial Class GPS_RepCombustible2 If DTDatos.Rows.Count > 0 Then LtlDistancia.Text = $"{DTDatos.Rows(0)("KmRecorridos")}" 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")}" LtlCombustibleFinal.Text = $"{DTDatos.Rows(0)("CombustibleFinal")}" 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}" ' LtlCostoInicial.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString.ToDecimal * CostoCombustible).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" LtlRalenti.Text = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString.FormatoNumero} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString} Minutos)" diff --git a/GPS/Soporte.aspx.vb b/GPS/Soporte.aspx.vb index ce2364c94..e738d4d73 100644 --- a/GPS/Soporte.aspx.vb +++ b/GPS/Soporte.aspx.vb @@ -16,8 +16,6 @@ Partial Class GPS_Soporte End Set End Property #End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaDispositivos() @@ -45,7 +43,7 @@ Partial Class GPS_Soporte Private Sub CargaDatos() 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 TxtPuerto.Text = "80" TxtAPN.Text = GPS.DtResultados.Rows(0)("APN").ToString @@ -85,7 +83,7 @@ Partial Class GPS_Soporte If DdlTipoConsulta.SelectedValue = "Last" Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "Top 1") 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}');") GvReportes.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.DtResultados.Rows.Count > 0 Then 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}');") Next 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.DtResultados.Rows.Count > 0 Then 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")}');") Next 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.DtResultados.Rows.Count > 0 Then 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")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -141,7 +139,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow 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")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -158,7 +156,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow 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")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -219,10 +217,10 @@ Partial Class GPS_Soporte Dim Var As String = "" For Each coordenada As String In CoordsPuntos 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)} }}" Else - Dim latlng() As String = coordenada.Trim.Split(" ") + Dim latlng() As String = coordenada.Trim.Split(" "c) Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}," End If Next @@ -231,11 +229,11 @@ Partial Class GPS_Soporte Private Sub CreaTmpDT(Opcion As String) TmpDT = New DataTable - If Opcion = 1 Then + If Opcion = "1" Then TmpDT.Columns.Add("Fecha", GetType(String)) TmpDT.Columns.Add("Valor", GetType(String)) TmpDT.Columns.Add("CveTrama", GetType(Integer)) - ElseIf Opcion = 2 Then + ElseIf Opcion = "2" Then TmpDT.Columns.Add("Trama", GetType(String)) TmpDT.Columns.Add("CveTrama", GetType(Integer)) End If @@ -255,7 +253,7 @@ Partial Class GPS_Soporte Protected Sub BtnCargaLog_Click(sender As Object, e As EventArgs) Handles BtnCargaLog.Click 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 Else Alert("No se encontraron resultados con el equipo seleccionado", TipoMensaje.MsgAdvertencia) @@ -278,10 +276,9 @@ Partial Class GPS_Soporte Private Sub CargaLog() Dim GPS As New ClsGPS - CreaTmpDT(2) + CreaTmpDT("2") RegistraScript("DeleteMarkers();") - If DdlTipoConsultaLog.SelectedValue = "Last" Then If GPS.GetRepDispositivo(DdlDispositivosLog.SelectedValue.ToEntero, MinFecha, MaxFecha) Then If GPS.DtResultados.Rows.Count > 0 Then @@ -330,7 +327,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow 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("Trama") = row("Trama").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 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 Else GvConsultaM.DataSource = GPS.DtResultados diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index a9eba95af..6f3f75d03 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -65,7 +65,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("######.###") Else e.Row.FCCheckBox("Chk").Visible = False - e.Row.FCRangeValidator("RVR").MaximumValue = 0 + e.Row.FCRangeValidator("RVR").MaximumValue = "0" End If End If End Sub @@ -169,7 +169,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Cantidad = Row("Cantidad").ToString.ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() 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 Serie As String = Row("Serie").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", "") If Tipo = "EXCEL" Then 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) Else @@ -445,7 +445,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim SerieSalida As String = RowExistencia("Serie").ToString() Dim LoteSalida As String = RowExistencia("Lote").ToString() 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 If CveSeccionAlmacenSalida > 0 Then diff --git a/Inventarios/CatUnidades.aspx.vb b/Inventarios/CatUnidades.aspx.vb index ecb00f46f..c171aaf2a 100644 --- a/Inventarios/CatUnidades.aspx.vb +++ b/Inventarios/CatUnidades.aspx.vb @@ -213,14 +213,14 @@ Partial Class Inventarios_CatUnidades 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, - 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") Else ErrorPrceso = True End If 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, - 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") Else ErrorPrceso = True diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb index 3bbdccb25..6fbaf9f24 100644 --- a/Inventarios/InventarioFisico.aspx.vb +++ b/Inventarios/InventarioFisico.aspx.vb @@ -116,7 +116,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvAlmacen() 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.DataBind() End If @@ -125,7 +125,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvClasificacion() 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") GvClasificacionExcluida.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") End If @@ -137,7 +137,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvProductosServicios() 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") GvPSExcluye.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") End If @@ -150,7 +150,7 @@ Partial Class Inventarios_InventarioFisico Private Sub CargaGvProveedores() 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") End If ObjInventario.Dispose() @@ -160,7 +160,7 @@ Partial Class Inventarios_InventarioFisico Private Sub CargaGvUsuarios() 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") End If ObjInventario.Dispose() @@ -244,7 +244,7 @@ Partial Class Inventarios_InventarioFisico End Sub 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) GvPS.DataSource = Nothing GvPS.DataBind() @@ -262,7 +262,7 @@ Partial Class Inventarios_InventarioFisico End Sub 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) GvPSExcluye.DataSource = Nothing GvPSExcluye.DataBind() @@ -302,7 +302,7 @@ Partial Class Inventarios_InventarioFisico End Sub 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) GvClasificacion.DataSource = Nothing GvClasificacion.DataBind() @@ -331,7 +331,7 @@ Partial Class Inventarios_InventarioFisico End Sub 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) GvClasificacionExcluida.DataSource = Nothing GvClasificacionExcluida.DataBind() @@ -359,7 +359,7 @@ Partial Class Inventarios_InventarioFisico #Region "PROVEEDORES" 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) GvPS.DataSource = Nothing GvPS.DataBind() @@ -396,7 +396,7 @@ Partial Class Inventarios_InventarioFisico #Region "USUARIOS" 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) GvPS.DataSource = Nothing GvPS.DataBind() @@ -448,7 +448,7 @@ Partial Class Inventarios_InventarioFisico 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)) - ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value, CveUsuario, Cerrado, Bloqueado) + ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value.ToEntero, CveUsuario, Cerrado, Bloqueado) gvUsuarios.DataSource = tDTUsuario gvUsuarios.DataBind() upUsuarios.Update() @@ -462,7 +462,7 @@ Partial Class Inventarios_InventarioFisico Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveInventarioFisico") UppInventarioFisico.Update() - If ObjInventario.RemoveInventarioFisico(HdnID.Value) Then + If ObjInventario.RemoveInventarioFisico(HdnID.Value.ToEntero) Then CargaDatos(UsuarioActual.CveEmpresa) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -503,8 +503,8 @@ Partial Class Inventarios_InventarioFisico myModalLabel.InnerText = "Actualizar Inventario Fisico" TxtTitulo.Text = GvRow.DataKey("InventarioFisico") TxtObservaciones.Text = GvRow.DataKey("Observaciones") - FechaInicio = GvRow.DataKey("FechaInicio").ToEntero - FechaFin = GvRow.DataKey("FechaFin").ToEntero + FechaInicio = GvRow.DataKey("FechaInicio") + FechaFin = GvRow.DataKey("FechaFin") DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString) divUsuarios.Visible = chkUsarApp.Checked @@ -513,13 +513,13 @@ Partial Class Inventarios_InventarioFisico CargaGvProductosServicios() CargaGvProveedores() CargaGvUsuarios() - tDTClasif = GvClasificacion.DataSource - tDTClasifExcluye = GvClasificacionExcluida.DataSource - tDTPS = GvPS.DataSource - tDTPSExcluye = GvPSExcluye.DataSource - tDTProv = GvProveedor.DataSource - tDTUsuario = gvUsuarios.DataSource - tALM = GvAlmacen.DataSource + tDTClasif = CType(GvClasificacion.DataSource, DataTable) + tDTClasifExcluye = CType(GvClasificacionExcluida.DataSource, DataTable) + tDTPS = CType(GvPS.DataSource, DataTable) + tDTPSExcluye = CType(GvPSExcluye.DataSource, DataTable) + tDTProv = CType(GvProveedor.DataSource, DataTable) + tDTUsuario = CType(gvUsuarios.DataSource, DataTable) + tALM = CType(GvAlmacen.DataSource, DataTable) UpAddInventarioFisico.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "divAddInventarioFisico")) End Sub @@ -748,7 +748,7 @@ Partial Class Inventarios_InventarioFisico Else ErrorClasif = False End If - If ErrorClasif = False And HdnID.Value > 0 Then + If ErrorClasif = False And HdnID.Value.ToEntero > 0 Then ObjInventario.Commit() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) 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 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.DataBind() gvIF.Columns(1).HeaderText = LblSubProyecto.Text diff --git a/Inventarios/Paquetes.aspx.vb b/Inventarios/Paquetes.aspx.vb index f0b64b080..a47974baa 100644 --- a/Inventarios/Paquetes.aspx.vb +++ b/Inventarios/Paquetes.aspx.vb @@ -27,13 +27,9 @@ Partial Class Inventarios_Paquetes Private Sub CargaDatos() Dim ps As New ClsProductosServicios - - If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1", 1) Then - + If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then gvPaquetes.DataSource = ps.DtResultados dtPaquetes = ps.DtResultados - - End If gvPaquetes.EditIndex = -1 gvPaquetes.DataBind() diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index 0015c0c2a..6979e25a0 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -80,7 +80,7 @@ Partial Class Inventarios_RepAnomalias Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load 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) If CveInventarioFisico > 0 Then @@ -107,12 +107,12 @@ Partial Class Inventarios_RepAnomalias GvF.Columns(3).Visible = True 'proveedor GvS.Columns(3).Visible = True 'proveedor GvC.Columns(3).Visible = True 'proveedor - GvF.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo - GvS.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo - GvC.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo + GvF.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo + GvS.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo + GvC.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo GvGrupos.Columns(1).Visible = True 'clasificación GvGrupos.Columns(2).Visible = True 'proveedor - GvGrupos.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo + GvGrupos.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo End If 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 e.Row.Cells(7).Text = "" End If - e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 + e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString End If If e.Row.RowType = DataControlRowType.Header Then If CreandoNuevoInventario Then @@ -416,7 +416,7 @@ Partial Class Inventarios_RepAnomalias If e.Row.Cells(7).Text = MinFecha.ToString Then e.Row.Cells(7).Text = "" End If - e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 + e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString End If If e.Row.RowType = DataControlRowType.Header Then If CreandoNuevoInventario Then diff --git a/Inventarios/RepExistenciasCostos.aspx.vb b/Inventarios/RepExistenciasCostos.aspx.vb index ae25f31ea..e6ef55df3 100644 --- a/Inventarios/RepExistenciasCostos.aspx.vb +++ b/Inventarios/RepExistenciasCostos.aspx.vb @@ -33,19 +33,19 @@ Partial Class Inventarios_RepExistenciasCostos ViewState("TmpPS") = value End Set End Property - Public Property FechaFinal As String + Public Property FechaFinal As Date Get - Return ViewState("FechaFinal").ToString + Return ViewState("FechaFinal").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaFinal") = value End Set End Property - Public Property FechaInicial As String + Public Property FechaInicial As Date Get - Return ViewState("FechaInicial").ToString + Return ViewState("FechaInicial").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaInicial") = value End Set End Property @@ -54,7 +54,7 @@ Partial Class Inventarios_RepExistenciasCostos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then 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 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("FechaF").ToString.Trim <> "-1", Request("FechaF").ToString.Trim.ToDate, MaxFecha), CveAlmacen, - IIf(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero), - IIf(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero), - IIf(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero) + If(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero), + If(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero), + If(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero) ) Panel1.Visible = False Else diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 51990788f..4c80308a5 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -1,11 +1,11 @@ -Imports System.Data +Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class RepNotasSinAlmacen - Inherits ClsPaginas + Inherits ClsPaginas #Region "propiedades" - + Private Property dt As DataTable Get Try @@ -27,19 +27,19 @@ Partial Class RepNotasSinAlmacen ViewState("dtReporte") = value End Set End Property - Public Property FechaInicial As String + Public Property FechaInicial As Date Get - Return ViewState("FechaInicial").ToString + Return ViewState("FechaInicial").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaInicial") = value End Set End Property - Public Property FechaFinal As String + Public Property FechaFinal As Date Get - Return ViewState("FechaFinal").ToString + Return ViewState("FechaFinal").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaFinal") = value End Set End Property @@ -250,8 +250,8 @@ Partial Class RepNotasSinAlmacen params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) - params.Add(New ReportParameter("FechaInicio", FechaInicial)) - params.Add(New ReportParameter("FechaFin", FechaFinal)) + params.Add(New ReportParameter("FechaInicio", FechaInicial.ToShortDateString)) + params.Add(New ReportParameter("FechaFin", FechaFinal.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) If Tab.ActiveTabIndex = 0 Then diff --git a/Inventarios/RepRSCO.aspx.vb b/Inventarios/RepRSCO.aspx.vb index 879462643..db010ac97 100644 --- a/Inventarios/RepRSCO.aspx.vb +++ b/Inventarios/RepRSCO.aspx.vb @@ -36,7 +36,7 @@ Partial Class Inventarios_RepRSCO 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 GvDatos.DataSource = DTDatos