Cambio en catalogo de peridos
This commit is contained in:
@@ -1771,7 +1771,7 @@ Public Class ClsNominas
|
||||
#End Region
|
||||
|
||||
#Region ""
|
||||
Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer) As Boolean
|
||||
Public Function GetPeriodos(CveTipoPeriodo As Integer, CveEmpresa As Integer, Ejercicio As Integer, Mes As Integer, CvePeriodo As Integer, Optional CveEstatus As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_PeriodosGet")
|
||||
@@ -1782,6 +1782,8 @@ Public Class ClsNominas
|
||||
.Add("@Mes", SqlDbType.Int).Value = Mes
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
|
||||
.chkChoice input
|
||||
{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -11,9 +19,59 @@
|
||||
Catálogo de periodos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddPeriodo" runat="server" Text="Agregar"><i class="fa fa-plus-circle"></i> Agregar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" RenderMode="Inline" ViewStateMode="Inherit" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Tipo Periodo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" Width="80%" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Ejercicio:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEjercicio" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Estatus:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="select2me form-control" runat="server" AppendDataBoundItems="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="80%" ValidationGroup="GrpConsutar">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
@@ -129,97 +187,10 @@
|
||||
<th style="width: 10px;" colspan="2">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr class="ADtr">
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" CssClass="select2me form-control" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoPeriodo" runat="server" ControlToValidate="DdlTipoPeriodo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoPeriodo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoPeriodo" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtEjercicio" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVEjercicio" runat="server" ControlToValidate="TxtEjercicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEjercicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVEjercicio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtMes" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px" Enabled="false"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVMes" runat="server" ControlToValidate="TxtMes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCMes" runat="server" HighlightCssClass="vco" TargetControlID="RFVMes" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</th>
|
||||
<th>
|
||||
<asp:TextBox ID="TxtNumero" runat="server" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="70px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVNumero" runat="server" ControlToValidate="TxtNumero" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Período''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCNumero" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumero" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</th>
|
||||
<th>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicio2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicio" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicio" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaInicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaInicio" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin2" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin2" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaFin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="3100px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinMes" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinSS" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsInicioAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkEsFinAño" runat="server" />
|
||||
</th>
|
||||
<th style="text-align: center">
|
||||
<asp:CheckBox ID="ChkFueCalculado" runat="server" />
|
||||
</th>
|
||||
<th>
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="select2me form-control" runat="server" AppendDataBoundItems="true" DataTextField="Estatus" DataValueField="CveEstatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
|
||||
</asp:DropDownList>
|
||||
</th>
|
||||
<th style="text-align: center" colspan="2">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></th>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader"
|
||||
EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo" Style="margin-top: -10px;" GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePeriodo, CveTipoPeriodo, Ejercicio, Numero, FechaInicio,FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, Estatus"
|
||||
CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvDatos" data-tableheader=".tableheader" EmptyDataText="No se encontraron Tipo de Periodo Registrados" ToolTip="Listado de Tipo de Periodo"
|
||||
Style="margin-top: -10px;" GridLines="None" data-rows="0" ShowHeader="false">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="250px">
|
||||
<ItemTemplate>
|
||||
@@ -341,8 +312,6 @@
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me form-control" AppendDataBoundItems="true" DataTextField="Estatus" Width="90px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
@@ -359,15 +328,9 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10px">
|
||||
<EditItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm green mysmallbtn" Text="<i class='fa fa-check'></i>" ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" ValidationGroup="GrpGV"></asp:LinkButton>
|
||||
<asp:LinkButton CssClass="btn btn-circle btn-sm red mysmallbtn" Text="<i class='fa fa-ban'></i>" ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel"></asp:LinkButton>
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<asp:LinkButton ID="imgE" CssClass="btn btn-circle btn-sm blue mysmallbtn" Text="<i class='fa fa-pencil'></i>" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" AlternateText="Editar" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -386,6 +349,121 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div id="divAddPeriodo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog modal" id="modal">
|
||||
<asp:UpdatePanel ID="UpAddInventarioFisico" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server"><asp:Label runat="server" ID="lblTiulomodal" Text="Agregar Periodo"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpModalPerido" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Concepto:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlTipoPeriodoAdd" CssClass="select2me form-control" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="100%"></asp:DropDownList>
|
||||
<asp:HiddenField runat="server" ID="hdnCvePerido" Value=""/>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroAdd" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-left: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioAdd" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioInicio" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioAdd" runat="server" TargetControlID="TxtFechaInicioAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioInicio" runat="server" TargetControlID="TxtFechaInicioAdd" PopupButtonID="ImgCalendarioInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumentoInicio" runat="server" ControlToValidate="TxtFechaInicioAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumentoInicio" runat="server" ControlToValidate="TxtFechaInicioAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1Inicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumentoInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2Inicio" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumentoInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaFinAdd" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgCalendarioFin" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFinAdd" runat="server" TargetControlID="TxtFechaFinAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioFin" runat="server" TargetControlID="TxtFechaFinAdd" PopupButtonID="ImgCalendarioFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumentoFin" runat="server" ControlToValidate="TxtFechaFinAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumentoFin" runat="server" ControlToValidate="TxtFechaFinAdd" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1Fin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumentoFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2Fin" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumentoFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<asp:CheckBoxList ID="CBLchk" RepeatDirection="Horizontal" RepeatColumns="4" runat="server" CssClass="chkChoice" Width="100%">
|
||||
<asp:ListItem Text=" Incio Mes" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text=" Inicio SS" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin SS" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text=" Inicio Año" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text=" Fin Año" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text=" Calculado" Value="7"></asp:ListItem>
|
||||
</asp:CheckBoxList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlEstatusAdd" runat="server" CssClass="select2me form-control" AppendDataBoundItems="true" DataTextField="Estatus" Width="100%" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Actual" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregar" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>function ADSBegin() { FiltrarTablaV2('.TxtBusqueda', '.GvDatos') }</script>
|
||||
|
||||
@@ -7,25 +7,33 @@ Imports Extensiones
|
||||
|
||||
Partial Class Nomina_CatPeriodos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
Private Property Comando As String
|
||||
Get
|
||||
Return ViewState("Comando").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Comando") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaDatos()
|
||||
CargaTipoPeriodo()
|
||||
CargaTipoPeriodo()
|
||||
cargaEjercicios()
|
||||
CargaDatos()
|
||||
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
''Permiso Registro
|
||||
'If PermisoRegistro Then
|
||||
' LbAgregar.Enabled = True
|
||||
'Else
|
||||
' LbAgregar.Enabled = False
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, Now.Year, -1, -1) Then
|
||||
If ObjNom_Periodos.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEjercicio.SelectedValue.ToEntero, -1, -1, DdlEstatus.SelectedValue.ToEntero) Then
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
|
||||
@@ -42,44 +50,27 @@ Partial Class Nomina_CatPeriodos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
Dim Numero As Integer = TxtNumero.Text.Trim.ToEntero
|
||||
Dim EsInicioMes As Boolean = ChkEsInicioMes.Checked
|
||||
Dim EsFinMes As Boolean = ChkEsFinMes.Checked
|
||||
Dim EsInicioSS As Boolean = CBool(ChkEsInicioSS.Checked)
|
||||
Dim EsFinSS As Boolean = ChkEsFinSS.Checked
|
||||
Dim EsInicioAño As Boolean = ChkEsInicioAño.Checked
|
||||
Dim EsFinAño As Boolean = ChkEsFinAño.Checked
|
||||
Dim FueCalculado As Boolean = ChkFueCalculado.Checked
|
||||
Dim FechaInicio As Date = TxtFechaInicio.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFin.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodo.SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DdlEstatus.SelectedValue.ToEntero
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, ChkEsInicioSS.Checked, ChkEsFinAño.Checked, ChkEsInicioAño.Checked, ChkEsFinAño.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
'ObjNom_Periodos.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " C O M B O S"
|
||||
Private Sub CargaTipoPeriodo()
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
|
||||
DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo
|
||||
|
||||
DdlTipoPeriodo.DataBind()
|
||||
DdlTipoPeriodoAdd.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub cargaEjercicios()
|
||||
Dim objconta As New ClsContabilidad
|
||||
If objconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = objconta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
objconta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -120,12 +111,23 @@ Partial Class Nomina_CatPeriodos
|
||||
e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").DataSource = GlobalDTTipoPeriodo
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").DataBind()
|
||||
e.Row.FCDropDownList("DdlTipoPeriodo").SelectedValue = e.Row.DBCampo("CveTipoPeriodo")
|
||||
e.Row.FCDropDownList("DdlEstatus").SelectedItem.Text = e.Row.DBCampo("Estatus")
|
||||
|
||||
e.Row.FCCheckBox("ChkEsInicioMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinMes").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinMes").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinSS").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinSS").ToString)
|
||||
e.Row.FCCheckBox("ChkEsInicioAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsInicioAño").ToString)
|
||||
e.Row.FCCheckBox("ChkEsFinAño").Checked = Convert.ToBoolean(e.Row.DataKey("EsFinAño").ToString)
|
||||
e.Row.FCCheckBox("ChkFueCalculado").Checked = Convert.ToBoolean(e.Row.DataKey("FueCalculado").ToString)
|
||||
|
||||
If e.Row.DataKey("Estatus").ToString.ToEntero = 1 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Actual"
|
||||
ElseIf e.Row.DataKey("Estatus").ToString.ToEntero = 2 Or e.Row.DataKey("Estatus").ToString.ToEntero = 3 Then
|
||||
e.Row.FCLiteral("LtlEstatus").Text = "Cerrado"
|
||||
Else
|
||||
e.Row.FCLiteral("LtlEstatus").Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -156,51 +158,7 @@ Partial Class Nomina_CatPeriodos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
Dim Numero As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtNumero"), TextBox).Text.Trim.ToEntero
|
||||
Dim EsInicioMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioMes").Checked
|
||||
Dim EsFinMes As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinMes").Checked
|
||||
Dim EsInicioSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioSS").Checked
|
||||
Dim EsFinSS As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinSS").Checked
|
||||
Dim EsInicioAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsInicioAño").Checked
|
||||
Dim EsFinAño As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEsFinAño").Checked
|
||||
Dim FueCalculado As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkFueCalculado").Checked
|
||||
Dim FechaInicio As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaInicio"), TextBox).Text.Trim.ToDateTime
|
||||
Dim FechaFin As Date = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtFechaFin"), TextBox).Text.Trim.ToDateTime
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlTipoPeriodo"), DropDownList).SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlEstatus"), DropDownList).SelectedValue.ToEntero
|
||||
|
||||
Dim CvePeriodo As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado,
|
||||
CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjNom_Periodos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
@@ -239,4 +197,151 @@ Partial Class Nomina_CatPeriodos
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub LnkAddPeriodo_Click(sender As Object, e As EventArgs) Handles LnkAddPeriodo.Click
|
||||
LimpiarModal()
|
||||
Comando = "Agregar"
|
||||
lblTiulomodal.Text = "Agregar Periodo"
|
||||
RegistraScript("$('#divAddPeriodo').modal('show');")
|
||||
End Sub
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregar.Click
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
|
||||
Dim EsInicioMes As Boolean
|
||||
Dim EsFinMes As Boolean
|
||||
Dim EsInicioSS As Boolean
|
||||
Dim EsFinSS As Boolean
|
||||
Dim EsInicioAño As Boolean
|
||||
Dim EsFinAño As Boolean
|
||||
Dim FueCalculado As Boolean
|
||||
Dim Numero As Integer = TxtNumeroAdd.Text.Trim.ToEntero
|
||||
Dim FechaInicio As Date = TxtFechaInicioAdd.Text.Trim.ToDate
|
||||
Dim FechaFin As Date = TxtFechaFinAdd.Text.Trim.ToDate
|
||||
Dim Mes As Integer = FechaFin.Month
|
||||
Dim Ejercicio As Integer = FechaFin.Year
|
||||
Dim CveTipoPeriodo As Integer = DdlTipoPeriodoAdd.SelectedValue.ToEntero
|
||||
Dim Estatus As Integer = DdlEstatusAdd.SelectedValue.ToEntero
|
||||
Dim CvePeriodo As Integer = hdnCvePerido.Value.ToEntero
|
||||
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
If item.Selected Then EsInicioMes = True Else EsInicioMes = False
|
||||
Case 2
|
||||
If item.Selected Then EsFinMes = True Else EsFinMes = False
|
||||
Case 3
|
||||
If item.Selected Then EsInicioSS = True Else EsInicioSS = False
|
||||
Case 4
|
||||
If item.Selected Then EsFinSS = True Else EsFinSS = False
|
||||
Case 5
|
||||
If item.Selected Then EsInicioAño = True Else EsInicioAño = False
|
||||
Case 6
|
||||
If item.Selected Then EsFinAño = True Else EsFinAño = False
|
||||
Case 7
|
||||
If item.Selected Then FueCalculado = True Else FueCalculado = False
|
||||
End Select
|
||||
Next
|
||||
If Comando = "Agregar" Then
|
||||
|
||||
If ObjNom_Periodos.AddPeriodo(CveTipoPeriodo, Ejercicio, Mes, Numero, FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("El nuevo Periodo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End If
|
||||
ElseIf Comando = "Actualizar" Then
|
||||
|
||||
If ObjNom_Periodos.UpdatePeriodo(FechaInicio, FechaFin, EsInicioMes, EsFinMes, EsInicioSS, EsFinSS, EsInicioAño, EsFinAño, FueCalculado, CveTipoPeriodo, Ejercicio, Mes, Numero, Estatus, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTNom_Periodos") = ObjNom_Periodos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTNom_Periodos = ObjNom_Periodos.DtResultados
|
||||
CargaDatos()
|
||||
If String.IsNullOrEmpty(ViewState("Orden").ToString()) Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
RegistraScript("$('#divAddPeriodo').modal('hide');")
|
||||
|
||||
'ObjNom_Periodos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
LimpiarModal()
|
||||
Comando = "Actualizar"
|
||||
lblTiulomodal.Text = "Actualizar Periodo"
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(GvRow.DataKey("CveTipoPeriodo").ToString.ToEntero)
|
||||
TxtNumeroAdd.Text = GvRow.DataKey("Numero").ToString
|
||||
TxtFechaInicioAdd.Text = GvRow.DataKey("FechaInicio").ToString
|
||||
TxtFechaFinAdd.Text = GvRow.DataKey("FechaFin").ToString
|
||||
DdlEstatusAdd.SelectedValueExist(GvRow.DataKey("Estatus").ToString.ToEntero)
|
||||
hdnCvePerido.Value = GvRow.DataKey("CvePeriodo").ToString
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioMes").ToString)
|
||||
Case 2
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinMes").ToString)
|
||||
Case 3
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioSS").ToString)
|
||||
Case 4
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinSS").ToString)
|
||||
Case 5
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsInicioAño").ToString)
|
||||
Case 6
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("EsFinAño").ToString)
|
||||
Case 7
|
||||
item.Selected = Convert.ToBoolean(GvRow.DataKey("FueCalculado").ToString)
|
||||
End Select
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
|
||||
RegistraScript("$('#divAddPeriodo').modal('show')")
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarModal()
|
||||
DdlTipoPeriodoAdd.SelectedValueExist(-1)
|
||||
TxtNumeroAdd.Text = ""
|
||||
TxtFechaInicioAdd.Text = ""
|
||||
TxtFechaFinAdd.Text = ""
|
||||
DdlEstatusAdd.SelectedValueExist(-1)
|
||||
For Each item As ListItem In CBLchk.Items
|
||||
Select Case item.Value.ToEntero()
|
||||
Case 1
|
||||
item.Selected = False
|
||||
Case 2
|
||||
item.Selected = False
|
||||
Case 3
|
||||
item.Selected = False
|
||||
Case 4
|
||||
item.Selected = False
|
||||
Case 5
|
||||
item.Selected = False
|
||||
Case 6
|
||||
item.Selected = False
|
||||
Case 7
|
||||
item.Selected = False
|
||||
End Select
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user