From 44f61bec756491f83c41b3791572cf56558e7963 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 7 Mar 2023 19:08:47 -0700 Subject: [PATCH] -- columna nueva de fechainiciovigencia --- Acumuladores/CatGarantiasMeses.aspx | 42 +++++++++++++++++++------- Acumuladores/CatGarantiasMeses.aspx.vb | 5 +-- App_Code/ClsAcumuladores.vb | 23 ++++++++------ 3 files changed, 47 insertions(+), 23 deletions(-) diff --git a/Acumuladores/CatGarantiasMeses.aspx b/Acumuladores/CatGarantiasMeses.aspx index d9cca1c6c..c9b99fdbb 100644 --- a/Acumuladores/CatGarantiasMeses.aspx +++ b/Acumuladores/CatGarantiasMeses.aspx @@ -90,10 +90,7 @@
Tipo Uso
-
- - - + @@ -116,8 +113,8 @@ - +   - +   - +   + + +   + + - +   - + @@ -215,6 +217,24 @@ +
+ Fecha Inicio: + +
+
+
+ + + + +
+ + + + + + +
diff --git a/Acumuladores/CatGarantiasMeses.aspx.vb b/Acumuladores/CatGarantiasMeses.aspx.vb index 1faba2cbf..441ffec50 100644 --- a/Acumuladores/CatGarantiasMeses.aspx.vb +++ b/Acumuladores/CatGarantiasMeses.aspx.vb @@ -126,7 +126,7 @@ Partial Class Acumuladores_CatFoliosGarantia Dim ObjAcum As New ClsAcumuladores If Not Actualizar Then - If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjAcum.GarantiasMesesAdd(DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, txtFechaI.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TxtMes.Text = TxtMes.Text.ToEntero + 1 TxtValor.Text = "" @@ -147,7 +147,7 @@ Partial Class Acumuladores_CatFoliosGarantia Alert("Ocurrió un error al guardar la Garantía de Mes", TipoMensaje.MsgError) End If Else - If ObjAcum.GarantiasMesesUpdate(CveGarantiaMes, DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, UsuarioActual.CveUsuario) Then + If ObjAcum.GarantiasMesesUpdate(CveGarantiaMes, DdlMarcaM.SelectedValue.ToEntero, DdlTipoUsoM.SelectedValue.ToEntero, TxtMes.Text.ToEntero, TxtValor.Text.ToDecimal, txtFechaI.Text.ToDate, UsuarioActual.CveUsuario) Then TxtMes.Text = "" TxtValor.Text = "" @@ -211,6 +211,7 @@ Partial Class Acumuladores_CatFoliosGarantia TxtMes.Text = GvRow.DataKey("Mes") TxtValor.Text = GvRow.DataKey("Valor") + txtFechaI.Text = GvRow.DataKey("FechaInicioVigencia") CargaCombosModal() DdlMarcaM.SelectedValueExist(GvRow.DataKey("CveMarca").ToEntero) DdlTipoUsoM.SelectedValueExist(GvRow.DataKey("CveTipoUso").ToEntero) diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index e9aa5a929..54581d959 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -608,14 +608,14 @@ Public Class ClsAcumuladores End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region " GARANTÍAS MESES " - - Public Function GarantiasMesesGet(CveGarantiaMes As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveTipoUso As Integer = -1, Optional Mes As Integer = -1) As Boolean + + Public Function GarantiasMesesGet(CveGarantiaMes As Integer, CveEmpresa As Integer, Optional CveMarca As Integer = -1, Optional CveTipoUso As Integer = -1, Optional Mes As Integer = -1, Optional FechaInicioVigencia As Date = MinFecha) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -625,7 +625,8 @@ Public Class ClsAcumuladores .Add("@CveGarantiaMes", SqlDbType.Int).Value = CveGarantiaMes .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveMarca", SqlDbType.Int).Value = CveMarca - .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso + .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso + .Add("@FechaInicioVigencia", SqlDbType.Date).Value = FechaInicioVigencia .Add("@Mes", SqlDbType.Int).Value = Mes End With @@ -641,7 +642,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function GarantiasMesesAdd(CveMarca As Integer, CveTipoUso As Integer, Mes As Integer, Valor As Double, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function GarantiasMesesAdd(CveMarca As Integer, CveTipoUso As Integer, Mes As Integer, Valor As Double, FechaInicioVigencia As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -653,6 +654,7 @@ Public Class ClsAcumuladores .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso .Add("@Mes", SqlDbType.Int).Value = Mes .Add("@Valor", SqlDbType.SmallMoney).Value = Valor + .Add("@FechaInicioVigencia", SqlDbType.Date).Value = FechaInicioVigencia .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -670,7 +672,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function GarantiasMesesUpdate(CveGarantiaMes As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer, Valor As Double, CveUsuario As Integer) As Boolean + Public Function GarantiasMesesUpdate(CveGarantiaMes As Integer, CveMarca As Integer, CveTipoUso As Integer, Mes As Integer, Valor As Double, FechaInicioVigencia As Date, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -682,7 +684,8 @@ Public Class ClsAcumuladores .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso .Add("@Mes", SqlDbType.Int).Value = Mes - .Add("@Valor", SqlDbType.SmallMoney).Value = Valor + .Add("@Valor", SqlDbType.SmallMoney).Value = Valor + .Add("@FechaInicioVigencia", SqlDbType.Date).Value = FechaInicioVigencia .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario End With