+
Agrupador:
diff --git a/AF/RepAF.aspx.vb b/AF/RepAF.aspx.vb
index fe1f3c9e2..c22268a9c 100644
--- a/AF/RepAF.aspx.vb
+++ b/AF/RepAF.aspx.vb
@@ -38,16 +38,16 @@ Partial Class AF_RepAF
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
- CargaFiltros()
- 'CargaDatos()
-
- If UsuarioActual.Empresa.GralSoloProyecto Then
- DivProyecto.Visible = False
+ CargaFiltros()
+ 'CargaDatos()
+
+ ' If UsuarioActual.Empresa.GralSoloProyecto Then
+ DivProyecto.Visible = False
LblSubProyecto.Text = "Proyecto: "
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind()
- DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
- End If
+ DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
+ ' End If
End If
End Sub
diff --git a/AF/RepRevision.aspx b/AF/RepRevision.aspx
new file mode 100644
index 000000000..4d9b06b49
--- /dev/null
+++ b/AF/RepRevision.aspx
@@ -0,0 +1,250 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRevision.aspx.vb" Inherits="AF_RepRevision" %>
+
+
+
+
+
+
+
+
+<%--
+
+
+
+ Nuevo Activo Fijo
+
+
+
+ PDF
+
+
+
+ Excel
+
+
+
+
+
+
+
+
+ --%>
+
+
+
+
+ Reporte Revisión
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Tipo:
+
+
SubTipo:
+
+
+
+
Fecha I:
+
+
+
+
+
+
+ <%--
+
--%>
+
+
+
+
+
Fecha F:
+
+
+
+
+
+
+ <%--
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AF/RepRevision.aspx.vb b/AF/RepRevision.aspx.vb
new file mode 100644
index 000000000..f96ebab1d
--- /dev/null
+++ b/AF/RepRevision.aspx.vb
@@ -0,0 +1,183 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+
+Partial Class AF_RepRevision
+ Inherits ClsPaginas
+
+#Region " PROPIEDADES"
+
+ Property DT_Cabeceras As DataTable
+ Get
+
+ If ViewState("DT_Cabeceras") Is Nothing Then
+
+ Return New DataTable
+ Else
+ Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ ViewState("DT_Cabeceras") = value
+ End Set
+ End Property
+
+
+ Property DT_Datos As DataTable
+ Get
+
+ If ViewState("DT_Datos") Is Nothing Then
+ Return New DataTable
+ Else
+ Return DirectCast(ViewState("DT_Datos"), DataTable)
+ End If
+
+ End Get
+ Set(value As DataTable)
+ ViewState("DT_Datos") = value
+ End Set
+ End Property
+
+#End Region
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+ CargaCombos()
+ CargaDatos()
+
+ Dim FechaActual As Date = Now
+
+
+ TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
+ FechaActual = FechaActual.AddDays(-30)
+ TxtFechaI.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
+
+ End If
+ End Sub
+
+
+#Region " CARGA PARAMETROS "
+
+#End Region
+
+#Region " CARGA COMBOS "
+ Protected Sub CargaCombos()
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
+
+ DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
+ DdlTipoActivo.DataBind()
+ DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
+
+ End Sub
+
+
+#End Region
+
+#Region " CARGA DATOS "
+ Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
+ CargaDatos()
+
+ End Sub
+
+
+#End Region
+
+#Region " GV DATOS "
+
+ Private Sub CargaDatos()
+
+ Dim ObjAF As New ClsAF
+
+ If ObjAF.GetMetricasValores(-1, -1, -1, -1, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then
+
+ DT_Cabeceras = ObjAF.DSResultados.Tables(0)
+ DT_Datos = ObjAF.DSResultados.Tables(1)
+
+ 'GvDatos.DataSource = ObjAF.DtResultados
+ Else
+ GvDatos.DataSource = Nothing
+ End If
+
+ ObjAF.Dispose()
+
+ 'GvDatos.DataBind()
+ 'UpDatos.Update()
+
+ If DT_Datos.Rows.Count > 0 Then
+ CargaTablas()
+ End If
+
+
+ End Sub
+
+ Private Sub CargaTablas()
+
+ Dim IDX_LIMPIAR As Integer = 1
+
+ '5
+ For IDX_LIMPIAR = 2 To 16
+ CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
+ CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
+ GvDatos.Columns(IDX_LIMPIAR).Visible = False
+ Next
+
+ Dim x As Integer = 0
+ Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
+
+
+ For x = 0 To limite
+ CType(GvDatos.Columns(x + 2), BoundField).DataField = DT_Datos.Columns(5 + x).ColumnName
+ CType(GvDatos.Columns(x + 2), BoundField).HeaderText = DT_Cabeceras.Rows(x)("Metrica").ToString
+ GvDatos.Columns(x + 2).Visible = True
+ Next x
+
+ GvDatos.DataSource = DT_Datos
+ GvDatos.DataBind()
+
+ UpDatos.Update()
+ 'For IDX_LIMPIAR = 2 To 17
+ 'CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
+ 'CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).HeaderText = DT_Cabeceras.Rows()
+ 'Next
+
+ End Sub
+
+
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+
+
+ End If
+
+ End Sub
+
+#End Region
+
+
+
+
+ Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
+
+ End Sub
+
+
+
+ Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
+
+ DdlSubTipoActivo.Items.Clear()
+ DdlSubTipoActivo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoActivo.SelectedValue), "SubTipoActivoFijo")
+ DdlSubTipoActivo.DataBind()
+ DdlSubTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
+
+
+ UpFiltro.Update()
+
+ End Sub
+End Class
diff --git a/AF/TipoOrdenTrabajo.aspx b/AF/TipoOrdenTrabajo.aspx
new file mode 100644
index 000000000..e6ebb33b7
--- /dev/null
+++ b/AF/TipoOrdenTrabajo.aspx
@@ -0,0 +1,285 @@
+<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TipoOrdenTrabajo.aspx.vb" Inherits="AF_TipoOrdenTrabajo" EnableEventValidation = "false" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Registro Revisión
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Metricas guardadas correctamente.
+ <%--
+ Descarga Reporte Excel--%>
+
+
+
+
+
+ <%-- --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AF/TipoOrdenTrabajo.aspx.vb b/AF/TipoOrdenTrabajo.aspx.vb
new file mode 100644
index 000000000..71b84d52f
--- /dev/null
+++ b/AF/TipoOrdenTrabajo.aspx.vb
@@ -0,0 +1,280 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports System.IO
+Imports Extensiones
+Imports GemBox.Spreadsheet
+Imports Microsoft.Reporting.WebForms
+
+Partial Class AF_TipoOrdenTrabajo
+ Inherits ClsPaginas
+
+#Region " PROPIEDADES"
+
+ Property CveOrdenTrabajo As Integer
+ Get
+ If ViewState("CveOrdenTrabajo") Is Nothing Then
+ Return -1
+ Else
+ Return ViewState("CveOrdenTrabajo").ToString.ToEntero
+ End If
+ End Get
+ Set(value As Integer)
+ ViewState("CveOrdenTrabajo") = value
+ End Set
+ End Property
+
+
+
+
+#End Region
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not Page.IsPostBack Then
+
+
+ If Request("CveOrdenTrabajo") IsNot Nothing Then
+ CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
+ End If
+
+ CargaCombos()
+ End If
+ End Sub
+
+
+#Region " CARGA PARAMETROS "
+
+#End Region
+
+#Region " CARGA COMBOS "
+ Protected Sub CargaCombos()
+
+ Dim ObjAF As New ClsAF
+
+ If ObjAF.GetTiposMantenimiento(-1) Then
+ DdlTipoMantenimiento.DataSource = ObjAF.DtResultados
+ Else
+ DdlTipoMantenimiento.DataSource = Nothing
+ End If
+
+ ObjAF.Dispose()
+
+ DdlTipoMantenimiento.DataBind()
+ DdlTipoMantenimiento.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
+
+ UpFiltro.Update()
+
+
+
+ End Sub
+
+
+#End Region
+
+#Region " CARGA DATOS "
+ 'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
+ ' CargaDatos()
+
+ 'End Sub
+
+
+#End Region
+
+#Region " GV DATOS "
+
+ Private Sub CargaDatos()
+
+ Dim ObjAF As New ClsAF
+
+
+ ObjAF.Dispose()
+
+
+ End Sub
+
+
+
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs)
+
+ If e.Row.RowType = DataControlRowType.DataRow Then
+
+
+
+ End If
+
+ End Sub
+
+#End Region
+
+
+
+
+ Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
+
+ End Sub
+
+
+
+
+#Region "DESCARGA EXCEL"
+
+ 'Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
+
+
+
+ ' For Each GvRow As GridViewRow In Gv1.Rows
+
+ ' Dim IDX_LIMPIAR As Integer = 1
+
+ ' For IDX_LIMPIAR = 1 To 15
+ ' GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
+ ' Next
+
+ ' If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
+ ' GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
+ ' Else
+ ' GvRow.Cells(16).Text = ""
+ ' End If
+
+ ' Next
+
+
+
+ ' Dim sw1 As New StringWriter()
+ ' Dim htw1 As New HtmlTextWriter(sw1)
+ ' Gv1.RenderControl(htw1)
+
+ ' Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
+ ' Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
+
+ ' htmlStream1.Position = 0
+ ' Dim sr1 As New StreamReader(htmlStream1)
+ ' Dim myStr1 = sr1.ReadToEnd()
+
+ ' sr1.Dispose()
+ ' htmlStream1.Dispose()
+ ' sw1.Dispose()
+
+ ' Dim HtmlCompleto As String = myStr1
+
+
+ ' HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
+
+ ' Dim asd As String = ""
+
+
+ ' Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
+
+ ' GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet())
+
+ ' Dim excel As GemBox.Spreadsheet.ExcelFile
+
+ ' excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
+
+ ' If Usuario IsNot Nothing Then
+ ' Dim TotalRowHeader As Integer = 8
+ ' Dim TotalRowFooter As Integer = 2
+
+ ' Dim worksheet = excel.Worksheets(0)
+ ' worksheet.Rows.InsertEmpty(0, TotalRowHeader)
+ ' Dim celdasConTexto = worksheet.GetUsedCellRange(True)
+ ' celdasConTexto.Style.Font.Name = "Calibri Light"
+
+ ' Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
+ ' RangoNombreEmpresa.Merged = True
+ ' RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
+ ' RangoNombreEmpresa.Style.Font.Size = 18 * 20
+ ' RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
+ ' RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
+ ' RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
+
+
+ ' Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
+ ' RangoFiltros.Merged = True
+ ' RangoFiltros.Value = filtros
+ ' RangoFiltros.Style.Font.Size = 15 * 20
+ ' RangoFiltros.Style.Font.Name = "Calibri Light"
+ ' RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
+ ' RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
+
+
+ ' Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
+ ' RangoTitulo.Merged = True
+ ' RangoTitulo.Value = Titulo
+ ' RangoTitulo.Style.Font.Size = 20 * 20
+ ' RangoTitulo.Style.Font.Name = "Calibri Light"
+ ' RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
+ ' RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
+
+ ' For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
+ ' worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
+ ' worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
+ ' worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
+
+ ' worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
+ ' worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
+
+
+
+
+ ' If i > 0 Then
+ ' Try
+ ' worksheet.Columns(i).AutoFit(1)
+ ' Catch ex As Exception
+ ' End Try
+ ' End If
+
+ ' Next
+
+ ' Dim IndexEndTable As Integer = Gv1.Rows.Count + 4 + TotalRowHeader + TotalRowFooter
+
+ ' worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
+ ' worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
+
+ ' worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
+ ' worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
+
+ ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
+
+ ' If Imagen.Exists Then
+ ' Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
+ ' Using sr As New StreamReader(Ruta)
+ ' Dim ms As New MemoryStream()
+ ' sr.BaseStream.CopyTo(ms)
+ ' worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
+ ' End Using
+ ' End If
+
+ ' End If
+
+
+
+
+ ' Dim memoryStream As New MemoryStream()
+ ' excel.Save(memoryStream, SaveOptions.XlsxDefault)
+ ' ReporteBytes = memoryStream.ToArray()
+ ' memoryStream.Dispose()
+
+ 'End Sub
+
+
+ 'Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
+
+
+ ' Response.ContentType = "application/force-download"
+ ' Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
+ ' Response.BinaryWrite(ReporteBytes)
+ ' Response.End()
+
+ 'End Sub
+
+
+ 'Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
+ 'End Sub
+
+#End Region
+
+
+
+End Class
diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb
index 410a4db11..e1402fd73 100644
--- a/App_Code/ClsAF.vb
+++ b/App_Code/ClsAF.vb
@@ -17,18 +17,28 @@ Public Class ClsAF
Private SqlCommand As SqlCommand
Private SqlTransacc As SqlTransaction
Private Data As DataTable
+ Private DSet As New DataSet
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIÓN
Private CveConexion As Integer = 0
- Private EsTransaccionCompartida As Boolean = False
+ Private EsTransaccionCompartida As Boolean = False
+
+ Public CveMetricaValor As Integer = 0
+
#End Region
-
+
#Region "Propiedades"
Public ReadOnly Property DtResultados() As DataTable
Get
DtResultados = Data
End Get
+ End Property
+
+ Public ReadOnly Property DSResultados() As DataSet
+ Get
+ DSResultados = DSet
+ End Get
End Property
Public Property CveActivoFijo As Integer
@@ -3239,9 +3249,10 @@ Public Class ClsAF
End Try
Return Retorno
- End Function
+ End Function
#End Region
#Region "M E T R I C A S"
+
Public Function GetMetricas(CveMetrica As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -3296,11 +3307,35 @@ Public Class ClsAF
OnError("Ocurrió un error al agregar la métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
+ Return Retorno
+ End Function
+
+
+
+ Public Function GetMetricasRegistro(CveSubProyecto As Integer, CveEmpresa As Integer, Fecha As Date) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasRegistroGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@Fecha", SqlDbType.Date).Value = Fecha
+ End With
+
+ Try
+ SqlAdapter.Fill(DSet)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
Return Retorno
End Function
- Public Function GetMetricasValores(Optional CveMetricaValor As Integer = -1, Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
- Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
+
+ Public Function GetMetricasValores(CveMetricaValor As Integer, CveAF As Integer, CvePersonal As Integer, CveUsuario As Integer, CveSubProyecto As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, FechaI As Date, FechaF As Date,
+ CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_MetricasValoresGet")
@@ -3311,12 +3346,15 @@ Public Class ClsAF
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
- .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
- .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
+ .Add("@CveTipoActivoFijo", SqlDbType.Int).Value = CveTipoActivoFijo
+ .Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
- SqlAdapter.Fill(Data)
+ SqlAdapter.Fill(DSet)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
@@ -3325,9 +3363,9 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function AddMetricasValores(Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
- Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
+ Public Function AddMetricasValores(CveAF As Integer, CvePersonal As Integer, CveUsuario As Integer, CveSubProyecto As Integer, Fecha As Date, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
+ CveMetricaValor = -1
DataAdapter("PA_AF_MetricasValoresAdd")
@@ -3336,12 +3374,16 @@ Public Class ClsAF
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
- .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
- .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
+ .Add("@Fecha", SqlDbType.Date).Value = Fecha
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveMetricaValor", SqlDbType.Int).Direction = ParameterDirection.Output
+
+
End With
Try
SqlAdapter.Fill(Data)
+ CveMetricaValor = SqlAdapter.SelectCommand.Parameters("@CveMetricaValor").Value.ToString.ToEntero
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el valor de métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
@@ -3370,7 +3412,7 @@ Public Class ClsAF
Return Retorno
End Function
- Public Function GetMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1) As Boolean
+ Public Function GetMetricasValoresDetalle(CveEmpresa As Integer, Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_MetricasValoresDetalleGet")
@@ -3378,6 +3420,7 @@ Public Class ClsAF
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
.Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
@@ -3388,27 +3431,27 @@ Public Class ClsAF
End Try
Return Retorno
- End Function
-
- Public Function AddMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1, Optional Valor As String = "-1") As Boolean
- Dim Retorno As Boolean = False
-
- DataAdapter("PA_AF_MetricasValoresDetalleAdd")
-
- With SqlAdapter.SelectCommand.Parameters
- .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
- .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
- .Add("@Valor", SqlDbType.NVarChar).Value = Valor
- End With
-
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- OnError("Ocurrió un error al agregar el detalle de los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- End Try
-
- Return Retorno
+ End Function
+
+ Public Function AddMetricasValoresDetalle(CveMetricaValor As Integer, CveMetrica As Integer, Valor As Decimal) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_MetricasValoresDetalleAdd")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
+ .Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
+ .Add("@Valor", SqlDbType.Decimal).Value = Valor
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al agregar el detalle de los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
End Function
Public Function DeleteMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1, Optional Valor As String = "-1") As Boolean
@@ -3419,7 +3462,7 @@ Public Class ClsAF
With SqlAdapter.SelectCommand.Parameters
.Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
.Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
- .Add("@Valor", SqlDbType.NVarChar).Value = Valor
+ .Add("@Valor", SqlDbType.VarChar).Value = Valor
End With
Try
@@ -3429,14 +3472,314 @@ Public Class ClsAF
OnError("Ocurrió un error al eliminar el detalle de los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
+ Return Retorno
+ End Function
+
+#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
+
+ Public Function GetTiposMantenimiento(CveTipoMantenimiento As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_TiposMantenimientoGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveTipoMantenimiento", SqlDbType.Int).Value = CveTipoMantenimiento
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los tipos de mantenimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetActividades(CveActividad As Integer, CvePuesto As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_AF_ActividadesGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveActividad", SqlDbType.Int).Value = CveActividad
+ .Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
+ .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 las actividades", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
#End Region
-
-
+
+
#Region " IDisposable Support "
- ' IDisposable
+ ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
If disposing Then
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 7d260f7a6..f7c161809 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -128,6 +128,7 @@ Public Class ClsInventarios
Public Property CveRemanufactura As Integer
Public Property ResponsableCarga As String
Public Property ResponsableRecibio As String
+ Public Property Modulo As String
@@ -851,6 +852,7 @@ Public Class ClsInventarios
PuestoRecibio = dr("PuestoEntrego").ToString
ResponsableCarga = dr("ResponsableCarga").ToString
ResponsableRecibio = dr("ResponsableRecibio").ToString
+ Modulo = dr("Modulo").ToString
Retorno = True
End If
@@ -2751,7 +2753,7 @@ Public Class ClsInventarios
Return Retorno
End Function
- Public Function ComprasPendientesAlmacenGet(CveProveedor As Integer, Fecha As Date, CveEmpresa As Integer) As Boolean
+ Public Function ComprasPendientesAlmacenGet(CveProveedor As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ComprasPendientesAlmacenGet")
@@ -2759,6 +2761,7 @@ Public Class ClsInventarios
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Fecha", SqlDbType.Date).Value = Fecha
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 68a9d44e3..70b5ff422 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3951,6 +3951,15 @@ Public Class ClsPaginas
PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1)
PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251)
+ PaginaDict.Add("/AF/RepRevision.aspx".ToUpper(), 1252)
+ PaginaDict.Add("/AF/CatTiposServicios.aspx".ToUpper(), 765)
+ PaginaDict.Add("/AF/CatTiposServiciosActividades.aspx".ToUpper(), 766)
+ PaginaDict.Add("/AF/CatTiposServiciosMateriales.aspx".ToUpper(), 767)
+
+ PaginaDict.Add("/AF/TipoOrdenTrabajo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/OrdenTrabajo.aspx".ToUpper(), -1)
+ PaginaDict.Add("/AF/RepOrdenTrabajo.aspx".ToUpper(), -1)
+
#End Region
'AIMMGM
#Region "AIMMGM"
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index eeee4c853..7e1ee24e2 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -3839,7 +3839,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al agregar el Curso CursoAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al agregar el Curso CursoAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -3875,7 +3875,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al Actualizar el Curso CursoUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Actualizar el Curso CursoUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -3894,12 +3894,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Retorno = True
Catch exs As SqlException
If exs.ErrorCode = -2146232060 Then
- OnError("Ocurrió al Eliminar el Curso, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Curso, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
- OnError("Ocurrió al Eliminar el Curso CursoRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Curso CursoRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If
Catch ex As Exception
- OnError("Ocurrió al Eliminar el Curso CursoRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Curso CursoRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
@@ -3924,7 +3924,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al consultar el reporte CursosRepGet.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al consultar el reporte CursosRepGet.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4115,7 +4115,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al agregar el Tema TemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al agregar el Tema TemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4140,7 +4140,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al Actualizar el Tema TemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió error al Actualizar el Tema TemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4157,14 +4157,24 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Try
SqlAdapter.Fill(Data)
Retorno = True
- Catch exs As SqlException
- If exs.ErrorCode = -2146232060 Then
- OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ Catch exs As SqlException
+
+
+ If exs.Message.Contains("Número: 547;") Then
+ OnError("El Tema no se puede eliminar porque tiene registros relacionados..", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
- OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- End If
+ OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End If
+
+
+ 'If exs.ErrorCode = -2146232060 Then
+ ' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ 'Else
+ ' OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ 'End If
+
Catch ex As Exception
- OnError("Ocurrió al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
@@ -4215,7 +4225,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al agregar el Subtema SubtemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al agregar el Subtema SubtemaAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4241,7 +4251,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al Actualizar el Subtema SubtemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Actualizar el Subtema SubtemaUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4260,12 +4270,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Catch exs As SqlException
If exs.ErrorCode = -2146232060 Then
- OnError("Ocurrió al Eliminar el Subtema, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Subtema, Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
- OnError("Ocurrió al Eliminar el Subtema SubtemaRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Subtema SubtemaRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If
Catch ex As Exception
- OnError("Ocurrió al Eliminar el Subtema SubtemaRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Subtema SubtemaRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
@@ -4319,7 +4329,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al agregar el Capacitador CapacitadorAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al agregar el Capacitador CapacitadorAdd.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4348,7 +4358,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió al Actualizar el Capacitador CapacitadorUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Actualizar el Capacitador CapacitadorUpdate.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -4366,12 +4376,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Retorno = True
Catch exs As SqlException
If exs.ErrorCode = -2146232060 Then
- OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else
- OnError("Ocurrió al Eliminar el Tema CapaditadorRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Tema CapaditadorRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If
Catch ex As Exception
- OnError("Ocurrió al Eliminar el Tema CapacitadorRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ OnError("Ocurrió un error al Eliminar el Tema CapacitadorRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
@@ -6859,25 +6869,26 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
- End Function
-
+ End Function
+
#End Region
-
-
- Public msgsError As New StringBuilder()
- Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
- GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
- msgsError.AppendLine(Mensaje)
- msgsError.Append("
")
- 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
- 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
- End Sub
+
+
+ 'Public msgsError As New StringBuilder()
+ 'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
+ ' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
+ ' msgsError.AppendLine(Mensaje)
+ ' msgsError.Append("
")
+ ' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
+ ' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
+ 'End Sub
+
#Region " IDisposable Support "
- ' IDisposable
+ ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
- If msgsError.ToString().Length > 0 Then
- Alert(msgsError.ToString(), TipoMensaje.MsgError)
- End If
+ 'If msgsError.ToString().Length > 0 Then
+ ' Alert(msgsError.ToString(), TipoMensaje.MsgError)
+ 'End If
If Not disposedValue Then
If disposing Then
' TODO: Liberar otro estado (objetos administrados).
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index e4cb5ef17..e3592c397 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -445,7 +445,7 @@ Public Class ClsVentas
Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") And Ex1.Message.Contains("UK_Ventas_TipoDocto_Serie_Folio_CveSubProyecto") Then
Alert(String.Format("el Folio '{0}' ya se encuentra registrado", FolioFact), TipoMensaje.MsgAdvertencia)
- GuardaLog(String.Format("el folio ya se encuentra registrado {0} {1}", Ex1.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
+ GuardaLogAD(String.Format("el folio ya se encuentra registrado {0} {1}", Ex1.Message, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
Else
Me.OnError("Ocurrió un error al Guardar la Venta.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
diff --git a/App_Code/DtDatos.xsd b/App_Code/DtDatos.xsd
index 799552e6a..f4839bec3 100644
--- a/App_Code/DtDatos.xsd
+++ b/App_Code/DtDatos.xsd
@@ -235,6 +235,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -271,22 +289,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/App_Code/DtDatos.xss b/App_Code/DtDatos.xss
index 6fa884b50..3d21fe6c6 100644
--- a/App_Code/DtDatos.xss
+++ b/App_Code/DtDatos.xss
@@ -4,7 +4,7 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
@@ -16,9 +16,9 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb
index d6b4ed630..b5a36f751 100644
--- a/Bancos/ProveedoresAbonar.aspx.vb
+++ b/Bancos/ProveedoresAbonar.aspx.vb
@@ -138,6 +138,17 @@ Partial Class Bancos_ProveedoresAbonar
Return ViewState("IdCtaProveedorExtranjera").ToString.ToEntero
End Get
End Property
+ Private ReadOnly Property CtaAcreedor As Integer
+ Get
+ Return ViewState("CtaAcreedor").ToString.ToEntero
+ End Get
+ End Property
+
+ Private ReadOnly Property IdCtaAcreedorExtranjera As Integer
+ Get
+ Return ViewState("IdCtaAcreedorExtranjera").ToString.ToEntero
+ End Get
+ End Property
Private ReadOnly Property CveCuentaProveedor As Integer
Get
@@ -215,6 +226,11 @@ Partial Class Bancos_ProveedoresAbonar
Return ViewState("IdCtaContComplementaria").ToString.ToEntero
End Get
End Property
+ Private ReadOnly Property IdCtaContAcreedorComplementaria As Integer
+ Get
+ Return ViewState("IdCtaContAcreedorComplementaria").ToString.ToEntero
+ End Get
+ End Property
Private ReadOnly Property IdCtaContRetIVA As Integer
Get
@@ -521,7 +537,10 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("CtaProveedor") = ObjProveedor.IdCtaContProveedores
ViewState("IdCtaProveedorExtranjera") = ObjProveedor.IdCtaContProveedoresExtranjera
+ ViewState("CtaAcreedor") = ObjProveedor.IdCtaContAcreedor
+ ViewState("IdCtaAcreedorExtranjera") = ObjProveedor.IdCtaContAcreedorExtranjera
ViewState("IdCtaContComplementaria") = ObjProveedor.IdCtaContProveedoresComplementaria
+ ViewState("IdCtaAcreedorComplementaria") = ObjProveedor.IdCtaContAcreedorComplementaria
ViewState("CveCuentaProveedor") = ObjProveedor.CveCuentaProveedores
ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
@@ -1013,8 +1032,13 @@ Partial Class Bancos_ProveedoresAbonar
ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}"
'cuando son dolares, y tienen complementaria, se hace el registro
If gvr.DataKey("CveMoneda").ToEntero = 1 Then
- IdCtaContable = CtaProveedor
- CveCuenta = CveCuentaProveedor
+ If gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then
+ IdCtaContable = CtaAcreedor
+ Else
+ IdCtaContable = CtaProveedor
+ CveCuenta = CveCuentaProveedor
+ End If
+
Else
Dim CveConceptoComplementaria As Integer = 206
If gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then CveConceptoComplementaria = 310
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index f776cecb2..0f88f211d 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -3518,6 +3518,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString))
params.Add(New ReportParameter("PuestoEntrego", dr("PuestoEntrego").ToString))
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString))
+ params.Add(New ReportParameter("DepartamentoEntrego", dr("DepartamentoEntrego").ToString))
params.Add(New ReportParameter("Folio", dr("Folio").ToString))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString))
params.Add(New ReportParameter("Telefono", dr("Celular").ToString))
diff --git a/Contabilidad/RepIVA.aspx b/Contabilidad/RepIVA.aspx
index ac20c6490..5e60f096a 100644
--- a/Contabilidad/RepIVA.aspx
+++ b/Contabilidad/RepIVA.aspx
@@ -126,7 +126,8 @@
-
+
+
@@ -202,6 +203,8 @@
+
+
<%--
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
index 28d168f57..58c7fb895 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb
@@ -240,20 +240,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
TotalActualMes = 0
TotalAnteriorMes = 0
- 'TotalActualMes = 0
- 'TotalAnteriorMes = 0
-
- 'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString
- 'TxtFechaFin.Text = Date.Now.ToShortDateString
CargaEjercicios()
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
TabSubProyecto.HeaderText = LblSubProyecto.Text & " H."
- 'DdlSubproyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
- 'DdlSubproyecto.DataBind()
- ' CargaDatos()
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
ValidaEjercicios()
diff --git a/Contabilidad2/RepLibroDiario.aspx.vb b/Contabilidad2/RepLibroDiario.aspx.vb
index 9ae6cf4b7..60dd72327 100644
--- a/Contabilidad2/RepLibroDiario.aspx.vb
+++ b/Contabilidad2/RepLibroDiario.aspx.vb
@@ -113,8 +113,13 @@ Partial Class Contabilidad2_RepLibroDiario
e.Row.Cells(1).Text = ""
e.Row.Cells(2).Text = ""
e.Row.Cells(3).Text = ""
- e.Row.Cells(7).Text = If(e.Row.Cells(7).Text.ToEntero() > 0, e.Row.Cells(7).Text, "")
- e.Row.Cells(8).Text = If(e.Row.Cells(8).Text.ToEntero() > 0, e.Row.Cells(8).Text, "")
+ If e.Row.DBCampo("TipoMovto") = "True" Then
+ e.Row.Cells(7).Text = ""
+ Else
+ e.Row.Cells(8).Text = ""
+ End If
+ 'e.Row.Cells(7).Text = If(e.Row.Cells(7).Text.ToEntero() > 0, e.Row.Cells(7).Text, "")
+ 'e.Row.Cells(8).Text = If(e.Row.Cells(8).Text.ToEntero() > 0, e.Row.Cells(8).Text, "")
End If
'SUBTOTAL
diff --git a/Contratos/Contrato.aspx b/Contratos/Contrato.aspx
index 8483f7265..0bb5d7b3a 100644
--- a/Contratos/Contrato.aspx
+++ b/Contratos/Contrato.aspx
@@ -2248,7 +2248,7 @@
-
+
diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb
index dce2ecdcf..4a59ab77a 100644
--- a/Contratos/Contrato.aspx.vb
+++ b/Contratos/Contrato.aspx.vb
@@ -586,7 +586,7 @@ Partial Class Contratos_Default
'TabContratosGastos.Visible = False
'DONDE OCUPA ALMACEN
- Dim CveTipoAlmacenOrigen = "12"
+ Dim CveTipoAlmacenOrigen = "12,15"
Dim CveTipoAlmacenDestino = "11,12"
If TipoContrato.Contiene({7, 9, 13, 16, 18, 21, 27}) Then
RowAlmacen.Visible = True
@@ -1503,7 +1503,7 @@ Partial Class Contratos_Default
End Sub
Protected Sub CargaSubProyectoContrato(CveProyecto As Integer)
DdlSubProyectoContrato.Items.Clear()
- DdlSubProyectoContrato.DataSource = GlobalDTSubProyectos(CveProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubproyecto", "SubProyecto2"})
+ DdlSubProyectoContrato.DataSource = GlobalDTSubProyectos(CveProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "", {"CveSubproyecto", "SubProyecto"})
DdlSubProyectoContrato.DataBind()
DdlSubProyectoContrato.Items.Insert(0, New ListItem("Seleccione un Proyecto", "-1"))
End Sub
@@ -3018,9 +3018,9 @@ Partial Class Contratos_Default
Public Sub CargaDatosEncabezado()
TablaUtilidad.Visible = True
- LblUtilidad.Text = $"$ {(SumaUtilidad - SumaGasto).ToString.FormatoNumero()}"
+ LblUtilidad.Text = $"$ {(SumaAvance - SumaGasto).ToString.FormatoNumero()}"
- If (SumaUtilidad - SumaGasto) < 0 Then LblUtilidad.ForeColor = Drawing.Color.Red
+ If (SumaAvance - SumaGasto) < 0 Then LblUtilidad.ForeColor = Drawing.Color.Red
LblFacturado.Text = SumaAvance.FormatoNumero
LblPorFacturar.Text = (LblImporte.Text.ToDouble - SumaAvance).FormatoNumero
diff --git a/Edoc/Contratos.aspx b/Edoc/Contratos.aspx
index b49544a0c..bc9e9b3c4 100644
--- a/Edoc/Contratos.aspx
+++ b/Edoc/Contratos.aspx
@@ -121,7 +121,7 @@