From 070e880bb1bb327f143d4f343b7799dc84d9e8d5 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 13 Aug 2020 19:16:03 -0700 Subject: [PATCH 1/2] Columna nueva al reporte de comisiones --- Ventas/RepComisiones.aspx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ventas/RepComisiones.aspx b/Ventas/RepComisiones.aspx index bedffe731..1312337bb 100644 --- a/Ventas/RepComisiones.aspx +++ b/Ventas/RepComisiones.aspx @@ -114,14 +114,15 @@ + - + <%-- - + --%> <%----%> From e4062f3bcef3bed10d4e4165d029bcba79e8e660 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 14 Aug 2020 19:46:40 -0700 Subject: [PATCH 2/2] =?UTF-8?q?nuevos=20PA=20para=20los=20cat=C3=A1logos?= =?UTF-8?q?=20correspondientes=20de=20los=20PA=20agregados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsAF.vb | 258 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 258 insertions(+) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 410a4db11..95fa81a74 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -3434,6 +3434,264 @@ Public Class ClsAF #End Region +#Region "TIPO SERVICIO" + Public Function GetTiposServicios(CveTipoServicio As Integer, CveTipoMantenimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServicioGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + .Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function AddTiposServicios(Nombre As String, CveTipoMantenimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServicioAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@Nombre", SqlDbType.NVarChar).Value = Nombre + .Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function UpdateTiposServicios(CveTipoServicio As Integer, Nombre As String, CveTipoMantenimiento As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServicioUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + .Add("@Nombre", SqlDbType.NVarChar).Value = Nombre + .Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function DeleteTiposServicios(CveTipoServicio As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServicioDelete") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function GetTiposServiciosActividades(CveTipoServicioActividad As Integer, CveActividad As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosActividadesGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad + .Add("@CveActividad", SqlDbType.Int).Value = CveActividad + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function AddTiposServiciosActividades(CveActividad As Integer, Duracion As Integer, Observaciones As String) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosActividadesAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveActividad", SqlDbType.Int).Value = CveActividad + .Add("@Duracion", SqlDbType.Int).Value = Duracion + .Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function UpdateTiposServiciosActividades(CveTipoServicioActividad As Integer, CveActividad As Integer, Duracion As Integer, Observaciones As String) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosActividadesUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad + .Add("@CveActividad", SqlDbType.Int).Value = CveActividad + .Add("@Duracion", SqlDbType.Int).Value = Duracion + .Add("@Observaciones", SqlDbType.NVarChar).Value = Observaciones + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function DeleteTiposServiciosActividades(CveTipoServicioActividad As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosActividadesDelete") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioActividad", SqlDbType.Int).Value = CveTipoServicioActividad + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function GetTiposServiciosMaterial(CveTipoServicioMaterial As Integer, CveTipoServicio As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosMaterialGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioMaterial", SqlDbType.Int).Value = CveTipoServicioMaterial + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los materiales de los tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function AddTiposServiciosMaterial(CveTipoServicio As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, + Tipo As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosMaterialAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + .Add("@Cantidad", SqlDbType.Money).Value = Cantidad + .Add("@CveUM", SqlDbType.Int).Value = CveUM + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function UpdateTiposServiciosMaterial(CveTipoServicioMaterial As Integer, CveTipoServicio As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, + Tipo As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosMaterialUpdate") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioMaterial", SqlDbType.Int).Value = CveTipoServicioMaterial + .Add("@CveTipoServicio", SqlDbType.Int).Value = CveTipoServicio + .Add("@Cantidad", SqlDbType.Money).Value = Cantidad + .Add("@CveUM", SqlDbType.Int).Value = CveUM + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@Tipo", SqlDbType.TinyInt).Value = Tipo + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + Public Function DeleteTiposServiciosMaterial(CveTipoServicioMaterial As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_AF_TiposServiciosMaterialDelete") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveTipoServicioMaterial", SqlDbType.Int).Value = CveTipoServicioMaterial + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener las actividades tipos servicios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function +#End Region + #Region " IDisposable Support " ' IDisposable