-- columna nueva de fechainiciovigencia

This commit is contained in:
2023-03-07 19:08:47 -07:00
parent e2635a1901
commit 44f61bec75
3 changed files with 47 additions and 23 deletions

View File

@@ -90,10 +90,7 @@
<div class="col-md-1 truncate" style="text-align: right!important">Tipo Uso</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoUso" DataTextField="TipoUso" DataValueField="CveTipoUso" CssClass="form-control input-sm select2me" runat="server" Width="200px"></asp:DropDownList>
</div>
</div>
</div>
</div>
@@ -116,8 +113,8 @@
<ContentTemplate>
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveGarantiaMes,Marca,CveMarca,TipoUso,CveTipoUso,Mes,Valor,Usuario,CveUsuario,FechaIng"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
DataKeyNames="CveGarantiaMes,Marca,CveMarca,TipoUso,CveTipoUso,Mes,Valor,Usuario,CveUsuario,FechaInicioVigencia,FechaIng"
EmptyDataText="No se encontraron registros"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true"
data-freezerows="1"
@@ -129,31 +126,36 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Uso" ItemStyle-Width="150px">
<asp:TemplateField HeaderText="Tipo Uso" >
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlTiposUso" runat="server" Text='<%# Eval("TipoUso")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Mes" ItemStyle-Width="150px">
<asp:TemplateField HeaderText="Mes" ItemStyle-Width="100px">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor" ItemStyle-Width="150px">
<asp:TemplateField HeaderText="Valor" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlValor" runat="server" Text='<%# Eval("Valor", "{0:N2}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Inicio Vigencia" ItemStyle-Width="120px">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlIVigencia" runat="server" Text='<%# Eval("FechaInicioVigencia", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="150px">
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px">
<ItemTemplate>
&nbsp;<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario">
<asp:TemplateField HeaderText="Usuario">
<ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
@@ -215,6 +217,24 @@
<label for="<%= TxtValor.ClientID.ToString()%>">Valor:</label>
<i></i>
</div>
<div class="col-md-2 truncate">
Fecha Inicio:
</div>
<div class="col-md-1" style="min-width: 125px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:CheckBox ID="ChkSeguir" runat="server" Checked="true" />
<label for="<%= ChkSeguir.ClientID.ToString()%>">Seguir Registrando:</label>

View File

@@ -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)

View File

@@ -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