From 1a6c3c62640dd4a76f3340801e87d52d209d92be Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 28 Feb 2023 10:11:42 -0700 Subject: [PATCH] --- App_Code/ClsGPS.vb | 27 ++++++-- CGame/CatEmpaque.aspx | 105 ++++++++++++++++++++--------- CGame/CatEmpaque.aspx.VB | 10 +-- CGame/CatHuerta.aspx | 69 +++++++++++++------ CGame/CatHuerta.aspx.cs | 14 +++- CGame/CatProductos.aspx | 102 ++++++++++++++++++++-------- CGame/CatTipoMaduracion.aspx | 113 ++++++++++++++++++++++---------- CGame/CatTipoMaduracion.aspx.vb | 4 +- GPS/WizardDispositivos.aspx | 4 ++ GPS/WizardDispositivos.aspx.cs | 6 +- Nomina/Nomina.aspx.cs | 14 +++- PortalGPS/InicioGPS.aspx | 50 +++++++++++++- PortalGPS/InicioGPS.aspx.vb | 24 +++++-- Ventas/Clientes.aspx.vb | 2 +- 14 files changed, 404 insertions(+), 140 deletions(-) diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index f1f307ee8..51915e47c 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -531,10 +531,27 @@ Public Class ClsGPS OnError("Ocurrió un error al obtener las coordenadas del equipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try + Return Retorno + End Function + + + Public Function DispositivoComentarioupdate(CveDispositivo As Integer, comentario As String, CveUsuario As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_GPS_DispositivoComentarioupdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo + .Add("@Comentarios", SqlDbType.VarChar).Value = comentario + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las coordenadas del equipo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno End Function - - Public Function UltimaPosicionEquipoGet(CveDispositivos As String, CveCliente As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_UltimaPosicionTGet") @@ -3072,7 +3089,7 @@ Public Class ClsGPS #Region "Dispositivos" Public Function DispositivoAdd(TipoDispositivo As Integer, NumTelefono As String, CveModelo As Integer, CveProveedorComunicacionCuenta As Integer, CveCliente As Integer, IMEI As String, Serie As String, CveEstatus As Integer, SerieVehiculo As String, ColorVehiculo As String, NombreVehiculo As String, NoEconomico As String, devID As String, devPort As Integer, ModeloVehiculo As String, AñoVehiculo As String, ClaseVehiculo As String, PlacasVehiculo As String, LimiteVelocidad As Boolean, VelocidadMaxima As Double, - DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer) As Boolean + DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer, AsignadoEn As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_DispositivosAdd") With SqlAdapter.SelectCommand.Parameters @@ -3102,6 +3119,7 @@ Public Class ClsGPS .Add("@Icono", SqlDbType.VarChar).Value = Icono .Add("@ColorTrazo", SqlDbType.VarChar).Value = ColorTrazo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@AsignadoEn", SqlDbType.VarChar).Value = AsignadoEn End With @@ -3283,7 +3301,7 @@ Public Class ClsGPS Public Function DispositivosUpdate(TipoDispositivo As Integer, NumTelefono As String, CveDispositivo As Integer, CveModelo As Integer, CveProveedorComunicacionCuenta As Integer, CveCliente As Integer, IMEI As String, Serie As String, CveEstatus As Integer, SerieVehiculo As String, ColorVehiculo As String, NombreVehiculo As String, NoEconomico As String, devID As String, devPort As Integer, ModeloVehiculo As String, AñoVehiculo As String, ClaseVehiculo As String, PlacasVehiculo As String, LimiteVelocidad As Boolean, VelocidadMaxima As Double, - DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer) As Boolean + DetallesVehiculo As String, Rendimiento As Double, Icono As String, ColorTrazo As String, CveUsuario As Integer, AsignadoEn As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_GPS_DispositivosUpdate") With SqlAdapter.SelectCommand.Parameters @@ -3313,6 +3331,7 @@ Public Class ClsGPS .Add("@Icono", SqlDbType.VarChar).Value = Icono .Add("@ColorTrazo", SqlDbType.VarChar).Value = ColorTrazo .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@AsignadoEn", SqlDbType.VarChar).Value = AsignadoEn End With Try SqlAdapter.Fill(Data) diff --git a/CGame/CatEmpaque.aspx b/CGame/CatEmpaque.aspx index 01faedc2d..f7d514f31 100644 --- a/CGame/CatEmpaque.aspx +++ b/CGame/CatEmpaque.aspx @@ -3,9 +3,30 @@ + - Catalogo de Empaques + Catalogo de Empaque Destino @@ -15,67 +36,87 @@
  • - Agregar Empaque
  • + Agregar
    - -
    + +
    +
    +
    + + Información + +
    + +
    + + <%----%> +
    +
    +
    +
    +
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - +
    +
    + - + - + - + - + - + - + - + - - + + - - + + - + @@ -83,6 +124,8 @@ + +
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    -<%-- + <%-- --%>
    -
    +
    - <%-- + <%-- --%>
    -
    +
    - <%-- + <%-- --%> diff --git a/CGame/CatEmpaque.aspx.VB b/CGame/CatEmpaque.aspx.VB index b137fac8d..ef251b0c9 100644 --- a/CGame/CatEmpaque.aspx.VB +++ b/CGame/CatEmpaque.aspx.VB @@ -1,12 +1,6 @@ Option Strict On Imports System.Data Imports System.Collections.Generic Imports System.Linq Imports System.Web Imports System.Web.UI.WebControls Imports Extensiones Partial Class CATTiposEtiqueta Inherits ClsPaginas - - - - - - #Region "Propiedades" Private Property CveEmpaque() As Integer Get Return If(IsNothing(ViewState("CveEmpaque")), 0, CInt(ViewState("CveEmpaque"))) @@ -28,9 +22,9 @@ GvEmpaque.DataBind() End If ObjTipo.Dispose() upDatosTipo.Update() End Sub Protected Sub LimpiaEmpaque() TxtEmpaque.Text = "" TxtCostoXTonelada.Text = "" TxtCostoPreEnfriado.Text = "" TxtFull.Text = "" TxtSencillo.Text = "" TxtTermoFull.Text = "" TxtTermoSencillo.Text = "" UPModalTipo.Update() End Sub Protected Sub LnkEditarTipo_Click(sender As Object, e As EventArgs) LimpiaEmpaque() Dim gvRow As GridViewRow= DirectCast((DirectCast(sender,LinkButton)).NamingContainer,GridViewRow) - CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() TxtEmpaque.Text = gvRow.DataKey("Empaque") TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada") TxtCostoPreEnfriado.Text = gvRow.DataKey("CostoPreEnfriado") TxtFull.Text = gvRow.DataKey("Lleno") TxtSencillo.Text = gvRow.DataKey("Sencillo") TxtTermoFull.Text = gvRow.DataKey("TermoLleno") TxtTermoSencillo.Text = gvRow.DataKey("TermoSencillo") ChkTipoestatus.Checked = CBool(gvRow.DataKey("Estatus")) RegistraScript("$('#DModalTiposEtiqueta').modal()") BtnTipoADD.Visible=False BtnTipoEdit.Visible = True DivEstatus.Visible = True UPModalTipo.Update() End Sub Protected Sub LnkAgregarTipo_Click(sender As Object, e As EventArgs) RegistraScript("$('#DModalTiposEtiqueta').modal()") LimpiaEmpaque() BtnTipoADD.Visible=True BtnTipoEdit.Visible = False DivEstatus.Visible = False UPModalTipo.Update() End Sub Protected Sub BtnTipoADD_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.AddEmpaque(TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaquese ha agregado") CargaEmpaque() End If End Sub Protected Sub BtnTipoEdit_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.UpdateEmpaque(CveEmpaque, ChkTipoestatus.Checked, TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque se ha actualizado") + CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() TxtEmpaque.Text = gvRow.DataKey("Empaque") TxtCostoXTonelada.Text = gvRow.DataKey("CostoXTonelada") TxtCostoPreEnfriado.Text = gvRow.DataKey("CostoPreEnfriado") TxtFull.Text = gvRow.DataKey("Lleno") TxtSencillo.Text = gvRow.DataKey("Sencillo") TxtTermoFull.Text = gvRow.DataKey("TermoLleno") TxtTermoSencillo.Text = gvRow.DataKey("TermoSencillo") ChkTipoestatus.Checked = CBool(gvRow.DataKey("Estatus")) RegistraScript("$('#DModalTiposEtiqueta').modal()") BtnTipoADD.Visible=False BtnTipoEdit.Visible = True DivEstatus.Visible = True UPModalTipo.Update() End Sub Protected Sub LnkAgregarTipo_Click(sender As Object, e As EventArgs) RegistraScript("$('#DModalTiposEtiqueta').modal()") LimpiaEmpaque() BtnTipoADD.Visible=True BtnTipoEdit.Visible = False DivEstatus.Visible = False UPModalTipo.Update() End Sub Protected Sub BtnTipoADD_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.AddEmpaque(TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque destino se ha agregado") CargaEmpaque() End If End Sub Protected Sub BtnTipoEdit_Click(sender As Object, e As EventArgs) Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.UpdateEmpaque(CveEmpaque, ChkTipoestatus.Checked, TxtEmpaque.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtCostoXTonelada.Text.ToDouble, TxtCostoPreEnfriado.Text.ToDouble, TxtFull.Text.ToDouble, TxtSencillo.Text.ToDouble, TxtTermoFull.Text.ToDouble, TxtTermoSencillo.Text.ToDouble) ObjTipo.Dispose() If (Continuar) Then RegistraScript("$('#DModalTiposEtiqueta').modal('hide')") LimpiaEmpaque() UPModalTipo.Update() Alert("El empaque destino se ha actualizado") CargaEmpaque() End If End Sub Protected Sub LnkEliminarTipo_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.RemoveEmpaque(CveEmpaque) ObjTipo.Dispose() If (Continuar) Then Alert("El empaque se ha eliminado") + CveEmpaque = gvRow.DataKey("CveEmpaque").ToEntero() Dim ObjTipo As New ClsCGame() Dim Continuar As Boolean = ObjTipo.RemoveEmpaque(CveEmpaque) ObjTipo.Dispose() If (Continuar) Then Alert("El empaque destino se ha eliminado") CargaEmpaque() End If End Sub Private Sub GVTiposEtiqueta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEmpaque.RowDataBound diff --git a/CGame/CatHuerta.aspx b/CGame/CatHuerta.aspx index 9f64fea71..94b10ec1a 100644 --- a/CGame/CatHuerta.aspx +++ b/CGame/CatHuerta.aspx @@ -3,9 +3,18 @@ + - Catalogo de Huerta + Catalogo de Productor @@ -15,17 +24,37 @@
  • - Agregar Huerta
  • + Agregar
    -
    + +
    +
    +
    + + Información + +
    + +
    + + <%----%> +
    +
    +
    +
    +
    +
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    + +
    +
    +
    @@ -34,27 +63,27 @@ - + - + - + - + - + @@ -72,7 +101,7 @@ - +