From 5e6ae8bf92738cfb76b6273512f1de21a2aacb0c Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 17 Aug 2020 10:48:56 -0700 Subject: [PATCH 1/7] - --- AF/AF.aspx | 2 +- AF/AF.aspx.vb | 2 +- AF/CatTiposServicios.aspx | 76 ++++++++++++++++++++++++ AF/CatTiposServicios.aspx.cs | 101 ++++++++++++++++++++++++++++++++ Compras/PopUpVerFactura.aspx.vb | 1 + 5 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 AF/CatTiposServicios.aspx create mode 100644 AF/CatTiposServicios.aspx.cs 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..97e152aa5 --- /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..57398cc36 --- /dev/null +++ b/AF/CatTiposServicios.aspx.cs @@ -0,0 +1,101 @@ +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) + { + + } + + private void CargaDatos() + { + ClsAF ObjAF = new ClsAF(); + if (ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa)) + { + GvDatos.DataSource = ObjAF.DtResultados; + GvDatos.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(); + } +} \ No newline at end of file diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 39658a220..5b067c967 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)) From 8007989c4ca44700cce4d3b3e9516ca7bad81f4d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 18 Aug 2020 11:09:47 -0700 Subject: [PATCH 2/7] - --- AF/CatTiposServicios.aspx | 4 +- AF/CatTiposServicios.aspx.cs | 12 ++- AF/CatTiposServiciosActividades.aspx | 84 +++++++++++++++++ AF/CatTiposServiciosActividades.aspx.cs | 109 +++++++++++++++++++++ AF/CatTiposServiciosMateriales.aspx | 98 +++++++++++++++++++ AF/CatTiposServiciosMateriales.aspx.cs | 120 ++++++++++++++++++++++++ App_Code/ClsAF.vb | 50 +++++++++- App_Code/ClsPaginas.vb | 3 + 8 files changed, 473 insertions(+), 7 deletions(-) create mode 100644 AF/CatTiposServiciosActividades.aspx create mode 100644 AF/CatTiposServiciosActividades.aspx.cs create mode 100644 AF/CatTiposServiciosMateriales.aspx create mode 100644 AF/CatTiposServiciosMateriales.aspx.cs diff --git a/AF/CatTiposServicios.aspx b/AF/CatTiposServicios.aspx index 97e152aa5..f5cabf7c6 100644 --- a/AF/CatTiposServicios.aspx +++ b/AF/CatTiposServicios.aspx @@ -44,7 +44,7 @@
    diff --git a/AF/CatTiposServicios.aspx.cs b/AF/CatTiposServicios.aspx.cs index 57398cc36..c553b8dd1 100644 --- a/AF/CatTiposServicios.aspx.cs +++ b/AF/CatTiposServicios.aspx.cs @@ -24,7 +24,10 @@ public partial class AF_CatTiposServicios : ClsPaginas protected void Page_Load(object sender, EventArgs e) { - + if (!IsPostBack) + { + CargaDatos(); + } } private void CargaDatos() @@ -35,6 +38,12 @@ public partial class AF_CatTiposServicios : ClsPaginas GvDatos.DataSource = ObjAF.DtResultados; GvDatos.DataBind(); } + + if (ObjAF.GetTiposMantenimiento(-1)) + { + DdlTipoMantenimiento.DataSource = ObjAF.DtResultados; + DdlTipoMantenimiento.DataBind(); + } ObjAF.Dispose(); } @@ -97,5 +106,6 @@ public partial class AF_CatTiposServicios : ClsPaginas } } 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/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 3b6189bef..07ef8202a 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -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/ClsPaginas.vb b/App_Code/ClsPaginas.vb index bf5a7dea3..628bf554b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3952,6 +3952,9 @@ 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) #End Region 'AIMMGM #Region "AIMMGM" From 9aa90bc8c49eb06a2a1e92c70a321fded8c69041 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 18 Aug 2020 12:39:39 -0700 Subject: [PATCH 3/7] --- Inventarios/RepMaximoMinimo.aspx | 9 +- Inventarios/RepMaximoMinimo.aspx.vb | 41 ++-- RH/Personal.aspx | 8 +- RH/Personal.aspx.vb | 336 ++++++++++++++-------------- vwd.webinfo | 2 + 5 files changed, 207 insertions(+), 189 deletions(-) diff --git a/Inventarios/RepMaximoMinimo.aspx b/Inventarios/RepMaximoMinimo.aspx index 902ef3ed4..3be94d878 100644 --- a/Inventarios/RepMaximoMinimo.aspx +++ b/Inventarios/RepMaximoMinimo.aspx @@ -277,9 +277,12 @@
    - - - + + + + <%----%> + <%----%>
    diff --git a/Inventarios/RepMaximoMinimo.aspx.vb b/Inventarios/RepMaximoMinimo.aspx.vb index 342203af5..42c28439d 100644 --- a/Inventarios/RepMaximoMinimo.aspx.vb +++ b/Inventarios/RepMaximoMinimo.aspx.vb @@ -64,9 +64,9 @@ Partial Class Inventarios_RepMaximoMinimo DdlAlmacenModal.DataBind() DdlAlmacenModal.Items.Insert(0, New ListItem("Seleccione Almacén", "-1")) - DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - DdlPSModal.DataBind() - DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1")) + 'DdlPSModal.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) + 'DdlPSModal.DataBind() + 'DdlPSModal.Items.Insert(0, New ListItem("Seleccione", "-1")) UpModalMaximoMinimo.Update() @@ -195,7 +195,8 @@ Partial Class Inventarios_RepMaximoMinimo Private Sub LnkDefinir_Click(sender As Object, e As EventArgs) Handles LnkDefinir.Click HFDefinir.Value = "I" DdlAlmacenModal.SelectedIndex = 0 - DdlPSModal.SelectedIndex = 0 + DdlPSModal.SelectedValue = "-1" + DdlPSModal.SelectedText = "Seleccione" TxtMaximo.Text = "" TxtMinimo.Text = "" DdlAlmacenModal.Enabled = True @@ -206,20 +207,26 @@ Partial Class Inventarios_RepMaximoMinimo End Sub Private Sub LbAgregarMaximoMinimo_Click(sender As Object, e As EventArgs) Handles LbAgregarMaximoMinimo.Click - Dim ObjInventario As New ClsInventarios - If HFDefinir.Value = "I" Then - If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then - Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion) - End If - ElseIf HFDefinir.Value = "U" Then - If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then - Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion) - End If - End If + If DdlPSModal.SelectedValue.ToEntero > 0 Then - CargaGrid() - RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo")) - ObjInventario.Dispose() + Using ObjInventario As New ClsInventarios + + If HFDefinir.Value = "I" Then + If ObjInventario.AddAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then + Alert("El Máximo/Mínimo se agregó correctamente.", TipoMensaje.MsgInformacion) + End If + ElseIf HFDefinir.Value = "U" Then + If ObjInventario.UpdateAlmacenMaximoMinimo(DdlAlmacenModal.SelectedValue.ToEntero, DdlPSModal.SelectedValue.ToEntero, TxtMaximo.Text.ToDouble, TxtMinimo.Text.ToDouble, UsuarioActual.CveUsuario) Then + Alert("El Máximo/Mínimo se actualizó correctamente.", TipoMensaje.MsgInformacion) + End If + End If + End Using + + CargaGrid() + RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo")) + Else + Alert("Seleccione un producto o servicio", TipoMensaje.ToastAdventencia) + End If End Sub Protected Sub UpdateMaximoMinimo(sender As Object, e As EventArgs) diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 4b33c301e..4d16cf36d 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -1284,11 +1284,15 @@
    +
    + + +
    - +
    @@ -1311,6 +1315,7 @@
    +
    @@ -1340,6 +1345,7 @@ +
    diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 91d9e28d8..59bbbebb0 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -12,8 +12,8 @@ Imports System.Xml Imports System.Web.Script.Services Partial Class RH_Personal - Inherits ClsPaginas - + Inherits ClsPaginas + #Region "P R O P I E D A D E S" Private Property DTCuentasBancos As DataTable Get @@ -331,14 +331,14 @@ Partial Class RH_Personal Set(value As Integer) ViewState("CveMovimientoDetalleUniforme") = value End Set - End Property - - - + End Property + + + #End Region - + #Region "V A C A C I O N E S - P E R M I S O S" - + Private Property VacInicioPeriodo As Date Get If ViewState("VacInicioPeriodo") Is Nothing Then @@ -538,13 +538,13 @@ Partial Class RH_Personal Set(value As Integer) ViewState("CvePermiso") = value End Set - End Property - + End Property + #End Region - - + + #Region "PROPIEDADES FAMILIARES" - + Private Property ActualizarFamiliar As Boolean Get If ViewState("ActualizarFamiliar") Is Nothing Then @@ -782,7 +782,7 @@ Partial Class RH_Personal pnlSalarioIMSS.Visible = False End If ' - + PnlSalarios.Visible = UsuarioActual.Empresa.Funcionalidad(701) = "1" ViewState("Orden") = "" ViewState("Orden1") = "" @@ -970,10 +970,10 @@ Partial Class RH_Personal Private Sub SetPermisos() 'Permisos - End Sub - + End Sub + #Region "Carga Combos" - + Private Sub CargaEscolaridad() DdlEscolaridad.DataSource = GlobalDTEscolaridad DdlEscolaridad.DataBind() @@ -1204,16 +1204,16 @@ Partial Class RH_Personal Nom.Dispose() GvNominas.DataBind() - End Sub - - - - + End Sub + + + + #End Region - + #Region "Asistencias" - - + + Protected Sub LnkEliminarAsistencia_Click(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) Dim ObjRH As New ClsRH @@ -1321,7 +1321,7 @@ Partial Class RH_Personal ObjPersonal.Dispose() BtnConsultarAsistencia_Click(sender, e) - End Sub + End Sub #End Region Private Sub CargaConsignacion() @@ -1340,8 +1340,8 @@ Partial Class RH_Personal ChkEstemporal.Checked = ObjPersonal.DtResultados.Rows(0)("esTemporal").ToString() = "1" CHKRFCValidado.Checked = ObjPersonal.DtResultados.Rows(0)("RFCValidado").ToString() = "1" - - 'Carga Datos Personales + TxtMailrecibonomina.Text = ObjPersonal.DtResultados.Rows(0)("MaiReciboNomina").ToString() + 'Carga Datos Personales LtlPersonal.Text = ObjPersonal.NombreCompleto NombreCompleto = ObjPersonal.NombreCompleto 'TxtNombre.Text = ObjPersonal.Nombre @@ -1942,11 +1942,11 @@ Partial Class RH_Personal DdlClienteAsignado.Attributes.Remove("onclick") DdlClienteAsistenciaC.Attributes.Remove("onclick") DdlClienteAsistenciaA.Attributes.Remove("onclick") - End Sub - + End Sub + #Region "Buzón de Calidad" - - + + Private Sub CargaBuzonCalidad() Dim ObjPersonal As New ClsRH @@ -2282,12 +2282,12 @@ Partial Class RH_Personal End If GvBuzonCalidad.DataBind() UpDatos.Update() - End Sub - + End Sub + #End Region - + #Region "Resguardos" - + Protected Sub GvResguardos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvResguardos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -2310,13 +2310,13 @@ Partial Class RH_Personal e.Row.FCLiteral("LtlAF").Text = Liga & e.Row.FCLiteral("LtlAF").Text & "" End If - End Sub - + End Sub + #End Region - + #Region "Nómina" - - + + Private Sub CarcaConceptosNomina() Dim ObjPersonal As New ClsRH If ObjPersonal.GetPersonalConceptos(CvePersonal, UsuarioActual.CveEmpresa) Then @@ -2505,9 +2505,9 @@ Partial Class RH_Personal ObjPersonal.Dispose() End If - End Sub + End Sub #End Region - + Protected Sub DdlTipoAplicacion_SelectedIndexChanged(sender As Object, e As EventArgs) Dim Ddl As DropDownList = DirectCast(sender, DropDownList) @@ -2589,10 +2589,10 @@ Partial Class RH_Personal End If End If - End Sub - + End Sub + #Region "G A S T O S X C O M P R O B A R" - + Protected Sub RBLTipoGastos_SelectedIndexChanged(sender As Object, e As EventArgs) If RBLTipoGastos.SelectedValue = "1" Then @@ -2681,10 +2681,10 @@ Partial Class RH_Personal End If - End Sub - + End Sub + #End Region - + #Region "E V E N T O - B I T A C O R A" Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -2760,9 +2760,9 @@ Partial Class RH_Personal HttpContext.Current.Response.End() Archivo = Nothing - End Sub + End Sub #End Region - + Protected Sub GvGxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvGxC.RowDataBound, GvGxCHistorial.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowIndex = 1 Then @@ -2815,7 +2815,7 @@ Partial Class RH_Personal - End Sub + End Sub #Region "TAB BANCOS" Private Sub CargaMonedas() DdlMoneda.DataSource = GlobalDTMonedas @@ -2963,8 +2963,8 @@ Partial Class RH_Personal ObjCuentasBancos.Dispose() CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) - End Sub - + End Sub + #Region "GRIDVIEW - CUENTAS BANCARIAS" Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then @@ -3117,11 +3117,11 @@ Partial Class RH_Personal CargaGridCuentasBancos(ViewState("OrdenCuentasBancos").ToString()) ObjCuentasBancos.Dispose() CargaGvBitacora() - End Sub + End Sub #End Region #End Region - - + + #Region "O R D E N A M I E N T O" Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs) Dim Orden As String = "" @@ -3157,10 +3157,10 @@ Partial Class RH_Personal ViewState("Orden1") = Orden CargaGvAsistencias() End If - End Sub + End Sub #End Region - - + + #Region "I M P R I M I R N O M I N A" Protected Sub LbPDF_Click(sender As Object, e As EventArgs) @@ -3168,11 +3168,11 @@ Partial Class RH_Personal ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "Recibo") - End Sub - + End Sub + #End Region - - + + #Region " ORGANIGRAMA " Private Sub CargaSuperioresOrganigrama() Dim ObjRH As New ClsRH @@ -3193,10 +3193,10 @@ Partial Class RH_Personal - End Sub + End Sub #End Region - - + + #Region "I M P R I M I R " Private Sub GenerarPDF(Optional Formato As String = "PDF") @@ -3498,12 +3498,12 @@ Partial Class RH_Personal End Sub Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) GenerarPDFGastosXComp("Excel") - End Sub - + End Sub + #End Region - + #Region "D O C U M E N T A C I O N C O N T R A T O S" - + Private Sub CargaDocumentacionFirmaDecontratos() If CvePersonal > 0 Then @@ -4220,10 +4220,10 @@ Partial Class RH_Personal RegistraScript("Download('" & baseUrl & "')") - End Sub - + End Sub + #End Region - + Protected Sub LBCancelar_Click(sender As Object, e As EventArgs) Dim FolioFiscal = CType(sender, LinkButton).CommandArgument.ToString() @@ -4244,10 +4244,10 @@ Partial Class RH_Personal Obj = Nothing - End Sub - + End Sub + #Region "VACACIONES" - + Private Sub CargaVacaciones() Dim objRH As New ClsRH @@ -4941,12 +4941,12 @@ Partial Class RH_Personal objRH.Dispose() Return ListaTags - End Function - + End Function + #End Region - + #Region "CURSOS" - + Private Sub CargaCursos() Dim objRH As New ClsRH @@ -5044,11 +5044,11 @@ Partial Class RH_Personal - End Sub - - + End Sub + + #End Region - + #Region "UNIFORMES" Private Sub CargaComboUniformes() @@ -5184,12 +5184,12 @@ Partial Class RH_Personal ObjInventario.RollBack() End If ObjInventario.Dispose() - End Sub - - - + End Sub + + + #End Region - + #Region "CARGAR IMAGEN" Private Sub LnkSubirFacturas_Click(sender As Object, e As EventArgs) Handles LnkSubirFacturas.Click RegistraScript(String.Format("$('#{0}').modal();", "ModalArchivo")) @@ -5231,10 +5231,10 @@ Partial Class RH_Personal TxtCargaImg.Text = "[]" UpAddArchivo.Update() RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo")) - End Sub - + End Sub + #Region "PERMISOS" - + Public Sub CargaPermisos() Dim ObjRH As New ClsRH @@ -5360,57 +5360,57 @@ Partial Class RH_Personal ObjRH.Dispose() CargaPermisos() - End Sub - - - + End Sub + + + #End Region - - - + + + #End Region - - - 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click - ' Preguntar si existe en temporales - ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then - ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) - ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") - ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then - ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) - ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) - ' Else - ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) - ' End If - - ' Else - ' Imagen Default - ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then - ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg" - ' End If - ' End If - - - ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = "" - ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = "" - - - - - ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then - ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString()) - ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") - ' Session("FileUpload") = "" - - ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then - ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension - - ' End If - ' End If - 'End Sub - + + + 'Protected Sub BtnCargarArchivo_Click(sender As Object, e As System.EventArgs) Handles BtnCargarArchivo.Click + ' Preguntar si existe en temporales + ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) Then + ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString()) + ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") + ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then + ' File.Delete(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) + ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) + ' Else + ' File.Move(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\Temp\" & Session("FileUpload").ToString(), ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) + ' End If + + ' Else + ' Imagen Default + ' If ImgPersonal.ImageUrl = "../Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" Then + ' ImgPersonal.ImageUrl = "/Imagenes/SinImagen.jpg" + ' End If + ' End If + + + ' Si existe mover de temporales a .../Empresas/RH/Personal, SINO Session("FileUpload") = "" + ' Si existe en: .../Empresas/RH/Personal Guardar, SINO Session("FileUpload") = "" + + + + + ' If Session("FileUpload").ToString() <> String.Empty AndAlso File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\" & Session("FileUpload").ToString()) Then + ' Dim Extension As String = Path.GetExtension(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal" & Session("FileUpload").ToString()) + ' If Not Directory.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") Then Directory.CreateDirectory(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal") + ' Session("FileUpload") = "" + + ' If File.Exists(ModExtensiones.DirectorioBaseEmpresas + "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & CvePersonal & Extension) Then + ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & CvePersonal & Extension + + ' End If + ' End If + 'End Sub + #Region "Consumos" - + Private Sub Consumos() Dim ObjCompras As New ClsCompras @@ -5489,10 +5489,10 @@ Partial Class RH_Personal End Sub Protected Sub LnkImprimirPDFConsumo_Click(sender As Object, e As EventArgs) GenerarPDFConsumo() - End Sub - + End Sub + #End Region - + #Region "" Protected Sub LbMail_Click(sender As Object, e As EventArgs) @@ -5576,9 +5576,9 @@ Partial Class RH_Personal End If - End Sub + End Sub #End Region - + #Region "VIATICOS" Protected Sub CargaViaticosPersonal() Dim ObjBancos As ClsBancos = New ClsBancos @@ -5613,11 +5613,11 @@ Partial Class RH_Personal If (e.Row.RowType = DataControlRowType.Footer) Then e.Row.FCLiteral("LtTotalImporte").Text = DTViaticosDetalle.SUM("Importe").FormatoNumero() End If - End Sub + End Sub #End Region - + #Region "BITACORA" - + Private Sub CargaGvBitacora() If CvePersonal > 0 Then @@ -5630,12 +5630,12 @@ Partial Class RH_Personal UpHistorialModificacion.Update() End If - End Sub - + End Sub + #End Region - + #Region "PAGO DE FACTURAS" - + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) CargaPagoFactura() UpnHistorial.Update() @@ -5648,10 +5648,10 @@ Partial Class RH_Personal End If ObjRH.Dispose() GVPagoFactura.DataBind() - End Sub - + End Sub + #End Region - + Protected Sub BtnSaldoInicial_Click(sender As Object, e As EventArgs) Dim SaldoInicial As Double = TxtSaldoInicial.Text.ToDouble() Dim Fecha As DateTime = TxtFechaSaldo.Text.ToDateTime() @@ -5667,8 +5667,8 @@ Partial Class RH_Personal End Sub Private Function AgregarSaldoInicial(SaldoInicial As Double, Fecha As DateTime, CveMoneda As Integer, ObjMov As ClsContabilidad) As Integer Return ObjMov.AddPrePolizas("RH/Personal", 13, SaldoInicial, SaldoInicial, CveMoneda, Fecha, "Saldo Inicial", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - End Function - + End Function + #Region "L I C E N C I A S" Public Sub CargaLicencias() If CvePersonal > 0 Then @@ -5815,7 +5815,7 @@ Partial Class RH_Personal End If RegistraScript("$('#DivAddLicencias').modal('hide');") - End Sub + End Sub #End Region Protected Sub BtnPDFResguardo_Click(sender As Object, e As EventArgs) GenerarPDFResguardosAF() @@ -5892,12 +5892,12 @@ Partial Class RH_Personal Alert("No se encontraron registros .", TipoMensaje.MsgAdvertencia) End If - End Sub - - + End Sub + + #Region "FAMILIARES" - - + + Private Sub CargaFamiliares() If CvePersonal <> -1 Then @@ -6148,11 +6148,11 @@ Partial Class RH_Personal 'objRH.Dispose() - End Sub - + End Sub + #End Region - - + + Protected Sub DdlTipoAsistencias_SelectedIndexChanged(sender As Object, e As EventArgs) Dim ddl As DropDownList = DirectCast(sender, DropDownList) Dim gvrow As GridViewRow = DirectCast(ddl.NamingContainer, GridViewRow) diff --git a/vwd.webinfo b/vwd.webinfo index 71cfc47e0..2fd2ac3b0 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -88,6 +88,8 @@ + + From bd755f704827c43b9a547e5a83f8156bc02e3379 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 18 Aug 2020 13:18:34 -0700 Subject: [PATCH 4/7] --- Inventarios/RepMaximoMinimo.aspx.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Inventarios/RepMaximoMinimo.aspx.vb b/Inventarios/RepMaximoMinimo.aspx.vb index ebf3dd038..4b08f2b3a 100644 --- a/Inventarios/RepMaximoMinimo.aspx.vb +++ b/Inventarios/RepMaximoMinimo.aspx.vb @@ -225,7 +225,7 @@ Partial Class Inventarios_RepMaximoMinimo CargaGrid() RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalMaximoMinimo")) Else - Alert("Seleccione un producto o servicio", TipoMensaje.ToastAdventencia) + Alert("Seleccione un producto o servicio", TipoMensaje.MsgAdvertencia) End If End Sub @@ -234,13 +234,15 @@ Partial Class Inventarios_RepMaximoMinimo HFDefinir.Value = "U" Dim CveAlmacen As Integer = GvRow.DataKey("CveAlmacen").ToString.ToEntero Dim CvePS As Integer = GvRow.DataKey("CvePS").ToString.ToEntero + Dim strPS As String = GvRow.DataKey("PS").ToString() Dim Maximo As String = GvRow.DataKey("Maximo").ToString Dim Minimo As String = GvRow.DataKey("Minimo").ToString DdlAlmacenModal.Enabled = False DdlPSModal.Enabled = False - DdlAlmacenModal.SelectedValue = CveAlmacen.ToString + DdlAlmacenModal.SelectedValue = CveAlmacen.ToString() + DdlPSModal.SelectedText = strPS DdlPSModal.SelectedValue = CvePS.ToString TxtMaximo.Text = Maximo TxtMinimo.Text = Minimo From 7d729bcdacb2954554ff75f3c69bfc81471f6e64 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 18 Aug 2020 17:19:55 -0700 Subject: [PATCH 5/7] - --- Inventarios/InventarioFisico.aspx | 4 ++-- Inventarios/InventarioFisico.aspx.vb | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Inventarios/InventarioFisico.aspx b/Inventarios/InventarioFisico.aspx index aed516fe4..441bbb7c4 100644 --- a/Inventarios/InventarioFisico.aspx +++ b/Inventarios/InventarioFisico.aspx @@ -28,7 +28,7 @@
    -
    SubProyecto:
    +
    SubProyecto:
    @@ -148,7 +148,7 @@
    - + SubProyecto:
    diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb index 8e9f7a024..3f8632f2d 100644 --- a/Inventarios/InventarioFisico.aspx.vb +++ b/Inventarios/InventarioFisico.aspx.vb @@ -88,6 +88,7 @@ Partial Class Inventarios_InventarioFisico Inventario.Dispose() gvIF.DataSource = dt gvIF.EditIndex = -1 + gvIF.Columns(1).HeaderText = LblSubProyecto.Text gvIF.DataBind() gvIF.Columns(6).Visible = UsuarioActual.TienePermisoProceso(178) End Sub @@ -125,11 +126,8 @@ Partial Class Inventarios_InventarioFisico UPPPSExcluye.Update() End Sub Private Sub CargaDdlSubProyectos() - DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() - DdlFiltroSubProyecto.Items.Insert(0, New ListItem("Todas", "-1")) - DdlFiltroSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) - DdlFiltroSubProyecto.DataBind() + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + CargarCentrosDeCosto(Nothing, DdlFiltroSubProyecto, Nothing, LblFiltroSubProyecto) End Sub Private Sub CargaDdlClasificacion() DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) @@ -552,6 +550,7 @@ Partial Class Inventarios_InventarioFisico If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue) Then gvIF.DataSource = ObjInventario.DtResultados gvIF.DataBind() + gvIF.Columns(1).HeaderText = LblSubProyecto.Text End If UppInventarioFisico.Update() ObjInventario.Dispose() From 7fa9f2da5d0443d957c0aa65a0f085732bd97483 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 18 Aug 2020 17:23:59 -0700 Subject: [PATCH 6/7] Registro revision AF --- AF/OrdenServicio.aspx | 384 +++++++++++++++++++++++ AF/OrdenServicio.aspx.vb | 437 +++++++++++++++++++++++++++ AF/RegistroRevision.aspx | 15 + AF/RegistroRevision.aspx.vb | 4 +- Edoc/Contratos.aspx | 2 +- PortalProveedor/PortalProveedor.aspx | 2 +- Ventas/CatClasificaciones2.aspx.vb | 24 +- Ventas/ProductosServicios.aspx.vb | 6 +- 8 files changed, 859 insertions(+), 15 deletions(-) create mode 100644 AF/OrdenServicio.aspx create mode 100644 AF/OrdenServicio.aspx.vb diff --git a/AF/OrdenServicio.aspx b/AF/OrdenServicio.aspx new file mode 100644 index 000000000..36780ba5a --- /dev/null +++ b/AF/OrdenServicio.aspx @@ -0,0 +1,384 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenServicio.aspx.vb" Inherits="AF_OrdenServicio" EnableEventValidation = "false" %> + + + + + + + + + + + + + + Registro Revisión + + + + + + + + + +
    +
    +
    +
    + + +
    +
    +
    + <%--
    +
    +
    + + +
    + +
    + + + + +
    + + + + +
    + +
    + + + + +
    + + + + + +
    + + + + +
    + + +
    + +
    + + + +<%--
    +
    +
    + + + + + + +
    +
    + +
    + + +
    +
    + +
    +
    Fecha:
    +
    + + + + +
    +
    + + +
    +
    + +
    --%> + +
    +
    + + + + + + + + + <%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    +
    + + +
    + + + + + + diff --git a/AF/OrdenServicio.aspx.vb b/AF/OrdenServicio.aspx.vb new file mode 100644 index 000000000..f95760d7e --- /dev/null +++ b/AF/OrdenServicio.aspx.vb @@ -0,0 +1,437 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports System.IO +Imports Extensiones +Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms + +Partial Class AF_OrdenServicio + 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 + + + Property ReporteBytes As Byte() + Get + If ViewState("ReporteBytes") Is Nothing Then + Return Nothing + Else + Return DirectCast(ViewState("ReporteBytes"), Byte()) + End If + End Get + Set(value As Byte()) + ViewState("ReporteBytes") = 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() + + + TxtFecha.Text = $"{Now.Day.ToString("00")}/{Now.Month.ToString("00")}/{Now.Year}" + + End If + End Sub + + +#Region " CARGA PARAMETROS " + +#End Region + +#Region " CARGA COMBOS " + Protected Sub CargaCombos() + CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto) + LblSubProyecto2.Text = LblSubProyecto.Text + + + + + + 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.GetMetricasRegistro(DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtFecha.Text.ToDate) Then + DT_Cabeceras = ObjAF.DSResultados.Tables(0) + DT_Datos = ObjAF.DSResultados.Tables(1) + + + If DT_Cabeceras.Rows.Count > 0 AndAlso DT_Datos.Rows.Count > 0 Then + BtnGuardar.Visible = True + Else + BtnGuardar.Visible = False + GvDatos.DataSource = Nothing + GvDatos.DataBind() + End If + + Else + GvDatos.DataSource = Nothing + GvDatos.DataBind() + BtnGuardar.Visible = False + End If + + ObjAF.Dispose() + + If DT_Datos.Rows.Count > 0 Then + CargaTablas() + End If + + UpGuardar.Update() + UpDatos.Update() + + End Sub + + Private Sub CargaTablas() + + Dim IDX_LIMPIAR As Integer = 1 + + For IDX_LIMPIAR = 1 To 15 + GvDatos.Columns(IDX_LIMPIAR).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 + GvDatos.Columns(x + 1).HeaderText = DT_Cabeceras.Rows(x)("Metrica").ToString + GvDatos.Columns(x + 1).Visible = True + Next x + + + GvDatos.DataSource = DT_Datos + GvDatos.DataBind() + + + + + 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 + + e.Row.FCDropDownList("DdlPersonal").DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1") + e.Row.FCDropDownList("DdlPersonal").DataBind() + e.Row.FCDropDownList("DdlPersonal").Items.Insert(0, New ListItem("Selecione uno", "-1")) + + e.Row.FCDropDownList("DdlPersonal").SelectedValueExist(e.Row.DataKey("CvePersonaResponsable")) + + End If + + End Sub + +#End Region + + Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs) + + End Sub + + Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) + + If DdlSubProyecto.SelectedValue.ToEntero > 0 Then + CargaDatos() + + Else + GvDatos.DataSource = Nothing + GvDatos.DataBind() + + UpDatos.Update() + + End If + + End Sub + Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) + + + Dim ObjAF As New ClsAF + Dim limite As Integer = DT_Cabeceras.Rows.Count - 1 + + ObjAF.IniciaTransacSQL() + + Dim ErrorProceso As Boolean = False + + For Each GvRow As GridViewRow In GvDatos.Rows + If GvRow.RowType = DataControlRowType.DataRow Then + + Dim DdlPersonal As DropDownList = GvRow.FCDropDownList("DdlPersonal") + + If DdlPersonal.SelectedValue.ToEntero <= 0 Then + Alert($"unidad: {GvRow.DataKey("Unidad")} require personal", TipoMensaje.MsgAdvertencia) + + ErrorProceso = True + Exit For + End If + + If ObjAF.AddMetricasValores(GvRow.DataKey("CveActivoFijo").ToEntero, DdlPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then + + Dim CveMetricaValor As Integer = ObjAF.CveMetricaValor + Dim x As Integer = 0 + + For x = 0 To limite + Dim valor As Decimal = GvRow.FCTextBox($"TxtMetrica{x + 1}").Text.ToDecimal + + ' valor = If(valor.Trim.Length = 0, "0", valor) + If ObjAF.AddMetricasValoresDetalle(CveMetricaValor, DT_Cabeceras(x)("CveMetrica").ToString.ToEntero, valor) Then + ErrorProceso = False + Else + ErrorProceso = True + Exit For + End If + Next x + + If ErrorProceso Then + Exit For + End If + + Else + ErrorProceso = True + Exit For + End If + End If + + Next + + + If Not ErrorProceso Then + + ObjAF.Commit() + ExportToExcelG(GvDatos, $"RegistroRevision{Now.ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}") + RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });") + GvDatos.DataSource = Nothing + GvDatos.DataBind() + + BtnGuardar.Visible = False + + UpDatos.Update() + UpGuardar.Update() + + Else + ObjAF.RollBack() + End If + + ObjAF.Dispose() + + 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/Edoc/Contratos.aspx b/Edoc/Contratos.aspx index b49544a0c..bc9e9b3c4 100644 --- a/Edoc/Contratos.aspx +++ b/Edoc/Contratos.aspx @@ -121,7 +121,7 @@
    - + diff --git a/PortalProveedor/PortalProveedor.aspx b/PortalProveedor/PortalProveedor.aspx index 9f78f83f6..e6ef26273 100644 --- a/PortalProveedor/PortalProveedor.aspx +++ b/PortalProveedor/PortalProveedor.aspx @@ -799,7 +799,7 @@ <%---2020/02/06 - Auditoria--%> - + diff --git a/Ventas/CatClasificaciones2.aspx.vb b/Ventas/CatClasificaciones2.aspx.vb index 673fee982..26c86f3ae 100644 --- a/Ventas/CatClasificaciones2.aspx.vb +++ b/Ventas/CatClasificaciones2.aspx.vb @@ -72,9 +72,12 @@ Partial Class Ventas_CatClasificaciones2 Public Sub CargaDatosS() Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.GetClasificaciones(-1, 4) Then - GlobalDTClasificaciones2 = ObjClasificaciones.DtResultados + + If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa, 4) Then + + GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) ViewState("DTClasificacion2") = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) + Else GvDatosS.DataSource = Nothing End If @@ -185,17 +188,19 @@ Partial Class Ventas_CatClasificaciones2 Dim ObjClasificaciones As New ClsClasificaciones If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "", -1, "", -1, "", -1, "", - DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then - 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text, - 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text, - 'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text, + DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then + + 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text, + 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text, + 'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text, TxtClasificacionS.Text = "" Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion) UpTitulosS.Update() If ObjClasificaciones.GetClasificaciones(-1, 4) Then + GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = Nothing ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - GlobalDTClasificaciones2 = ObjClasificaciones.DtResultados + GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) End If 'DdlCuentaGastoS.SelectedValue = "-1" @@ -283,12 +288,13 @@ Partial Class Ventas_CatClasificaciones2 End If End Sub Protected Sub GvDatosS_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatosS.RowDeleting - Dim ObjClasificaciones As New ClsClasificaciones + Dim ObjClasificaciones As New ClsClasificaciones + If ObjClasificaciones.RemoveClasificacion(GvDatosS.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then GvDatosS.EditIndex = -1 If ObjClasificaciones.GetClasificaciones(-1, 4) Then ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - GlobalDTClasificaciones2 = ObjClasificaciones.DtResultados + GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) End If Alert("La Clasificacion se eliminó correctamente.", TipoMensaje.MsgInformacion) End If diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index e88ebc310..8bbe6813d 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -111,7 +111,7 @@ Partial Class ProductosyServicios Private ReadOnly Property PermiteClasificacion2 As Boolean Get - Return (UsuarioActual.CveEmpresa.Contiene(72, 80)) + Return (UsuarioActual.CveEmpresa.Contiene(1, 72, 80)) End Get End Property @@ -1164,7 +1164,7 @@ Partial Class ProductosyServicios End If Dim CveMarca As Integer = 0 - If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then CveMarca = DdlMarcaPSDes.SelectedValue.ToEntero Else CveMarca = DdlMarca.SelectedValue.ToEntero If CvePS = -1 Then Dim PSS As String = TxtPS.Text.Trim.Replace("|", "") @@ -1656,11 +1656,13 @@ Partial Class ProductosyServicios Protected Sub CargarMarcas() If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then + If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) And CvePS = -1 Then DivMarcaPSDes.Visible = True Else DivMarca.Visible = True End If + Dim ObjMarcas As New ClsProductosServicios ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) DdlMarca.DataSource = ObjMarcas.DtResultados From ced72df011bf96eddf80f15ec08c6a9be70c56c0 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Tue, 18 Aug 2020 17:26:58 -0700 Subject: [PATCH 7/7] =?UTF-8?q?correcci=C3=B3n=20AF=20registro=20Metricas?= =?UTF-8?q?=20Valores=20Detalle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsAF.vb | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 07ef8202a..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