archivos elminados
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,101 +0,0 @@
|
|||||||
<%@ Page Title="Nómina - Pre Nómina" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ConceptosEspeciales.aspx.vb" Inherits="Nomina_ConceptosEspeciales" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
||||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Pre Nómina
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
|
||||||
<div class="portlet-title portlet-filterT" style="">
|
|
||||||
<div class="titlefiltros caption ">
|
|
||||||
<ul class="list-inline">
|
|
||||||
<li>Proyecto:
|
|
||||||
<asp:DropDownList ID="DdlProyecto" 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: 220px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>SubProyecto:
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Turno:
|
|
||||||
<asp:DropDownList ID="DdlTurno" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
<li>Concepto:
|
|
||||||
<asp:DropDownList ID="DdlConceptos" runat="server" AppendDataBoundItems="true" DataTextField="Concepto" DataValueField="CveConcepto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;" ValidationGroup="GrpGuardar">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<br />
|
|
||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0">
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" class="btn btn-primary" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Empleados con los filtros especificados" ToolTip="Conceptos Especiales" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Código</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("Codigo") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="250px" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Nombre</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="250px" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Aplica</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:CheckBox ID="ChkAplica" runat="server" />
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="250px" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField>
|
|
||||||
<HeaderTemplate>Importe</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtImporte" runat="server" Text='<%# Eval("Importe") %>'></asp:TextBox>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="250px" />
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
<RowStyle CssClass="Texto" />
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:GridView>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
Option Strict On
|
|
||||||
Option Explicit On
|
|
||||||
|
|
||||||
Imports Extensiones
|
|
||||||
Imports System.Data
|
|
||||||
|
|
||||||
Partial Class Nomina_ConceptosEspeciales
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
CargaProyecto()
|
|
||||||
CargaTurnos()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "CargaCombos"
|
|
||||||
|
|
||||||
Private Sub CargaConceptos()
|
|
||||||
DdlConceptos.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa)
|
|
||||||
DdlConceptos.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaProyecto()
|
|
||||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
|
|
||||||
DdlProyecto.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSubProyecto()
|
|
||||||
DdlSubProyecto.Items.Clear()
|
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
|
||||||
DdlSubProyecto.DataBind()
|
|
||||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaTurnos()
|
|
||||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
DdlTurno.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
|
||||||
CargaSubProyecto()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub DdlTipoPeriodo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoPeriodo.SelectedIndexChanged
|
|
||||||
' CargaPeriodos()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
|
||||||
'If DdlPeriodo.SelectedValue <> "-1" Then
|
|
||||||
' Dim ObjNomina As New ClsRH
|
|
||||||
|
|
||||||
' Dim FechaI, FechaF As Date
|
|
||||||
' FechaI = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue).Rows(0)("FechaInicio").ToString.ToDate
|
|
||||||
' FechaF = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue).Rows(0)("FechaFin").ToString.ToDate
|
|
||||||
|
|
||||||
' If ObjNomina.GetPreNomina(DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, FechaI, FechaF, UsuarioActual.CveEmpresa) Then
|
|
||||||
' GvDatos.DataSource = ObjNomina.DtResultados
|
|
||||||
' Else
|
|
||||||
' GvDatos.DataSource = Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjNomina.Dispose()
|
|
||||||
|
|
||||||
' GvDatos.DataBind()
|
|
||||||
' UPDatos.Update()
|
|
||||||
'Else
|
|
||||||
' Alert("Debe de seleccionar el Período con el que se desea trabajar", TipoMensaje.MsgAdvertencia)
|
|
||||||
'End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
|
|
||||||
If e.Row.DBCampo("Turno") = "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
|
||||||
e.Row.FCLiteral("LtlNombre").Text = "Sub Proyecto: " & e.Row.DBCampo("SubProyecto")
|
|
||||||
'e.Row.Cells(0).ColumnSpan = 22
|
|
||||||
e.Row.HorizontalAlign = HorizontalAlign.Left
|
|
||||||
ElseIf e.Row.DBCampo("Turno") <> "" AndAlso e.Row.DBCampo("Nombre") = "" Then
|
|
||||||
e.Row.FCLiteral("LtlNombre").Text = "Turno: " & e.Row.DBCampo("Turno")
|
|
||||||
'e.Row.Cells(0).ColumnSpan = 22
|
|
||||||
e.Row.HorizontalAlign = HorizontalAlign.Left
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
|
|
||||||
GvDatos.ExportToExcel("ConceptosEspeciales")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click
|
|
||||||
Dim ObjPersonal As New ClsRH
|
|
||||||
ObjPersonal.IniciaTransacSQL()
|
|
||||||
|
|
||||||
Dim OcurrioError As Boolean = False
|
|
||||||
For Each Row As GridViewRow In GvDatos.Rows
|
|
||||||
If Row.DataKey("CvePersonal") <> "" Then
|
|
||||||
If Not ObjPersonal.UpdatePersonalMasivo(Row.FCDropDownList("DdlTurno").SelectedValue.ToEntero, Row.FCDropDownList("DdlGVSubProyecto").SelectedValue.ToEntero, Row.FCDropDownList("DdlSupervisor").SelectedValue.ToEntero,
|
|
||||||
Row.FCTextBox("TxtSalarioDiario").Text.ToDouble, Row.FCTextBox("TxtSDI").Text.ToDouble, Row.FCTextBox("TxtSalarioCotizado").Text.ToDouble,
|
|
||||||
Row.DataKey("CvePersonal").ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
OcurrioError = True
|
|
||||||
ObjPersonal.RollBack()
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If Not OcurrioError Then
|
|
||||||
ObjPersonal.Commit()
|
|
||||||
Alert("La información se guardó correctamente.", TipoMensaje.MsgInformacion)
|
|
||||||
Else
|
|
||||||
Alert("Ocurrió un error al guardar la información.", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjPersonal.Dispose()
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
Reference in New Issue
Block a user