This commit is contained in:
2022-02-16 09:05:54 -07:00
7 changed files with 549 additions and 121 deletions

View File

@@ -2527,7 +2527,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString() .Add("@xmlRegistros", SqlDbType.Xml).Value = If(xmlProductos Is Nothing, DBNull.Value, DirectCast(xmlProductos.ToString(), Object))
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -2549,7 +2549,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
SqlDataAdapter("PA_RH_ChecadorAsistenciaAdd") SqlDataAdapter("PA_RH_ChecadorAsistenciaAdd")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString() .Add("@xmlRegistros", SqlDbType.Xml).Value = If(xmlProductos Is Nothing, DBNull.Value, DirectCast(xmlProductos.ToString(), Object))
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -7181,6 +7181,25 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Public Function UpPersonalAsistenciasMasiva(CveEmpresa As Integer, CveUsuario As Integer, xmlProductos As String) As Boolean
Dim Retorno As Boolean = False
Data = New DataTable
SqlDataAdapter("PA_RH_PersonalAsistenciasMasivaUP")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@xmlRegistros", SqlDbType.Xml).Value = If(String.IsNullOrEmpty(xmlProductos), DBNull.Value, DirectCast(xmlProductos.ToString(), Object))
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al guardar la asistencia masiva", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al guardar la asistencia masiva.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpPersonalSupervisorMasiva(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpSupervisorMasiva)) As Boolean Public Function UpPersonalSupervisorMasiva(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpSupervisorMasiva)) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Dim xmlProductos As System.Xml.Linq.XDocument = Nothing Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
@@ -7192,7 +7211,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@xmlRegistros", SqlDbType.Xml).Value = xmlProductos.ToString() .Add("@xmlRegistros", SqlDbType.Xml).Value = If(xmlProductos Is Nothing, DBNull.Value, DirectCast(xmlProductos.ToString(), Object))
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -15,6 +15,18 @@
.spanfoliofiscal { .spanfoliofiscal {
white-space: nowrap; white-space: nowrap;
} }
th.Modulo5{
color:#fff;
background-color:darksalmon;
}
th.Modulo6{
color:#fff;
background-color:#67809f;
}
th.Modulo7{
color:#fff;
background-color:purple;
}
th:not(.Modulo5) + th.Modulo5, th:not(.Modulo5) + th.Modulo5,
th:not(.Modulo6) + th.Modulo6, th:not(.Modulo6) + th.Modulo6,
th:not(.Modulo7) + th.Modulo7{ th:not(.Modulo7) + th.Modulo7{

View File

@@ -4,6 +4,10 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style> <style>
.GvAsistenciaDiv .ADScroller-header {
overflow: visible;
}
.fa-ad-pdf.fa::before { .fa-ad-pdf.fa::before {
background: #999; background: #999;
content: "\f1c1"; content: "\f1c1";
@@ -119,9 +123,11 @@
table.GvConceptos td { table.GvConceptos td {
white-space: nowrap; white-space: nowrap;
} }
.Gvbitacora tr td:nth-child(1){
.Gvbitacora tr td:nth-child(1) {
white-space: nowrap; white-space: nowrap;
} }
.GvConceptos td, .Gvbitacora td { .GvConceptos td, .Gvbitacora td {
font-size: 11px; font-size: 11px;
padding-top: 2px; padding-top: 2px;
@@ -196,7 +202,7 @@
<asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton> <asp:LinkButton ID="LnkTimbrarTodos" Visible="false" OnClick="LnkTimbrarTodos_Click" runat="server"><i class="fa fa-bell"></i> Timbrar todos</asp:LinkButton>
</li> </li>
<li> <li>
<asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea registrar provisión?" data-btn-ok-label="si" ><i class="fa fa-thumbs-up" aria-hidden="true" ></i>Registrar provisión</asp:LinkButton> <asp:LinkButton ID="LnkRegistrarProvision" Visible="false" OnClick="LnkRegistrarProvision_Click" runat="server" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea registrar provisión?" data-btn-ok-label="si"><i class="fa fa-thumbs-up" aria-hidden="true" ></i>Registrar provisión</asp:LinkButton>
</li> </li>
<li> <li>
<asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión</asp:HyperLink> <asp:HyperLink ID="LnkProvisionNomina" Visible="false" runat="server"><i class="fa fa-eye"></i>Ver provisión</asp:HyperLink>
@@ -734,6 +740,11 @@
<div class="tools"> <div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a> <a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div> </div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkRecalcular" OnClick="LnkRecalcular_Click" CssClass="btn yellow-gold" runat="server">Recalcular</asp:LinkButton>
</div>
</div>
</div> </div>
<div class="portlet-body " style="padding: 0px;"> <div class="portlet-body " style="padding: 0px;">
<div class="row"> <div class="row">
@@ -859,7 +870,7 @@
<li> <li>
<asp:LinkButton ID="LnkCalculoHorasExtras" OnClick="LnkCalculoHorasExtras_Click" Text="<i class='icon-bulb'></i> Calculo horas extras" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkCalculoHorasExtras" OnClick="LnkCalculoHorasExtras_Click" Text="<i class='icon-bulb'></i> Calculo horas extras" runat="server"></asp:LinkButton>
</li> </li>
<%-- <li> <%-- <li>
<asp:LinkButton ID="LnkCalculoSubsidio" OnClick="LnkCalculoSubsidio_Click" Text="<i class='icon-bulb'></i> Calculo Subsidio" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkCalculoSubsidio" OnClick="LnkCalculoSubsidio_Click" Text="<i class='icon-bulb'></i> Calculo Subsidio" runat="server"></asp:LinkButton>
</li> </li>
<li> <li>
@@ -945,7 +956,7 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng","{0:dd-MM-yyyy}") %>'/> <asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng","{0:dd-MM-yyyy}") %>' />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
@@ -1318,29 +1329,29 @@
CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvVacaciones" data-sort="true" data-height="300" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD GvVacaciones" data-sort="true" data-height="300" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" OnRowDataBound="GvVacaciones_RowDataBound"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False" OnRowDataBound="GvVacaciones_RowDataBound">
<Columns> <Columns>
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha ingreso" /> <asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha ingreso" />
<asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" /> <asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" />
<asp:TemplateField HeaderText="Periodo"> <asp:TemplateField HeaderText="Periodo">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}")%>'> </asp:Label>- <asp:Label runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}")%>'> </asp:Label>-
<asp:Label runat="server" Text='<%# Eval("FechaFin", "{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaFin", "{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="FechaPago" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha pago" /> <asp:BoundField DataField="FechaPago" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha pago" />
<asp:BoundField DataField="diasinhabiles" HeaderText="Días feriados" /> <asp:BoundField DataField="diasinhabiles" HeaderText="Días feriados" />
<asp:BoundField DataField="TipoPago" HeaderText="Tipo pago" /> <asp:BoundField DataField="TipoPago" HeaderText="Tipo pago" />
<asp:BoundField DataField="DiasextraAutorizado" HeaderText="Días extra" /> <asp:BoundField DataField="DiasextraAutorizado" HeaderText="Días extra" />
<asp:BoundField DataField="diasPago" HeaderText="Días pago" /> <asp:BoundField DataField="diasPago" HeaderText="Días pago" />
<asp:TemplateField HeaderText="Aplica prima"> <asp:TemplateField HeaderText="Aplica prima">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# ((Eval("AplicaPrima").ToString() == "1" || Eval("AplicaPrima").ToString().ToUpper() == "TRUE") ? "Sí": "No") %>'> </asp:Label> <asp:Label runat="server" Text='<%# ((Eval("AplicaPrima").ToString() == "1" || Eval("AplicaPrima").ToString().ToUpper() == "TRUE") ? "Sí": "No") %>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Cobro IMSS"> <asp:TemplateField HeaderText="Cobro IMSS">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# ((Eval("CobrarIMSS").ToString() == "1" || Eval("CobrarIMSS").ToString().ToUpper() == "TRUE") ? "Sí": "No") %>'> </asp:Label> <asp:Label runat="server" Text='<%# ((Eval("CobrarIMSS").ToString() == "1" || Eval("CobrarIMSS").ToString().ToUpper() == "TRUE") ? "Sí": "No") %>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--<asp:BoundField Visible="true" DataField="Periodo" HeaderText="Periodo" ItemStyle-HorizontalAlign="Center" /> <%--<asp:BoundField Visible="true" DataField="Periodo" HeaderText="Periodo" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField Visible="true" DataField="Dias" HeaderText="Días" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField Visible="true" DataField="Dias" HeaderText="Días" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField Visible="true" DataField="FechaPago" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha pago" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" /> <asp:BoundField Visible="true" DataField="FechaPago" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Fecha pago" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center" />
@@ -1766,6 +1777,207 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TabAsistenciasr" runat="server" HeaderText="Asistencia">
<ContentTemplate>
<div class="portlet light xspadding bordered " id="pnlasistencia">
<div class="portlet-title">
<div class="caption ">
<i class="icon-pin font-yellow-gold"></i>
<span class="caption-subject font-yellow-gold bold uppercase">Registros de asistencias</span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>
</div>
</div>
<div class="portlet-body GvAsistenciaDiv" style="padding: 0px;">
<table class="table table-striped table-hover Widthall" id="GvAsistenciaHeader">
<tr class="Titulos">
<th style="width: 120px">
<asp:LinkButton ID="LbFechaAsistencia" runat="server" CausesValidation="false" Text="Fecha" CommandArgument="" OnClick="LbOrden_Click"></asp:LinkButton>
</th>
<th style="width: 180px">
<asp:LinkButton ID="LbClienteAsistencia" runat="server" CausesValidation="false" Text="Cliente" CommandArgument="Cliente1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgCliente1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th style="width: 110px">
<asp:LinkButton ID="LbProyectoAsistencia" runat="server" CausesValidation="false" Text="Proyecto" CommandArgument="Proyecto1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton></th>
<th style="width: 110px">
<asp:LinkButton ID="LbSubProyectoAsistencia" runat="server" CausesValidation="false" Text="Sub Proyecto" CommandArgument="SubProyecto1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgSubProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton></th>
<th style="width: 70px;">
<asp:LinkButton ID="LbTipoAsistencia" runat="server" CausesValidation="false" Text="Asistencia" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="width: 50px;">
<asp:LinkButton ID="LbPorPagoAsistencia" runat="server" CausesValidation="false" Text="% Pago" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="width: 56px;">
<asp:LinkButton ID="LbHorasDoblesAsistencia" runat="server" CausesValidation="false" Text="Hrs Dob." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="width: 56px;">
<asp:LinkButton ID="LbHorasTriplesAsistencia" runat="server" CausesValidation="false" Text="Hrs Trip." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="width: 110px;">
<asp:LinkButton ID="LbMotivosHorasExtrasAsistencia" runat="server" CausesValidation="false" Text="Motivos H. Extras" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="width: 30px;">
<asp:LinkButton ID="LbObservacionesAsistencia" runat="server" CausesValidation="false" Text="Obs." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</th>
<th style="text-align: center;" width="8px">Comandos</th>
</tr>
<tr>
<td>
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="min-width: 100px; max-width: 200px;">
<asp:TextBox ID="TxtFechaAsistencia" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioAsistencia" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaAsistencia" runat="server" TargetControlID="TxtFechaAsistencia" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarioAsistencia" TargetControlID="TxtFechaAsistencia" PopupButtonID="ImgCalendarioAsistencia" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GuardaAsistencia"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaAsistencia" runat="server" ControlToValidate="TxtFechaAsistencia" Display="None" ErrorMessage="El campo <b>''Fecha Asistencia''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GuardaAsistencia"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<ADS:Dropdownlost CssClassDdl="form-control input-sm select2me" ID="DdlClienteAsistenciaA" Width="100%" data-metodo="getcliente" runat="server" DataTextField="Nombre" DataValueField="CveCliente" UsaWebService="true" CssStyle="width: 100%;"></ADS:Dropdownlost>
</td>
<td>
<asp:DropDownList Width="100%" ID="DdlProyectoAsistenciaA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardarAsistencia">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:DropDownList Width="100%" ID="DdlSubProyectoAsistenciasA" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 80px !important;" ValidationGroup="GrpGuardarAsistencia">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:DropDownList Width="100%" ID="DdlTipoAsistenciasB" runat="server" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" CssClass="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;" ValidationGroup="GrpGuardarAsistencia"
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoAsistencias_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:TextBox CssClass="form-control input-sm" ID="TextBox1" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox></td>
<td>
<asp:TextBox CssClass="form-control input-sm" ID="TextBox2" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox></td>
<td>
<asp:TextBox CssClass="form-control input-sm" ID="TextBox3" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox></td>
<td>
<asp:DropDownList Width="100%" ID="DropDownList2" runat="server" AppendDataBoundItems="true" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td>
<td>
<asp:TextBox CssClass="form-control input-sm" ID="TextBox4" runat="server" Width="84px" MaxLength="150"></asp:TextBox></td>
<td>
<asp:LinkButton ID="LbGuardarAsistencia" OnClick="LbGuardarAsistencia_Click" runat="server" CausesValidation="true" CssClass=" btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarAsistencia" />
</td>
</tr>
</table>
<asp:GridView ID="GVAsistencia" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveAsistencia" ShowHeader="false"
data-heighterror="550" OnRowDataBound="GVAsistencia_RowDataBound"
EmptyDataText="No se encontraron registros de Asistencias con los filtros seleccionados" ToolTip="Listado de Asistencias" data-rows="0"
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-tableheader="#GvAsistenciaHeader" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server"></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Cliente</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Cliente") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Proyecto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlProyecto" runat="server" Text='<%# Eval("Proyecto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Sub Proyecto</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Asistencia</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList ID="DdlTipoAsistencias" runat="server" TabIndex="2" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 70px !important;"></asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>% Pago</HeaderTemplate>
<ItemTemplate>
<asp:TextBox CssClass="form-control" ID="TxtPorPago" TabIndex="1" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Hrs Dob.</HeaderTemplate>
<ItemTemplate>
<asp:TextBox CssClass="form-control" ID="TxtHorasDobles" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Hrs Trip.</HeaderTemplate>
<ItemTemplate>
<asp:TextBox CssClass="form-control" ID="TxtHorasTriples" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Motivo H. Extras</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList ID="DdlMotivoHoraExtra" runat="server" TabIndex="2" AppendDataBoundItems="true" DataTextField="MotivoHoraExtra" DataValueField="CveMotivoHoraExtra" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Obs.</HeaderTemplate>
<ItemTemplate>
<asp:TextBox CssClass="form-control" ID="TxtObservaciones" TabIndex="3" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
<ItemTemplate>
<%--<asp:LinkButton ID="LnkEliminarAsistencia" OnClick="LnkEliminarAsistencia_Click" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la asistencia?" data-btn-ok-label="si" />--%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
<div class="text-right">
<asp:Button ID="BtnGuardarAsistenciaCambios" OnClick="BtnGuardarAsistenciaCambios_Click" runat="server" Text="Guardar Cambios" class="btn btn-success pull-right" /><br />
</div>
<br />
<br />
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer> </ajax:TabContainer>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -1868,7 +2080,7 @@
<asp:GridView ID="GVNominaPendiente" runat="server" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" <asp:GridView ID="GVNominaPendiente" runat="server" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas"
Style="text-align: center;" GridLines="None" data-rows="2" data-heighterror="500" ShowHeaderWhenEmpty="true" ShowHeader="true" AutoGenerateColumns="false"> Style="text-align: center;" GridLines="None" data-rows="2" data-heighterror="500" ShowHeaderWhenEmpty="true" ShowHeader="true" AutoGenerateColumns="false">
<Columns> <Columns>
<asp:TemplateField HeaderText="Código"> <asp:TemplateField HeaderText="Código">
@@ -1881,16 +2093,16 @@
<asp:Label runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("NombreCompleto")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Periodo" ItemStyle-CssClass="text-left"> <asp:TemplateField HeaderText="Periodo" ItemStyle-CssClass="text-left">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("PeriodoTexto")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("PeriodoTexto")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Tipo" ItemStyle-CssClass="text-left"> <asp:TemplateField HeaderText="Tipo" ItemStyle-CssClass="text-left">
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("PeriodoTipe")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("PeriodoTipe")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -1936,7 +2148,7 @@
<asp:Label runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("CodigoNombreCompleto")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Asignar a Concepto :" > <asp:TemplateField HeaderText="Asignar a Concepto :">
<ItemTemplate> <ItemTemplate>
<asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable"></asp:DropDownList> <asp:DropDownList ID="DdlCconceptosContables" CssClass="form-control input-sm select2me select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable"></asp:DropDownList>
</ItemTemplate> </ItemTemplate>
@@ -2463,7 +2675,7 @@
</div> </div>
</ContentTemplate> </ContentTemplate>
</ajax:TabPanel> </ajax:TabPanel>
<ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual" > <ajax:TabPanel ID="TTVigSubEmpAnual" runat="server" HeaderText="Subsidio Anual">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView> <asp:GridView ID="GVVigSubEmpAnual" runat="server" CssClass="table table-striped table-hover mysmallbtn Widthall GvNominas" GridLines="None"></asp:GridView>
</ContentTemplate> </ContentTemplate>
@@ -2810,7 +3022,7 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
<a onclick="$('#C_BtnImprimirsobrereciboSimula').click()" class="btn yellow-gold">Imprimir</a> <a onclick="$('#C_BtnImprimirsobrereciboSimula').click()" class="btn yellow-gold">Imprimir</a>
</div> </div>
<div class="btn-group"> <div class="btn-group">
</div> </div>
@@ -3540,7 +3752,7 @@
<div id="DModalProrrateo" class="modal ADS fade" role="dialog"> <div id="DModalProrrateo" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModalProrrateo" class="modal-dialog" style="width:900px;" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpModalProrrateo" class="modal-dialog" style="width: 900px;" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content rowpadding"> <div class="modal-content rowpadding">
<div class="modal-header"> <div class="modal-header">
@@ -3564,7 +3776,7 @@
<a href="javascript:;" class="expand" data-original-title="" title=""></a> <a href="javascript:;" class="expand" data-original-title="" title=""></a>
</div> </div>
</div> </div>
<div class="portlet-body" style="display:none"> <div class="portlet-body" style="display: none">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPRPersonal" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me"> <asp:DropDownList ID="DdlPRPersonal" DataTextField="CodigoNombreCompleto" DataValueField="CvePersonal" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control select2me">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -3593,7 +3805,7 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control " ID="TxtPorcentaje" runat="server" Text="0"></asp:TextBox> <asp:TextBox CssClass="form-control " ID="TxtPorcentaje" runat="server" Text="0"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtPorcentaje" Text="Porcentaje"></asp:Label> <asp:Label runat="server" AssociatedControlID="TxtPorcentaje" Text="Porcentaje"></asp:Label>
</div> </div>
<div class="text-right"> <div class="text-right">

View File

@@ -460,8 +460,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero(); int CvePrePolizaProrrateo = drow["CvePrePolizaProrrateo"].ToString().ToEntero();
FechaInicioPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaInicio"]; FechaInicioPeriodo = drow["FechaInicio"].ToString().ToDateTime();
FechaFinPeriodo = (DateTime)dtPeriodo.Rows[0]["FechaFin"]; FechaFinPeriodo = drow["FechaFin"].ToString().ToDateTime();
//LnkConceptoEmpleado.Visible = (Estatus == 1); //LnkConceptoEmpleado.Visible = (Estatus == 1);
LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100); LnkRegistrarProvision.Visible = (Estatus >= 2);//&& (CvePrePolizaProvision <= 0 || UsuarioActual.CveUsuario == 100);
@@ -1811,6 +1811,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
LblEmpleado.Text = Nombre; LblEmpleado.Text = Nombre;
LblEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", SRCvePersonal); LblEmpleado.NavigateUrl = string.Format("/RH/Personal.aspx?CvePersonal={0}", SRCvePersonal);
TabPersonal.ActiveTabIndex = 0; TabPersonal.ActiveTabIndex = 0;
DdlTipoAsistenciasB.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
DdlTipoAsistenciasB.DataBind();
cargaasistenciaSR();
mostrarConceptos(); mostrarConceptos();
CargaVacaciones(); CargaVacaciones();
pnlAddupMovto.Visible = false; pnlAddupMovto.Visible = false;
@@ -1818,6 +1821,179 @@ public partial class Nomina_Nomina2 : ClsPaginas
CargaPersonalIncapacidad(); CargaPersonalIncapacidad();
RegistraScript("$('#ModalConceptos').modal();"); RegistraScript("$('#ModalConceptos').modal();");
} }
#region Asistencias
protected void LnkRecalcular_Click(object sender, EventArgs e)
{
cargaDatos();
cargaBitacora();
cargasobrericiboconceptos();
UpModalConceptos.Update();
}
protected void cargaasistenciaSR(string orden = "")
{
using (ClsRH objpersonal = new ClsRH())
{
if (objpersonal.GetAsistencias(SRCvePersonal, -1, -1, -1, -1,-1, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa))
{ GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL"); }
else{
GVAsistencia.DataSource = null;
}
}
GVAsistencia.DataBind();
}
protected void LbOrden_Click(object sender, EventArgs e)
{
string Orden = "";
string Campo = "";
int gvi = 0;
Literal Literal = null/* TODO Change to default(_) if this is not a reference type */;
const string OrdenInicial = "";
string[] Arg = new string[3];
Arg = ((LinkButton)sender).CommandArgument.Split(';');
Campo = Arg[0];
gvi = Arg[1].ToEntero();
Literal = (Literal)((LinkButton)sender).NamingContainer.FindControl("Img" + Campo.Replace(",", "_"));
Campo = Campo.Substring(0, Campo.Length - 1);
if (ViewState[string.Format("O{0}", Campo, gvi)] != null && ViewState[string.Format("O{0}", Campo, gvi)].ToString() == string.Format("{0} DESC", Campo))
{
ViewState[string.Format("O{0}", Campo)] = string.Format("{0} ASC", Campo);
Literal.Text = string.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>");
}
else
{
ViewState[string.Format("O{0}", Campo, gvi)] = string.Format("{0} DESC", Campo);
Literal.Text = string.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>");
}
Orden = OrdenInicial + ViewState[string.Format("O{0}", Campo, gvi)].ToString();
ViewState["Orden"] = Orden;
cargaasistenciaSR(Orden);
}
protected void DdlTipoAsistencias_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList ddl = (DropDownList)sender;
GridViewRow gvrow = (GridViewRow)ddl.NamingContainer;
if (ddl.SelectedItem.Text == "Retardo")
gvrow.FCTextBox("TxtPorPago").Text = "87.5";
}
protected void LbGuardarAsistencia_Click(object sender, EventArgs e)
{
bool continuar = false;
using (ClsRH ObjPersonal = new ClsRH())
{
if (ObjPersonal.AddAsistencia(SRCvePersonal, -2, -2, TxtFechaAsistencia.Text.Trim().ToDate(),
DdlTipoAsistenciasB.SelectedValue.ToEntero(), TxtPorPago.Text.Trim().ToDouble(), TxtHorasDobles.Text.Trim().ToDouble(),
TxtHorasTriples.Text.Trim().ToDouble(), DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
Alert("La Asistencia se guardó correctamente.", TipoMensaje.MsgInformacion);
continuar = true;
}
}
if (continuar)
{
cargaasistenciaSR();
LnkRecalcular_Click(null, null);
}
}
protected void BtnGuardarAsistenciaCambios_Click(object sender, EventArgs e)
{
bool continuar = false;
using (ClsRH ObjPersonal = new ClsRH())
{
ObjPersonal.IniciaTransacSQL();
bool OcurrioError = false;
foreach (GridViewRow Row in GVAsistencia.Rows)
{
if (!ObjPersonal.AddAsistencia(SRCvePersonal, -2,-2, Row.FCLiteral("LtlFecha").Text.Trim().ToDate(),
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(),
Row.FCTextBox("TxtPorPago").Text.Trim().ToDouble(),
Row.FCTextBox("TxtHorasDobles").Text.Trim().ToDouble(), Row.FCTextBox("TxtHorasTriples").Text.Trim().ToDouble(),
Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim(),
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
OcurrioError = true;
break;
}
}
if (OcurrioError)
{
ObjPersonal.RollBack();
Alert("Ocurrió un error al guardar las Asistencias.", TipoMensaje.MsgError);
}
else
{
ObjPersonal.Commit();
continuar = true;
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion);
}
}
if (continuar)
{
cargaasistenciaSR();
LnkRecalcular_Click(null, null);
}
}
protected void GVAsistencia_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].HorizontalAlign = HorizontalAlign.Left;
e.Row.Cells[2].HorizontalAlign = HorizontalAlign.Left;
e.Row.Cells[3].HorizontalAlign = HorizontalAlign.Left;
//if ((e.Row.DBCampo("Fecha")))
e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate().ToShortDateString();
if (e.Row.FCLiteral("LtlCliente").Text != "N/A")
e.Row.FCLiteral("LtlCliente").Text = "<a class=\"Texto\" href=\"/Ventas/Clientes.aspx?CveCliente=" + e.Row.DBCampo("CveCliente") + "\">" + e.Row.DBCampo("Cliente") + "</a>";
e.Row.FCTextBox("TxtPorPago").Text = e.Row.DBCampo("PorcentajePago");
e.Row.FCTextBox("TxtHorasDobles").Text = e.Row.DBCampo("HorasDobles");
e.Row.FCTextBox("TxtHorasTriples").Text = e.Row.DBCampo("HorasTriples");
// Carga Tipos de Asistencia
e.Row.FCDropDownList("DdlTipoAsistencias").DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
e.Row.FCDropDownList("DdlTipoAsistencias").DataBind();
if (e.Row.DBCampo("CveAsistenciasInasistencias") != "-1")
e.Row.FCDropDownList("DdlTipoAsistencias").SelectedValue = e.Row.DBCampo("CveAsistenciasInasistencias");
// Carga Motivos Horas Extras
e.Row.FCDropDownList("DdlMotivoHoraExtra").DataSource = GlobalDTMotivosHorasExtras.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
e.Row.FCDropDownList("DdlMotivoHoraExtra").DataBind();
if (e.Row.DBCampo("CveMotivoHoraExtra") != "-1")
e.Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue = e.Row.DBCampo("CveMotivoHoraExtra");
e.Row.FCTextBox("TxtObservaciones").Text = e.Row.DBCampo("Observacion");
if (e.Row.DBCampo("SeModifico") == "0")
{
e.Row.Cells[0].BackColor = System.Drawing.Color.LightBlue;
e.Row.Cells[1].BackColor = System.Drawing.Color.LightBlue;
e.Row.Cells[2].BackColor = System.Drawing.Color.LightBlue;
e.Row.Cells[3].BackColor = System.Drawing.Color.LightBlue;
}
else if (e.Row.DBCampo("SeModifico") == "1")
{
e.Row.Cells[0].ForeColor = System.Drawing.Color.Red;
e.Row.Cells[1].ForeColor = System.Drawing.Color.Red;
e.Row.Cells[2].ForeColor = System.Drawing.Color.Red;
e.Row.Cells[3].ForeColor = System.Drawing.Color.Red;
}
}
}
#endregion
#region "CalculosSistema" #region "CalculosSistema"
private void showModalCalculo() private void showModalCalculo()
{ {
@@ -7780,4 +7956,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
UpModalProrrateo.Update(); UpModalProrrateo.Update();
} }
} }

View File

@@ -1927,46 +1927,46 @@
<table class="table table-striped table-hover Widthall" id="GvAsistenciaHeader"> <table class="table table-striped table-hover Widthall" id="GvAsistenciaHeader">
<%--<thead>--%> <%--<thead>--%>
<tr class="Titulos"> <tr class="Titulos">
<th width="120px"> <th style="width:120px">
<asp:LinkButton ID="LbFechaAsistencia" runat="server" CausesValidation="false" Text="Fecha" CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbFechaAsistencia" runat="server" CausesValidation="false" Text="Fecha" CommandArgument="" OnClick="LbOrden_Click"></asp:LinkButton>
</th>
</asp:LinkButton></th> <th style="width:180px">
<th width="180px">
<asp:LinkButton ID="LbClienteAsistencia" runat="server" CausesValidation="false" Text="Cliente" CommandArgument="Cliente1;1" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbClienteAsistencia" runat="server" CausesValidation="false" Text="Cliente" CommandArgument="Cliente1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgCliente1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="ImgCliente1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton></th> </asp:LinkButton>
<th width="110px"> </th>
<th style="width:110px">
<asp:LinkButton ID="LbProyectoAsistencia" runat="server" CausesValidation="false" Text="Proyecto" CommandArgument="Proyecto1;1" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbProyectoAsistencia" runat="server" CausesValidation="false" Text="Proyecto" CommandArgument="Proyecto1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="ImgProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton></th> </asp:LinkButton></th>
<th width="110px"> <th style="width:110px">
<asp:LinkButton ID="LbSubProyectoAsistencia" runat="server" CausesValidation="false" Text="Sub Proyecto" CommandArgument="SubProyecto1;1" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbSubProyectoAsistencia" runat="server" CausesValidation="false" Text="Sub Proyecto" CommandArgument="SubProyecto1;1" OnClick="LbOrden_Click">
<asp:Literal ID="ImgSubProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal ID="ImgSubProyecto1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton></th> </asp:LinkButton></th>
<th width="70px"> <th style="width:70px;">
<asp:LinkButton ID="LbTipoAsistencia" runat="server" CausesValidation="false" Text="Asistencia" CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbTipoAsistencia" runat="server" CausesValidation="false" Text="Asistencia" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th width="50px"> <th style="width:50px;">
<asp:LinkButton ID="LbPorPagoAsistencia" runat="server" CausesValidation="false" Text="% Pago" CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbPorPagoAsistencia" runat="server" CausesValidation="false" Text="% Pago" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th width="56px"> <th style="width:56px;">
<asp:LinkButton ID="LbHorasDoblesAsistencia" runat="server" CausesValidation="false" Text="Hrs Dob." CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbHorasDoblesAsistencia" runat="server" CausesValidation="false" Text="Hrs Dob." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th width="56px"> <th style="width:56px;">
<asp:LinkButton ID="LbHorasTriplesAsistencia" runat="server" CausesValidation="false" Text="Hrs Trip." CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbHorasTriplesAsistencia" runat="server" CausesValidation="false" Text="Hrs Trip." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th width="110px"> <th style="width:110px;">
<asp:LinkButton ID="LbMotivosHorasExtrasAsistencia" runat="server" CausesValidation="false" Text="Motivos H. Extras" CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbMotivosHorasExtrasAsistencia" runat="server" CausesValidation="false" Text="Motivos H. Extras" CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th width="30px"> <th style="width:30px;">
<asp:LinkButton ID="LbObservacionesAsistencia" runat="server" CausesValidation="false" Text="Obs." CommandArgument="" OnClick="LbOrden_Click"> <asp:LinkButton ID="LbObservacionesAsistencia" runat="server" CausesValidation="false" Text="Obs." CommandArgument="" OnClick="LbOrden_Click">
</asp:LinkButton>
</asp:LinkButton></th> </th>
<th style="text-align: center;" width="8px">Comandos</th> <th style="text-align: center;" width="8px">Comandos</th>
</tr> </tr>
<%--</thead>--%> <%--</thead>--%>
@@ -1986,11 +1986,8 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOFechaAsistencia2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAsistencia" Width="350px"></ajax:ValidatorCalloutExtender>
</td> </td>
<td> <td>
<ADS:Dropdownlost CssClassDdl="form-control input-sm select2me" ID="DdlClienteAsistenciaA" Width="100%" data-metodo="getcliente" runat="server" DataTextField="Nombre" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost> <ADS:Dropdownlost CssClassDdl="form-control input-sm select2me" ID="DdlClienteAsistenciaA" Width="100%" data-metodo="getcliente" runat="server" DataTextField="Nombre" DataValueField="CveCliente" UsaWebService="true" CssStyle="width: 100%;"></ADS:Dropdownlost>
<%--<asp:DropDownList Width="100%" ID="DdlClienteAsistenciaA" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 180px !important;" ValidationGroup="GrpGuardarAsistencia">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</td> </td>
<td> <td>
<asp:DropDownList Width="100%" ID="DdlProyectoAsistenciaA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardarAsistencia"> <asp:DropDownList Width="100%" ID="DdlProyectoAsistenciaA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardarAsistencia">
@@ -2022,7 +2019,8 @@
<td> <td>
<asp:TextBox CssClass="form-control input-sm" ID="TxtObservaciones" runat="server" Width="84px" MaxLength="150"></asp:TextBox></td> <asp:TextBox CssClass="form-control input-sm" ID="TxtObservaciones" runat="server" Width="84px" MaxLength="150"></asp:TextBox></td>
<td> <td>
<asp:LinkButton ID="LbGuardarAsistencia" runat="server" CausesValidation="true" CssClass=" btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarAsistencia" /></td> <asp:LinkButton ID="LbGuardarAsistencia" runat="server" CausesValidation="true" CssClass=" btn btn-primary" Text="Agregar" ValidationGroup="GrpGuardarAsistencia" />
</td>
</tr> </tr>
</table> </table>
<asp:GridView ID="GVAsistencia" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveAsistencia" ShowHeader="false" <asp:GridView ID="GVAsistencia" runat="server" AutoGenerateColumns="false" DataKeyNames="CvePersonal,CveAsistencia" ShowHeader="false"

View File

@@ -1375,32 +1375,33 @@ Partial Class RH_Personal
End Sub End Sub
Protected Sub CargaGvAsistencias(Optional Orden As String = "") Protected Sub CargaGvAsistencias(Optional Orden As String = "")
Dim objpersonal As New ClsRH Using objpersonal As New ClsRH
Dim CveCliente As Integer = DdlClienteAsistenciaC.SelectedValue.ToEntero()
If CveCliente <= 0 Then Dim CveCliente As Integer = DdlClienteAsistenciaC.SelectedValue.ToEntero()
CveCliente = -1 If CveCliente <= 0 Then
End If CveCliente = -1
If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), DdlTurno.SelectedValue.ToEntero(), -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then End If
GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL") If objpersonal.GetAsistencias(CvePersonal, CveCliente, -1, DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), DdlTurno.SelectedValue.ToEntero(), -1, txtFechaI.Text.Trim.ToDate, txtFechaF.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
Else GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL")
GVAsistencia.DataSource = Nothing Else
End If GVAsistencia.DataSource = Nothing
objpersonal.Dispose() End If
End Using
GVAsistencia.DataBind() GVAsistencia.DataBind()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
Protected Sub LbGuardarAsistencia_Click(sender As Object, e As System.EventArgs) Handles LbGuardarAsistencia.Click Protected Sub LbGuardarAsistencia_Click(sender As Object, e As System.EventArgs) Handles LbGuardarAsistencia.Click
Dim ObjPersonal As New ClsRH() Using ObjPersonal As New ClsRH()
If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasA.SelectedValue.ToEntero(), TxtFechaAsistencia.Text.Trim.ToDate, If ObjPersonal.AddAsistencia(CvePersonal, DdlClienteAsistenciaA.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasA.SelectedValue.ToEntero(), TxtFechaAsistencia.Text.Trim.ToDate,
DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble, DdlTipoAsistencias.SelectedValue.ToEntero(), TxtPorPago.Text.Trim.ToDouble, TxtHorasDobles.Text.Trim.ToDouble,
TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim, TxtHorasTriples.Text.Trim.ToDouble, DdlMotivoHoraExtra.SelectedValue.ToEntero(), TxtObservaciones.Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion) Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion)
BtnConsultarAsistencia_Click(sender, e) BtnConsultarAsistencia_Click(sender, e)
End If End If
ObjPersonal.Dispose() End Using
End Sub End Sub
Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound
@@ -1445,29 +1446,30 @@ Partial Class RH_Personal
End Sub End Sub
Protected Sub BtnGuardarAsistenciaCambios_Click(sender As Object, e As System.EventArgs) Handles BtnGuardarAsistenciaCambios.Click Protected Sub BtnGuardarAsistenciaCambios_Click(sender As Object, e As System.EventArgs) Handles BtnGuardarAsistenciaCambios.Click
Dim ObjPersonal As New ClsRH() Using ObjPersonal As New ClsRH()
ObjPersonal.IniciaTransacSQL()
Dim OcurrioError As Boolean = False
For Each Row As GridViewRow In GVAsistencia.Rows ObjPersonal.IniciaTransacSQL()
If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), DdlClienteAsistenciaC.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), Row.FCLiteral("LtlFecha").Text.Trim.ToDate, Dim OcurrioError As Boolean = False
Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(), Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim, For Each Row As GridViewRow In GVAsistencia.Rows
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero(), DdlClienteAsistenciaC.SelectedValue.ToEntero(), DdlSubProyectoAsistenciasC.SelectedValue.ToEntero(), Row.FCLiteral("LtlFecha").Text.Trim.ToDate,
OcurrioError = True Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero(), Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble,
Exit For Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero(), Row.FCTextBox("TxtObservaciones").Text.Trim,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
OcurrioError = True
Exit For
End If
Next
If OcurrioError Then
ObjPersonal.RollBack()
Alert("Ocurrió un error al guardar las Asistencias.", TipoMensaje.MsgError)
Else
ObjPersonal.Commit()
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If End If
Next
If OcurrioError Then End Using
ObjPersonal.RollBack()
Alert("Ocurrió un error al guardar las Asistencias.", TipoMensaje.MsgError)
Else
ObjPersonal.Commit()
Alert("Las Asistencias se guardaron correctamente.", TipoMensaje.MsgInformacion)
End If
ObjPersonal.Dispose()
BtnConsultarAsistencia_Click(sender, e) BtnConsultarAsistencia_Click(sender, e)
End Sub End Sub

View File

@@ -410,6 +410,12 @@