From 437f11587205e7d3a13f30a1979555d3f7751e38 Mon Sep 17 00:00:00 2001 From: Jorge Luis caudillo esparza Date: Fri, 25 Apr 2025 11:46:56 -0700 Subject: [PATCH] movtos permanentes --- App_Code/ClsNominas.vb | 25 +++++++ Nomina/RepMovtosPermanentes.aspx | 110 ++++++++++++++++++++-------- Nomina/RepMovtosPermanentes.aspx.cs | 19 ++++- 3 files changed, 122 insertions(+), 32 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index c5f13c430..64f4f81e8 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -3380,6 +3380,31 @@ Public Class ClsNominas End Function #Region "MovtosPermanentes" + Public Function GetMovtoPermanenteRepFechas(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32, STRFechaInicio As String, STRFechaFin As String) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_GetMovtoPermanenteRepFechas", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@CvePersonal", SqlDbType.Int).Value = cvePersonal + .Add("@CveTipo", SqlDbType.Int).Value = cveTipo + .Add("@CveSaldo", SqlDbType.Int).Value = cveSaldo + .Add("@CveEstatus", SqlDbType.Int).Value = cveEstatus + .Add("@CveConcepto", SqlDbType.Int).Value = cveConcepto + .Add("@STRFechaInicio", SqlDbType.VarChar).Value = STRFechaInicio + .Add("@STRFechaFin", SqlDbType.VarChar).Value = STRFechaFin + End With + Try + SqlAdapter.Fill(Data) + retorno = True + Catch sqEx As SqlException + retorno = False + OnError("Ocurrió un error al obtener los Movtos Permanentes.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al obtener los Movtos Permanentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetMovtoPermanenteRep(cvePersonal As Int32, cveEmpresa As Int32, cveTipo As Int32, cveSaldo As Int32, cveEstatus As Int32, cveConcepto As Int32) As Boolean Dim retorno As Boolean = False DataAdapter("PA_GetMovtoPermanenteRep", CommandType.StoredProcedure) diff --git a/Nomina/RepMovtosPermanentes.aspx b/Nomina/RepMovtosPermanentes.aspx index 32e59cbbb..c7bbd6231 100644 --- a/Nomina/RepMovtosPermanentes.aspx +++ b/Nomina/RepMovtosPermanentes.aspx @@ -4,10 +4,10 @@ + Reporte de Movimientos Permanentes @@ -67,8 +74,8 @@
- -
+ +
@@ -76,16 +83,16 @@
- -
+ +
- -
+ +
@@ -106,7 +113,36 @@
+ + +
+ <%----%> +
+ + + + + + + + +
+
+ +
+ <%----%> +
+ + + + + + + + +
+
@@ -132,27 +168,43 @@ AutoGenerateColumns="False" OnRowDataBound="GVGetMovtoPermanenteRep_RowDataBound" DataKeyNames="CvePersonal,Codigo,NombreCompleto,CveTipo,Tipo,CveMovtoPermanente,CveFonacot,CveConcepto,Concepto,NumeroCredito,FechaInicio,TipoAplicacion,EsAcumulado,Estatus,Valor,VecesAplicar,MontoLimite,Saldo"> + <%-- + + + --%> - + - + + - + + + + + + + + + + + + + + + + +<%-- - - - - - - - + --%> + <%-- @@ -212,7 +264,7 @@ CssClass="btn btn-circle btn-xs green" Text="" OnClick="LnkPagar_Click" /> - + --%> @@ -242,7 +294,7 @@ `; // Insertar la nueva fila antes de la fila con la clase "headerHide" - $headerHideRow.before(newRow); + //$headerHideRow.before(newRow); } // Limpiar el intervalo después de agregar la fila clearInterval(checkInterval); diff --git a/Nomina/RepMovtosPermanentes.aspx.cs b/Nomina/RepMovtosPermanentes.aspx.cs index 8b51859e1..b38be5aa2 100644 --- a/Nomina/RepMovtosPermanentes.aspx.cs +++ b/Nomina/RepMovtosPermanentes.aspx.cs @@ -39,6 +39,16 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas get { return ViewState["RcveConcepto"] != null ? (int)ViewState["RcveConcepto"] : 0; } set { ViewState["RcveConcepto"] = value; } } + private string fechaInicio + { + get { return TxtRpdFechaInicio.Text; } + set { TxtRpdFechaInicio.Text = value; } + } + private string fechaFin + { + get { return TxtRpdFechaFin.Text; } + set { TxtRpdFechaFin.Text = value; } + } #endregion protected void Page_Load(object sender, EventArgs e) { @@ -49,7 +59,8 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas RcveSaldo = Request["cveSaldo"] != null ? Convert.ToInt32(Request["cveSaldo"]) : -1; RcveEstatus = Request["cveEstatus"] != null ? Convert.ToInt32(Request["cveEstatus"]) : -1; RcveConcepto = Request["cveConcepto"] != null ? Convert.ToInt32(Request["cveConcepto"]) : -1; - + fechaInicio = DateTime.Now.ToString("01/MM/yyyy"); + fechaFin=DateTime.Now.ToString("01/MM/yyyy").ToDateTime().AddMonths(1).AddDays(1).ToString("01/MM/yyyy"); CargaCombos(); cargardatos(); @@ -84,7 +95,9 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas { using (ClsNominas ObjGetM = new ClsNominas()) { - ObjGetM.GetMovtoPermanenteRep(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto); + //string fechaInicio = ""; + //string fechaFin = ""; + ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio, fechaFin); GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados; GVGetMovtoPermanenteRep.DataBind(); @@ -121,7 +134,7 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas e.Row.Attributes.Add("data-cvepersonal", cvepersonal); if (cvetipoValue == "0") { - e.Row.Cells[1].Attributes.Add("colspan", "7"); + //e.Row.Cells[1].Attributes.Add("colspan", "7"); cssclass = string.Format("{0} cvetipo0", cssclass); } e.Row.CssClass = cssclass;