-- 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-1 truncate" style="text-align: right!important">Tipo Uso</div>
<div class="col-md-2"> <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> <asp:DropDownList ID="DdlTipoUso" DataTextField="TipoUso" DataValueField="CveTipoUso" CssClass="form-control input-sm select2me" runat="server" Width="200px"></asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
@@ -116,8 +113,8 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False" <asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveGarantiaMes,Marca,CveMarca,TipoUso,CveTipoUso,Mes,Valor,Usuario,CveUsuario,FechaIng" DataKeyNames="CveGarantiaMes,Marca,CveMarca,TipoUso,CveTipoUso,Mes,Valor,Usuario,CveUsuario,FechaInicioVigencia,FechaIng"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas" EmptyDataText="No se encontraron registros"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true" data-sort="true"
data-freezerows="1" data-freezerows="1"
@@ -129,31 +126,36 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Uso" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Tipo Uso" >
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlTiposUso" runat="server" Text='<%# Eval("TipoUso")%>'></asp:Literal> &nbsp;<asp:Literal ID="LtlTiposUso" runat="server" Text='<%# Eval("TipoUso")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Mes" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Mes" ItemStyle-Width="100px">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Literal> &nbsp;<asp:Literal ID="LtlMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Valor" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Valor" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlValor" runat="server" Text='<%# Eval("Valor", "{0:N2}")%>'></asp:Literal> &nbsp;<asp:Literal ID="LtlValor" runat="server" Text='<%# Eval("Valor", "{0:N2}")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </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> <ItemTemplate>
&nbsp;<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal> &nbsp;<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Usuario"> <asp:TemplateField HeaderText="Usuario">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal> <asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
@@ -215,6 +217,24 @@
<label for="<%= TxtValor.ClientID.ToString()%>">Valor:</label> <label for="<%= TxtValor.ClientID.ToString()%>">Valor:</label>
<i></i> <i></i>
</div> </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"> <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:CheckBox ID="ChkSeguir" runat="server" Checked="true" /> <asp:CheckBox ID="ChkSeguir" runat="server" Checked="true" />
<label for="<%= ChkSeguir.ClientID.ToString()%>">Seguir Registrando:</label> <label for="<%= ChkSeguir.ClientID.ToString()%>">Seguir Registrando:</label>

View File

@@ -126,7 +126,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Dim ObjAcum As New ClsAcumuladores Dim ObjAcum As New ClsAcumuladores
If Not Actualizar Then 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 TxtMes.Text = TxtMes.Text.ToEntero + 1
TxtValor.Text = "" TxtValor.Text = ""
@@ -147,7 +147,7 @@ Partial Class Acumuladores_CatFoliosGarantia
Alert("Ocurrió un error al guardar la Garantía de Mes", TipoMensaje.MsgError) Alert("Ocurrió un error al guardar la Garantía de Mes", TipoMensaje.MsgError)
End If End If
Else 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 = "" TxtMes.Text = ""
TxtValor.Text = "" TxtValor.Text = ""
@@ -211,6 +211,7 @@ Partial Class Acumuladores_CatFoliosGarantia
TxtMes.Text = GvRow.DataKey("Mes") TxtMes.Text = GvRow.DataKey("Mes")
TxtValor.Text = GvRow.DataKey("Valor") TxtValor.Text = GvRow.DataKey("Valor")
txtFechaI.Text = GvRow.DataKey("FechaInicioVigencia")
CargaCombosModal() CargaCombosModal()
DdlMarcaM.SelectedValueExist(GvRow.DataKey("CveMarca").ToEntero) DdlMarcaM.SelectedValueExist(GvRow.DataKey("CveMarca").ToEntero)
DdlTipoUsoM.SelectedValueExist(GvRow.DataKey("CveTipoUso").ToEntero) DdlTipoUsoM.SelectedValueExist(GvRow.DataKey("CveTipoUso").ToEntero)

View File

@@ -608,14 +608,14 @@ Public Class ClsAcumuladores
End Try End Try
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region " GARANTÍAS MESES " #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 Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -625,7 +625,8 @@ Public Class ClsAcumuladores
.Add("@CveGarantiaMes", SqlDbType.Int).Value = CveGarantiaMes .Add("@CveGarantiaMes", SqlDbType.Int).Value = CveGarantiaMes
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .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 .Add("@Mes", SqlDbType.Int).Value = Mes
End With End With
@@ -641,7 +642,7 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -653,6 +654,7 @@ Public Class ClsAcumuladores
.Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso
.Add("@Mes", SqlDbType.Int).Value = Mes .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 .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -670,7 +672,7 @@ Public Class ClsAcumuladores
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -682,7 +684,8 @@ Public Class ClsAcumuladores
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso .Add("@CveTipoUso", SqlDbType.Int).Value = CveTipoUso
.Add("@Mes", SqlDbType.Int).Value = Mes .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 .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With End With