diff --git a/AF/AF.aspx b/AF/AF.aspx index 82e22650c..ecf2bb86b 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -2882,7 +2882,7 @@
Almacén:
- +
diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index d5be1124a..690738748 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -537,7 +537,7 @@ Partial Class AF_AF HLAFInv.Visible = True - Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,12)" + Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,15)" DdlAFInvAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, CveEmpresaActual, CveTipoAlmacen:=-1).FiltraParametros(StrAlmacenes) DdlAFInvAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) DdlAFInvAlmacen.SelectedValue = "-1" diff --git a/AF/CatTiposServicios.aspx b/AF/CatTiposServicios.aspx new file mode 100644 index 000000000..f5cabf7c6 --- /dev/null +++ b/AF/CatTiposServicios.aspx @@ -0,0 +1,76 @@ +<%@ Page Title="AF - Catálogo de Tipos de Servicio" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatTiposServicios.aspx.cs" Inherits="AF_CatTiposServicios" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + Catálogo de Tipos de Servicios + + + + +
  • + +
  • + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AF/CatTiposServicios.aspx.cs b/AF/CatTiposServicios.aspx.cs new file mode 100644 index 000000000..c553b8dd1 --- /dev/null +++ b/AF/CatTiposServicios.aspx.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; + +public partial class AF_CatTiposServicios : ClsPaginas +{ + private int CveTipoServicio + { + get + { + return ViewState["CveTipoServicio"].ToString().ToEntero(); + } + + set + { + ViewState["CveTipoServicio"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaDatos(); + } + } + + private void CargaDatos() + { + ClsAF ObjAF = new ClsAF(); + if (ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa)) + { + GvDatos.DataSource = ObjAF.DtResultados; + GvDatos.DataBind(); + } + + if (ObjAF.GetTiposMantenimiento(-1)) + { + DdlTipoMantenimiento.DataSource = ObjAF.DtResultados; + DdlTipoMantenimiento.DataBind(); + } + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicioD_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Agregar"; + TxtNombre.Text = ""; + DdlTipoMantenimiento.SelectedValueExist(-1); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD")); + } + + protected void LnkEditar_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Actualizar"; + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicio = GvRow.DataKey("CveTipoServicio").ToEntero(); + TxtNombre.Text = GvRow.DataKey("Nombre"); + DdlTipoMantenimiento.SelectedValueExist(GvRow.DataKey("CveTipoMantenimiento")); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD")); + } + + protected void LnkEliminar_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicio = GvRow.DataKey("CveTipoServicio").ToEntero(); + ClsAF ObjAF = new ClsAF(); + if (ObjAF.DeleteTiposServicios(CveTipoServicio)) + { + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")); + Alert("Se eliminó el Tipo de Gasto correctamente"); + } + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicio_Click(object sender, EventArgs e) + { + ClsAF ObjAF = new ClsAF(); + if (BtnAgregarTipoServicio.Text == "Agregar") + { + if (ObjAF.AddTiposServicios(TxtNombre.Text,DdlTipoMantenimiento.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")); + Alert("Se agregó el Tipo de Gasto correctamente"); + } + } + else + { + if (ObjAF.UpdateTiposServicios(CveTipoServicio, TxtNombre.Text, DdlTipoMantenimiento.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)) + { + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")); + Alert("Se actualizó el Tipo de Gasto correctamente"); + } + } + ObjAF.Dispose(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")); + } +} \ No newline at end of file diff --git a/AF/CatTiposServiciosActividades.aspx b/AF/CatTiposServiciosActividades.aspx new file mode 100644 index 000000000..6d0cfbf64 --- /dev/null +++ b/AF/CatTiposServiciosActividades.aspx @@ -0,0 +1,84 @@ +<%@ Page Title="AF - Catálogo de Actividades de Tipos de Servicio" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatTiposServiciosActividades.aspx.cs" Inherits="AF_CatTiposServiciosActividades" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + Catálogo de Actividades de Tipos de Servicio + + + + +
  • + +
  • + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AF/CatTiposServiciosActividades.aspx.cs b/AF/CatTiposServiciosActividades.aspx.cs new file mode 100644 index 000000000..80f1e0df3 --- /dev/null +++ b/AF/CatTiposServiciosActividades.aspx.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; + +public partial class AF_CatTiposServiciosActividades : ClsPaginas +{ + private int CveTipoServicioActividad + { + get + { + return ViewState["CveTipoServicioActividad"].ToString().ToEntero(); + } + + set + { + ViewState["CveTipoServicioActividad"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaDatos(); + } + } + + private void CargaDatos() + { + ClsAF ObjAF = new ClsAF(); + if (ObjAF.GetTiposServiciosActividades(-1, -1)) + { + GvDatos.DataSource = ObjAF.DtResultados; + GvDatos.DataBind(); + } + + if (ObjAF.GetActividades(-1,-1,-1,UsuarioActual.CveEmpresa)) + { + DdlActividades.DataSource = ObjAF.DtResultados; + DdlActividades.DataBind(); + } + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicioD_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Agregar"; + TxtDuracion.Text = ""; + TxtObservaciones.Text = ""; + DdlActividades.SelectedValueExist(-1); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosActividadesD")); + } + + protected void LnkEditar_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Actualizar"; + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicioActividad = GvRow.DataKey("CveTipoServicioActividad").ToEntero(); + TxtDuracion.Text = GvRow.DataKey("Duracion"); + TxtObservaciones.Text = GvRow.DataKey("Observaciones"); + DdlActividades.SelectedValueExist(GvRow.DataKey("CveActividad")); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosActividadesD")); + } + + protected void LnkEliminar_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicioActividad = GvRow.DataKey("CveTipoServicioActividad").ToEntero(); + ClsAF ObjAF = new ClsAF(); + if (ObjAF.DeleteTiposServiciosActividades(CveTipoServicioActividad)) + { + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosActividadesD")); + Alert("Se eliminó la Actividad del Tipo de Servicio correctamente"); + } + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicio_Click(object sender, EventArgs e) + { + ClsAF ObjAF = new ClsAF(); + if (BtnAgregarTipoServicio.Text == "Agregar") + { + if (ObjAF.AddTiposServiciosActividades(DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text)) + { + Alert("Se agregó la Actividad del Tipo de Servicio correctamente"); + } + } + else + { + if (ObjAF.UpdateTiposServiciosActividades(CveTipoServicioActividad,DdlActividades.SelectedValue.ToEntero(),TxtDuracion.Text.ToEntero(),TxtObservaciones.Text)) + { + Alert("Se actualizó la Actividad del Tipo de Servicio correctamente"); + } + } + ObjAF.Dispose(); + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosActividadesD")); + } +} \ No newline at end of file diff --git a/AF/CatTiposServiciosMateriales.aspx b/AF/CatTiposServiciosMateriales.aspx new file mode 100644 index 000000000..65010d147 --- /dev/null +++ b/AF/CatTiposServiciosMateriales.aspx @@ -0,0 +1,98 @@ +<%@ Page Title="AF - Catálogo de Materiales de Tipos de Servicio" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatTiposServiciosMateriales.aspx.cs" Inherits="AF_CatTiposServiciosMateriales" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + Catálogo de Materiales de Tipos de Servicio + + + + +
  • + +
  • + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AF/CatTiposServiciosMateriales.aspx.cs b/AF/CatTiposServiciosMateriales.aspx.cs new file mode 100644 index 000000000..91633b322 --- /dev/null +++ b/AF/CatTiposServiciosMateriales.aspx.cs @@ -0,0 +1,120 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using Extensiones; +using System.Data; + +public partial class AF_CatTiposServiciosMateriales : ClsPaginas +{ + private int CveTipoServicioMaterial + { + get + { + return ViewState["CveTipoServicioMaterial"].ToString().ToEntero(); + } + + set + { + ViewState["CveTipoServicioMaterial"] = value; + } + } + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + CargaDatos(); + } + } + + private void CargaDatos() + { + ClsAF ObjAF = new ClsAF(); + if (ObjAF.GetTiposServiciosMaterial(-1, -1)) + { + GvDatos.DataSource = ObjAF.DtResultados; + GvDatos.DataBind(); + } + + if (ObjAF.GetTiposServicios(-1, -1,-1,UsuarioActual.CveEmpresa)) + { + DdlTipoServicio.DataSource = ObjAF.DtResultados; + DdlTipoServicio.DataBind(); + } + + DdlUM.DataSource = get_GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa); + DdlUM.DataBind(); + + DdlPS.DataSource = get_GlobalDTPS(UsuarioActual.CveEmpresa); + DdlPS.DataBind(); + + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicioD_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Agregar"; + TxtCantidad.Text = ""; + TxtTipo.Text = ""; + DdlTipoServicio.SelectedValueExist(-1); + DdlUM.SelectedValueExist(-1); + DdlPS.SelectedValueExist(-1); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosMaterialD")); + } + + protected void LnkEditar_Click(object sender, EventArgs e) + { + BtnAgregarTipoServicio.Text = "Actualizar"; + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicioMaterial = GvRow.DataKey("CveTipoServicioMaterial").ToEntero(); + TxtCantidad.Text = GvRow.DataKey("Cantidad"); + TxtTipo.Text = GvRow.DataKey("Tipo"); + DdlTipoServicio.SelectedValueExist(GvRow.DataKey("CveTipoServicio")); + DdlPS.SelectedValueExist(GvRow.DataKey("CvePS")); + DdlUM.SelectedValueExist(GvRow.DataKey("CveUM")); + UpModalTiposD.Update(); + RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosMaterialD")); + } + + protected void LnkEliminar_Click(object sender, EventArgs e) + { + GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer); + CveTipoServicioMaterial = GvRow.DataKey("CveTipoServicioMaterial").ToEntero(); + ClsAF ObjAF = new ClsAF(); + if (ObjAF.DeleteTiposServiciosMaterial(CveTipoServicioMaterial)) + { + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosMaterialD")); + Alert("Se eliminó el Material del Tipo de Servicio correctamente"); + } + ObjAF.Dispose(); + } + + protected void BtnAgregarTipoServicio_Click(object sender, EventArgs e) + { + ClsAF ObjAF = new ClsAF(); + if (BtnAgregarTipoServicio.Text == "Agregar") + { + if (ObjAF.AddTiposServiciosMaterial(DdlTipoServicio.SelectedValue.ToEntero(),TxtCantidad.Text.ToDecimal(),DdlUM.SelectedValue.ToEntero(),DdlPS.SelectedValue.ToEntero(),TxtTipo.Text.ToEntero())) + { + Alert("Se agregó el Material del Tipo de servicio correctamente"); + } + } + else + { + if (ObjAF.UpdateTiposServiciosMaterial(CveTipoServicioMaterial, DdlTipoServicio.SelectedValue.ToEntero(), TxtCantidad.Text.ToDecimal(), DdlUM.SelectedValue.ToEntero(), DdlPS.SelectedValue.ToEntero(), TxtTipo.Text.ToEntero())) + { + Alert("Se actualizó el Material del Tipo de servicio correctamente"); + } + } + ObjAF.Dispose(); + CargaDatos(); + UpDatos.Update(); + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosMaterialD")); + } +} \ No newline at end of file diff --git a/AF/OrdenTrabajo.aspx b/AF/OrdenTrabajo.aspx new file mode 100644 index 000000000..955d449d4 --- /dev/null +++ b/AF/OrdenTrabajo.aspx @@ -0,0 +1,341 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenTrabajo.aspx.vb" Inherits="AF_OrdenTrabajo" EnableEventValidation = "false" %> + + + + + + + + + + + + + + Registro Revisión + + + + + + + + + +
    +
    +
    +
    + + +
    +
    +
    + <%--
    +
    +
    + + +
    + +
    + + + + +
    + + + + +
    + + + + +
    + +
    + + + + + +
    + + +
    + + +
    + +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    +
    + + +
    + + + + + + diff --git a/AF/OrdenTrabajo.aspx.vb b/AF/OrdenTrabajo.aspx.vb new file mode 100644 index 000000000..d7c2d7326 --- /dev/null +++ b/AF/OrdenTrabajo.aspx.vb @@ -0,0 +1,285 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports System.IO +Imports Extensiones +Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms + +Partial Class AF_OrdenTrabajo + 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.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then + DdlTipoServicio.DataSource = ObjAF.DtResultados + Else + DdlTipoServicio.DataSource = Nothing + End If + + ObjAF.Dispose() + + DdlTipoServicio.DataBind() + DdlTipoServicio.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) 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 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/AF/RegistroRevision.aspx b/AF/RegistroRevision.aspx index 33ca39586..4df1a11fe 100644 --- a/AF/RegistroRevision.aspx +++ b/AF/RegistroRevision.aspx @@ -192,6 +192,7 @@ + @@ -199,6 +200,7 @@ + @@ -206,6 +208,7 @@ + @@ -213,6 +216,7 @@ + @@ -220,6 +224,7 @@ + @@ -227,6 +232,7 @@ + @@ -234,6 +240,7 @@ + @@ -241,6 +248,7 @@ + @@ -248,6 +256,7 @@ + @@ -255,6 +264,7 @@ + @@ -262,6 +272,7 @@ + @@ -269,24 +280,28 @@ + + + + diff --git a/AF/RegistroRevision.aspx.vb b/AF/RegistroRevision.aspx.vb index 239360a85..a7d770ea2 100644 --- a/AF/RegistroRevision.aspx.vb +++ b/AF/RegistroRevision.aspx.vb @@ -226,9 +226,9 @@ Partial Class AF_RegistroRevision Dim x As Integer = 0 For x = 0 To limite - Dim valor As String = GvRow.FCTextBox($"TxtMetrica{x + 1}").Text + Dim valor As Decimal = GvRow.FCTextBox($"TxtMetrica{x + 1}").Text.ToDecimal - valor = If(valor.Trim.Length = 0, "0", valor) + ' valor = If(valor.Trim.Length = 0, "0", valor) If ObjAF.AddMetricasValoresDetalle(CveMetricaValor, DT_Cabeceras(x)("CveMetrica").ToString.ToEntero, valor) Then ErrorProceso = False Else 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 + + + + + + + + + + +
    +
    +
    +
    +
    + + + Tipo Servicio +
    +
    +
    + <%--
    +
    +
    + + +
    + +
    + + + + +
    + +
    + + + + +
    + +
    + + + + + + +
    + +
    + + + + + +
    + + +
    + + +
    + +
    +
    + + + +
    +
    + + + + + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + +
    +
    +
    +
    + + +
    + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    +
    + + +
    + + + + + + 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 3b6189bef..e1402fd73 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -3431,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.VarChar).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 @@ -3473,10 +3473,10 @@ Public Class ClsAF End Try Return Retorno - End Function - + 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 @@ -3732,12 +3732,54 @@ Public Class ClsAF End Try Return Retorno - End Function + 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 03a37d2fa..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 diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index bf5a7dea3..70b5ff422 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3952,6 +3952,14 @@ Public Class ClsPaginas 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 3ac5ef12b..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 @@ -4161,9 +4161,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo If exs.Message.Contains("Número: 547;") Then - OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + 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) + OnError("El Tema no se puede eliminar porque tiene registros relacionados. TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End If @@ -4174,7 +4174,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo '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 @@ -4225,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 @@ -4251,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 @@ -4270,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 @@ -4329,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 @@ -4358,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 @@ -4376,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 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/Compras.aspx b/Compras/Compras.aspx index 7537d835a..8e172dfe6 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -650,7 +650,7 @@
    -
    +
    @@ -658,7 +658,7 @@ <%----%>
    -
    +
    @@ -1232,7 +1232,7 @@ - + @@ -2559,11 +2559,11 @@ - +

    - +

    @@ -3895,9 +3895,9 @@