Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegistroRevision.aspx.vb" Inherits="AF_RegistroRevision" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RegistroRevision.aspx.vb" Inherits="AF_RegistroRevision" EnableEventValidation = "false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -40,33 +40,25 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<%-- <asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregarAF" runat="server" PostBackUrl="~/AF/AF.aspx">
|
||||
<i class="fa fa-plus"></i> Nuevo Activo Fijo
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LinkPDF" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server">
|
||||
<i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel
|
||||
</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
<asp:PostBackTrigger ControlID="LinkPDF" />
|
||||
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:UpdatePanel> --%>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Activos Fijos
|
||||
Registro Revisión
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -75,12 +67,70 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase"><asp:Label runat="server" ID="LblSubProyecto2"></asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha Inicio Contrato: </label>
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicioContrato" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioContrato" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MEEFechaInicioContrato" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaInicioContrato" TargetControlID="TxtFecha" PopupButtonID="ImgFechaInicioContrato" PopupPosition="BottomRight" BehaviorID="_content_CEFechaInicioContrato"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaInicioContrato" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaInicioContrato" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio Contrato''</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>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%-- <div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT portletfiltrostitlee">
|
||||
<div class="tools">
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Filtrar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
@@ -90,26 +140,16 @@
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1"><asp:Label runat="server" ID="LblSubProyecto"></asp:Label></div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
|
||||
</div>
|
||||
<div class="col-md-1">Fecha:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label AssociatedControlID="TxtFecha" runat="server" Text="Fecha de Nacimiento:"></asp:Label>
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CausesValidation="true" CssClass="form-control input-sm"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaNacimiento" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaNacimiento" TargetControlID="TxtFecha" PopupButtonID="ImgFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCosulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCosulta"></asp:CompareValidator>--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -121,86 +161,218 @@
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpGV" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se Encontró Activo Fijo Registrado" ToolTip="Listado de Activos Fijos" CssClass="table table-smallpadding Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemStyle Width="70px" />
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CveActivoFijo", "/AF/AF.aspx?CveActivoFijo={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo Act. Fijo">
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoActivoFijo" runat="server" Text='<%# Eval("TipoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sub Tipo Act. Fijo">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTIpoActivoFijo" runat="server" Text='<%# Eval("SubTIpoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Responsable">
|
||||
<ItemStyle Width="105px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlResponsable" runat="server" Text='<%# Eval("Responsable")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="No. Serie">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNoSerie" runat="server" Text='<%# Eval("NoSerie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Año" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAño" runat="server" Text='<%# Eval("Año")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="50px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstadoActivoFijo" runat="server" Text='<%# Eval("EstadoActivoFijo")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemStyle Width="80px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="Listado de metricas" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveActivoFijo,Unidad,CvePersonaResponsable"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<%--<asp:TemplateField HeaderText="SubProyecto" >
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Unidad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica1" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica2" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica3" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica4" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica5" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica6" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica7" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica8" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica9" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica10" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica11" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica12" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica13" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica14" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField >
|
||||
<ItemStyle Width="90px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtMetrica15" runat="server"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Operador">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DDLPersonal" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Nombre" DataValueField="CvePersonal"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px" HeaderText="Opciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarMetricaValor" OnClick="LnkEliminarMetricaValor_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<div id="ModalDescargaReporte" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpModalTitleModalDescargaReporte" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlModalTitleModalDescargaReporte" runat="server">Descarga reporte </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalCuerpoModalDescargaReporte" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<p>Metricas guardadas correctamente.</p>
|
||||
<asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click">
|
||||
<i class="fa fa-arrow-down" style="font-weight:bold;"></i> Descarga Reporte Excel</asp:LinkButton>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="false" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -1,58 +1,166 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_RegistroRevision
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_RegistroRevision
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
#End Region
|
||||
Property DT_Cabeceras As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Cabeceras") Is Nothing Then
|
||||
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Cabeceras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DT_Datos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Datos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Datos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Datos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property ReporteBytes As Byte()
|
||||
Get
|
||||
If ViewState("ReporteBytes") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(ViewState("ReporteBytes"), Byte())
|
||||
End If
|
||||
End Get
|
||||
Set(value As Byte())
|
||||
ViewState("ReporteBytes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
TxtFecha.Text = $"{Now.Day.ToString("00")}/{Now.Month.ToString("00")}/{Now.Year}"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
LblSubProyecto2.Text = LblSubProyecto.Text
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
#Region " CARGA DATOS "
|
||||
'Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
' CargaDatos()
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetMetricasRegistro(DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtFecha.Text.ToDate) Then
|
||||
DT_Cabeceras = ObjAF.DSResultados.Tables(0)
|
||||
DT_Datos = ObjAF.DSResultados.Tables(1)
|
||||
|
||||
|
||||
If DT_Cabeceras.Rows.Count > 0 AndAlso DT_Datos.Rows.Count > 0 Then
|
||||
BtnGuardar.Visible = True
|
||||
Else
|
||||
BtnGuardar.Visible = False
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
End If
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
BtnGuardar.Visible = False
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
If DT_Datos.Rows.Count > 0 Then
|
||||
CargaTablas()
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTablas()
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 15
|
||||
GvDatos.Columns(IDX_LIMPIAR).HeaderText = ""
|
||||
GvDatos.Columns(IDX_LIMPIAR).Visible = False
|
||||
Next
|
||||
|
||||
Dim x As Integer = 0
|
||||
Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
|
||||
|
||||
|
||||
For x = 0 To limite
|
||||
GvDatos.Columns(x + 1).HeaderText = DT_Cabeceras.Rows(x)("Metrica").ToString
|
||||
GvDatos.Columns(x + 1).Visible = True
|
||||
Next x
|
||||
|
||||
|
||||
GvDatos.DataSource = DT_Datos
|
||||
GvDatos.DataBind()
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -60,15 +168,270 @@ Partial Class AF_RegistroRevision
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.FCDropDownList("DdlPersonal").DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1")
|
||||
e.Row.FCDropDownList("DdlPersonal").DataBind()
|
||||
e.Row.FCDropDownList("DdlPersonal").Items.Insert(0, New ListItem("Selecione uno", "-1"))
|
||||
|
||||
e.Row.FCDropDownList("DdlPersonal").SelectedValueExist(e.Row.DataKey("CvePersonaResponsable"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
CargaDatos()
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim DdlPersonal As DropDownList = GvRow.FCDropDownList("DdlPersonal")
|
||||
|
||||
If DdlPersonal.SelectedValue.ToEntero <= 0 Then
|
||||
Alert($"unidad: {GvRow.DataKey("Unidad")} require personal", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If ObjAF.AddMetricasValores(GvRow.DataKey("CveActivoFijo").ToEntero, DdlPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim CveMetricaValor As Integer = ObjAF.CveMetricaValor
|
||||
Dim x As Integer = 0
|
||||
|
||||
For x = 0 To limite
|
||||
Dim valor As String = GvRow.FCTextBox($"TxtMetrica{x + 1}").Text
|
||||
|
||||
valor = If(valor.Trim.Length = 0, "0", valor)
|
||||
If ObjAF.AddMetricasValoresDetalle(CveMetricaValor, DT_Cabeceras(x)("CveMetrica").ToString.ToEntero, valor) Then
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
Next x
|
||||
|
||||
If ErrorProceso Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
|
||||
ObjAF.Commit()
|
||||
ExportToExcelG(GvDatos, $"RegistroRevision{Now.ToString("yyyyMMddmmss")}", UsuarioActual, "ReporteRevision", 100, 100, filtros:=$"Filtros {LblSubProyecto.Text}: {DdlSubProyecto.SelectedItem.Text} Fecha: {TxtFecha.Text}")
|
||||
RegistraScript("$('#ModalDescargaReporte').modal({ backdrop: 'static', keyboard: false });")
|
||||
GvDatos.DataSource = Nothing
|
||||
GvDatos.DataBind()
|
||||
|
||||
BtnGuardar.Visible = False
|
||||
|
||||
UpDatos.Update()
|
||||
UpGuardar.Update()
|
||||
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
Public Sub ExportToExcelG(Gv1 As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100, Optional filtros As String = "")
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In Gv1.Rows
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
For IDX_LIMPIAR = 1 To 15
|
||||
GvRow.Cells(IDX_LIMPIAR).Text = GvRow.FCTextBox($"TxtMetrica{IDX_LIMPIAR}").Text
|
||||
Next
|
||||
|
||||
If GvRow.FCDropDownList("DDLPersonal").SelectedValue.ToEntero > 0 Then
|
||||
GvRow.Cells(16).Text = GvRow.FCDropDownList("DDLPersonal").SelectedItem.Text
|
||||
Else
|
||||
GvRow.Cells(16).Text = ""
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
Gv1.RenderControl(htw1)
|
||||
|
||||
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
|
||||
|
||||
htmlStream1.Position = 0
|
||||
Dim sr1 As New StreamReader(htmlStream1)
|
||||
Dim myStr1 = sr1.ReadToEnd()
|
||||
|
||||
sr1.Dispose()
|
||||
htmlStream1.Dispose()
|
||||
sw1.Dispose()
|
||||
|
||||
Dim HtmlCompleto As String = myStr1
|
||||
|
||||
|
||||
HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
|
||||
|
||||
Dim asd As String = ""
|
||||
|
||||
|
||||
Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet())
|
||||
|
||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
|
||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim TotalRowHeader As Integer = 8
|
||||
Dim TotalRowFooter As Integer = 2
|
||||
|
||||
Dim worksheet = excel.Worksheets(0)
|
||||
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||
RangoNombreEmpresa.Merged = True
|
||||
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex)
|
||||
RangoFiltros.Merged = True
|
||||
RangoFiltros.Value = filtros
|
||||
RangoFiltros.Style.Font.Size = 15 * 20
|
||||
RangoFiltros.Style.Font.Name = "Calibri Light"
|
||||
RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
RangoTitulo.Merged = True
|
||||
RangoTitulo.Value = Titulo
|
||||
RangoTitulo.Style.Font.Size = 20 * 20
|
||||
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
|
||||
|
||||
|
||||
If i > 0 Then
|
||||
Try
|
||||
worksheet.Columns(i).AutoFit(1)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Dim IndexEndTable As Integer = Gv1.Rows.Count + 4 + TotalRowHeader + TotalRowFooter
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(0).Value = "Usuario Imprimió"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(0).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(2).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(2).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
If Imagen.Exists Then
|
||||
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||
Using sr As New StreamReader(Ruta)
|
||||
Dim ms As New MemoryStream()
|
||||
sr.BaseStream.CopyTo(ms)
|
||||
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||
End Using
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim memoryStream As New MemoryStream()
|
||||
excel.Save(memoryStream, SaveOptions.XlsxDefault)
|
||||
ReporteBytes = memoryStream.ToArray()
|
||||
memoryStream.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Response.ContentType = "application/force-download"
|
||||
Response.AppendHeader("Content-Disposition", $"attachment;filename=RegistroRevision{Now.ToString("yyyyMMddmmss")}.xlsx")
|
||||
Response.BinaryWrite(ReporteBytes)
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -100,11 +100,11 @@
|
||||
<div class="titlefiltros caption text-size-12 ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 ">Tipo:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoActivo" CssClass="form-control input-sm select2me Widthall" runat="server" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" OnSelectedIndexChanged="BtnFiltrar_Click1" AutoPostBack="True"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">SubTipo:</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubTipoActivo" CssClass="form-control input-sm select2me Widthall" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" OnSelectedIndexChanged="BtnFiltrar_Click1" AutoPostBack="True"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Agrupador:</div>
|
||||
|
||||
@@ -38,16 +38,16 @@ Partial Class AF_RepAF
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaFiltros()
|
||||
'CargaDatos()
|
||||
|
||||
If UsuarioActual.Empresa.GralSoloProyecto Then
|
||||
DivProyecto.Visible = False
|
||||
CargaFiltros()
|
||||
'CargaDatos()
|
||||
|
||||
' If UsuarioActual.Empresa.GralSoloProyecto Then
|
||||
DivProyecto.Visible = False
|
||||
LblSubProyecto.Text = "Proyecto: "
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
' End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
250
AF/RepRevision.aspx
Normal file
250
AF/RepRevision.aspx
Normal file
@@ -0,0 +1,250 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRevision.aspx.vb" Inherits="AF_RepRevision" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregarAF" runat="server" PostBackUrl="~/AF/AF.aspx">
|
||||
<i class="fa fa-plus"></i> Nuevo Activo Fijo
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LinkPDF" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server">
|
||||
<i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
<asp:PostBackTrigger ControlID="LinkPDF" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte Revisión
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;" >
|
||||
<div class="tools" >
|
||||
<asp:UpdatePanel runat="server" style="display: inline-block;">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnFiltrar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnFiltrar_Click" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
|
||||
<div class="row" style="width:100%">
|
||||
|
||||
|
||||
<div class="col-md-1"><asp:Label runat="server" ID="LblSubProyecto"></asp:Label></div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 ">Tipo:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoActivo" CssClass="form-control input-sm select2me Widthall" runat="server" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" OnSelectedIndexChanged="DdlTipoActivo_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">SubTipo:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubTipoActivo" CssClass="form-control input-sm select2me Widthall" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" >
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha I:</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="80"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCosulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCosulta"></asp:CompareValidator>--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1">Fecha F:</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
|
||||
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style="padding: 5px 0px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CausesValidation="true" CssClass="form-control input-sm" Width="80"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFinal" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpCosulta"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaNacimiento" runat="server" ControlToValidate="TxtFecha" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpCosulta"></asp:CompareValidator>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="Listado de metricas" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveMetricaValor"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemStyle Width="140px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Unidad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="100px" />
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Operador">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOperador" runat="server" Text='<%# Eval("Operador")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("usuario")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="110px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px" HeaderText="Opciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarMetricaValor" OnClick="LnkEliminarMetricaValor_Click" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
183
AF/RepRevision.aspx.vb
Normal file
183
AF/RepRevision.aspx.vb
Normal file
@@ -0,0 +1,183 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_RepRevision
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property DT_Cabeceras As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Cabeceras") Is Nothing Then
|
||||
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Cabeceras"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Cabeceras") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property DT_Datos As DataTable
|
||||
Get
|
||||
|
||||
If ViewState("DT_Datos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DT_Datos"), DataTable)
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_Datos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
|
||||
Dim FechaActual As Date = Now
|
||||
|
||||
|
||||
TxtFechaF.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
FechaActual = FechaActual.AddDays(-30)
|
||||
TxtFechaI.Text = $"{FechaActual.Day.ToString("00")}/{FechaActual.Month.ToString("00")}/{FechaActual.Year}"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivo.DataBind()
|
||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetMetricasValores(-1, -1, -1, -1, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DT_Cabeceras = ObjAF.DSResultados.Tables(0)
|
||||
DT_Datos = ObjAF.DSResultados.Tables(1)
|
||||
|
||||
'GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
'GvDatos.DataBind()
|
||||
'UpDatos.Update()
|
||||
|
||||
If DT_Datos.Rows.Count > 0 Then
|
||||
CargaTablas()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTablas()
|
||||
|
||||
Dim IDX_LIMPIAR As Integer = 1
|
||||
|
||||
'5
|
||||
For IDX_LIMPIAR = 2 To 16
|
||||
CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
|
||||
CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
|
||||
GvDatos.Columns(IDX_LIMPIAR).Visible = False
|
||||
Next
|
||||
|
||||
Dim x As Integer = 0
|
||||
Dim limite As Integer = DT_Cabeceras.Rows.Count - 1
|
||||
|
||||
|
||||
For x = 0 To limite
|
||||
CType(GvDatos.Columns(x + 2), BoundField).DataField = DT_Datos.Columns(5 + x).ColumnName
|
||||
CType(GvDatos.Columns(x + 2), BoundField).HeaderText = DT_Cabeceras.Rows(x)("Metrica").ToString
|
||||
GvDatos.Columns(x + 2).Visible = True
|
||||
Next x
|
||||
|
||||
GvDatos.DataSource = DT_Datos
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatos.Update()
|
||||
'For IDX_LIMPIAR = 2 To 17
|
||||
'CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
|
||||
'CType(GvDatos.Columns(IDX_LIMPIAR), BoundField).HeaderText = DT_Cabeceras.Rows()
|
||||
'Next
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DdlSubTipoActivo.Items.Clear()
|
||||
DdlSubTipoActivo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoActivo.SelectedValue), "SubTipoActivoFijo")
|
||||
DdlSubTipoActivo.DataBind()
|
||||
DdlSubTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
UpFiltro.Update()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -17,18 +17,28 @@ Public Class ClsAF
|
||||
Private SqlCommand As SqlCommand
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private DSet As New DataSet
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'REGISTRAR CONEXIÓN
|
||||
Private CveConexion As Integer = 0
|
||||
Private EsTransaccionCompartida As Boolean = False
|
||||
Private EsTransaccionCompartida As Boolean = False
|
||||
|
||||
Public CveMetricaValor As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
DtResultados = Data
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DSResultados() As DataSet
|
||||
Get
|
||||
DSResultados = DSet
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CveActivoFijo As Integer
|
||||
@@ -3239,9 +3249,10 @@ Public Class ClsAF
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
#Region "M E T R I C A S"
|
||||
|
||||
Public Function GetMetricas(CveMetrica As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3296,11 +3307,35 @@ Public Class ClsAF
|
||||
OnError("Ocurrió un error al agregar la métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function GetMetricasRegistro(CveSubProyecto As Integer, CveEmpresa As Integer, Fecha As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_MetricasRegistroGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(DSet)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetMetricasValores(Optional CveMetricaValor As Integer = -1, Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
|
||||
|
||||
Public Function GetMetricasValores(CveMetricaValor As Integer, CveAF As Integer, CvePersonal As Integer, CveUsuario As Integer, CveSubProyecto As Integer, CveTipoActivoFijo As Integer, CveSubTipoActivoFijo As Integer, FechaI As Date, FechaF As Date,
|
||||
CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_MetricasValoresGet")
|
||||
@@ -3311,12 +3346,15 @@ Public Class ClsAF
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
.Add("@CveTipoActivoFijo", SqlDbType.Int).Value = CveTipoActivoFijo
|
||||
.Add("@CveSubTipoActivoFijo", SqlDbType.Int).Value = CveSubTipoActivoFijo
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
SqlAdapter.Fill(DSet)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los valores de métricas de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -3325,9 +3363,9 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddMetricasValores(Optional CveAF As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveUsuario As Integer = -1,
|
||||
Optional CveSubProyecto As Integer = -1, Optional Fecha As String = "1900-01-01", Optional FechaIng As String = "1900-01-01") As Boolean
|
||||
Public Function AddMetricasValores(CveAF As Integer, CvePersonal As Integer, CveUsuario As Integer, CveSubProyecto As Integer, Fecha As Date, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
CveMetricaValor = -1
|
||||
|
||||
DataAdapter("PA_AF_MetricasValoresAdd")
|
||||
|
||||
@@ -3336,12 +3374,16 @@ Public Class ClsAF
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveMetricaValor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
CveMetricaValor = SqlAdapter.SelectCommand.Parameters("@CveMetricaValor").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el valor de métrica de Activo Fijo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -3370,7 +3412,7 @@ Public Class ClsAF
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetMetricasValoresDetalle(Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1) As Boolean
|
||||
Public Function GetMetricasValoresDetalle(CveEmpresa As Integer, Optional CveMetricaValor As Integer = -1, Optional CveMetrica As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_AF_MetricasValoresDetalleGet")
|
||||
@@ -3378,6 +3420,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
|
||||
.Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3398,7 +3441,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
|
||||
.Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
|
||||
.Add("@Valor", SqlDbType.NVarChar).Value = Valor
|
||||
.Add("@Valor", SqlDbType.VarChar).Value = Valor
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3419,7 +3462,7 @@ Public Class ClsAF
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMetricaValor", SqlDbType.Int).Value = CveMetricaValor
|
||||
.Add("@CveMetrica", SqlDbType.Int).Value = CveMetrica
|
||||
.Add("@Valor", SqlDbType.NVarChar).Value = Valor
|
||||
.Add("@Valor", SqlDbType.VarChar).Value = Valor
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -3951,6 +3951,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/AF/RepDepreciacion.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/AF/RepEventosProgramados.aspx".ToUpper(), 656)
|
||||
PaginaDict.Add("/AF/RegistroRevision.aspx".ToUpper(), 1251)
|
||||
PaginaDict.Add("/AF/RepRevision.aspx".ToUpper(), 1252)
|
||||
#End Region
|
||||
'AIMMGM
|
||||
#Region "AIMMGM"
|
||||
|
||||
@@ -4157,12 +4157,22 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch exs As SqlException
|
||||
If exs.ErrorCode = -2146232060 Then
|
||||
Catch exs As SqlException
|
||||
|
||||
|
||||
If exs.Message.Contains("Número: 547;") Then
|
||||
OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'If exs.ErrorCode = -2146232060 Then
|
||||
' OnError("Ocurrió al Eliminar el Tema Existen registros relacionadados.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'Else
|
||||
' OnError("Ocurrió al Eliminar el Tema TemasRemove.", exs, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió al Eliminar el Tema TemasRemove.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
@@ -6859,25 +6869,26 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
OnError("Ocurrió un error al obtener los pagos de factura de personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Public msgsError As New StringBuilder()
|
||||
Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
msgsError.AppendLine(Mensaje)
|
||||
msgsError.Append("<br/>")
|
||||
'Alert(Obj, Mensaje, TipoMensaje.MsgError)
|
||||
'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
End Sub
|
||||
|
||||
|
||||
'Public msgsError As New StringBuilder()
|
||||
'Public Sub OnError(Mensaje As String, Exeption As Exception, Optional InfoAdicional As String = "")
|
||||
' GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
' msgsError.AppendLine(Mensaje)
|
||||
' msgsError.Append("<br/>")
|
||||
' 'Alert(Obj, Mensaje, TipoMensaje.MsgError)
|
||||
' 'If WebConfigurationManager.AppSettings("SiteName") IsNot Nothing AndAlso WebConfigurationManager.AppSettings("SiteName").ToString = "1" Then MandaCorreoError(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", Mensaje, Exeption.ToString, vbCrLf, InfoAdicional))
|
||||
'End Sub
|
||||
|
||||
#Region " IDisposable Support "
|
||||
' IDisposable
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
If msgsError.ToString().Length > 0 Then
|
||||
Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
||||
End If
|
||||
'If msgsError.ToString().Length > 0 Then
|
||||
' Alert(msgsError.ToString(), TipoMensaje.MsgError)
|
||||
'End If
|
||||
If Not disposedValue Then
|
||||
If disposing Then
|
||||
' TODO: Liberar otro estado (objetos administrados).
|
||||
|
||||
@@ -240,20 +240,12 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
||||
TotalActualMes = 0
|
||||
TotalAnteriorMes = 0
|
||||
|
||||
'TotalActualMes = 0
|
||||
'TotalAnteriorMes = 0
|
||||
|
||||
'TxtFechaInicio.Text = DateSerial(Year(Date.Now), 1, 1).ToShortDateString
|
||||
'TxtFechaFin.Text = Date.Now.ToShortDateString
|
||||
CargaEjercicios()
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubproyecto, Nothing, LblSubProyecto)
|
||||
TabSubProyecto.HeaderText = LblSubProyecto.Text & " H."
|
||||
|
||||
'DdlSubproyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
'DdlSubproyecto.DataBind()
|
||||
|
||||
' CargaDatos()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
|
||||
ValidaEjercicios()
|
||||
|
||||
@@ -119,68 +119,66 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Almacén Origen:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacenOrigen_SelectedIndexChanged" AutoPostBack ="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenOrigen" Width="150px" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacenOrigen_SelectedIndexChanged" AutoPostBack="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlAlmacenOrigen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Origen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenOrigen" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-3">Almacén Destino:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlAlmacenDestino" OnSelectedIndexChanged="DdlAlmacenDestino_SelectedIndexChanged" AutoPostBack="true" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server" ></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenDestino" OnSelectedIndexChanged="DdlAlmacenDestino_SelectedIndexChanged" AutoPostBack="true" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm input-small select2me" Width="150px" runat="server"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacenDestino" runat="server" ControlToValidate="DdlAlmacenDestino" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen Destino''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAlmacenDestino" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacenDestino" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" style="padding-top: 8px;">
|
||||
<label class="col-md-2">Observaciones:</label>
|
||||
<div class="col-md-5">
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" runat="server" Width="300px"></asp:TextBox>
|
||||
<div class="col-md-10">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control " TextMode="MultiLine" Rows="3" runat="server" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" style="padding-top: 8px;">
|
||||
<label class="col-md-2">Transitorio:</label>
|
||||
<div class="col-md-3" style="padding-left: 0px;">
|
||||
<div class="col-md-3" style="padding-left: 7px;">
|
||||
<asp:CheckBox ID="ChkTransitorio" AutoPostBack="true" OnCheckedChanged="ChkTransitorio_CheckedChanged" CssClass="md-checksd" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivTransitorio" style="display: none;">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2" id="divResponsable" runat="server">
|
||||
<asp:Label class="col-md-2" id="LblResponsable" runat="server" Text="Responsable:"></asp:Label>
|
||||
<asp:TextBox runat="server" Text="" ID="TxtResponsable" Width="100px" />
|
||||
</div>
|
||||
|
||||
<asp:Label AssociatedControlID="TxtResponsable" ID="LblResponsable" runat="server" Text="Responsable:" CssClass="col-md-2"></asp:Label>
|
||||
<asp:Panel CssClass="col-md-2" ID="divResponsable" runat="server">
|
||||
<asp:TextBox runat="server" Text="" CssClass="form-control" ID="TxtResponsable" />
|
||||
</asp:Panel>
|
||||
|
||||
<label class="col-md-2">Almacen Transitorio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div id="DivEmitirTimbrado" runat="server" visible="false">
|
||||
<div class="col-md-4">
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="md-checksd" Text="Emitir Timbrado" />
|
||||
</div>
|
||||
<asp:DropDownList ID="DdlAlmacenTransitorio" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label AssociatedControlID="ChkEmitirTimbrado" runat="server" Text="Emitir Timbrado:" ID="LblEmitirTimbrado" CssClass="col-md-2 " Visible="false"></asp:Label>
|
||||
<asp:Panel id="DivEmitirTimbrado" runat="server" Visible="false" class="col-md-2">
|
||||
<asp:CheckBox ID="ChkEmitirTimbrado" runat="server" CssClass="chksino" Text=" " />
|
||||
</asp:Panel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivGastoIndirecto" style="display: none;" class="rowpadding">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2" id="divGastoIndirecto" runat="server">
|
||||
<label class="col-md-2" id="LblGastoIndirecto" runat="server">Gasto Indirecto:</label>
|
||||
<asp:TextBox runat="server" Text="" ID="TxtGastoIndirecto" Width="100px" />
|
||||
</div>
|
||||
<label class="col-md-1">Chofer:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Style="width: 150px !important;"></asp:DropDownList>
|
||||
|
||||
<asp:Label AssociatedControlID="TxtGastoIndirecto" Visible="false" id="LblGastoIndirecto" runat="server" Text="Gasto Indirecto:" CssClass="col-md-2"></asp:Label>
|
||||
<div class="col-md-2" id="divGastoIndirecto" Visible="false" runat="server">
|
||||
<asp:TextBox runat="server" Text="" CssClass="form-control" ID="TxtGastoIndirecto" />
|
||||
</div>
|
||||
<label class="col-md-1">F. Entrega:</label>
|
||||
<div class="col-md-3" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
<label class="col-md-2">Chofer:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlChofer" runat="server" DataTextField="Chofer" DataValueField="CveChofer" OnSelectedIndexChanged="DldChofer_SelectedIndexChanged" AutoPostBack="true" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-2">F. Entrega:</label>
|
||||
<div class="col-md-2" style="padding-left: 5px; padding-top: 0px;">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 125px !important;">
|
||||
<asp:TextBox ID="TxtFechaEntrega" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Width="80px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaEntrega" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
@@ -190,23 +188,25 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1">Unidad:</label>
|
||||
<asp:HyperLink runat="server" ID="HplNuevaUnidad" NavigateUrl="#" data-toggle="modal" data-target="#DivAgregarNuevoCamion"><label class="col-md-1"><i class='fa fa-plus-square'></i></label></asp:HyperLink>
|
||||
<label class="col-md-1">Unidad:</label>
|
||||
<div class="col-md-1 ">
|
||||
<asp:HyperLink runat="server" ID="HplNuevaUnidad" CssClass ="btn btn-sm btn-primary" NavigateUrl="#" data-toggle="modal" data-target="#DivAgregarNuevoCamion"><i class='fa fa-plus'></i></asp:HyperLink>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" AppendDataBoundItems ="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList>
|
||||
<asp:DropDownList runat="server" ID="DdlUnidadCamion" AutoPostBack="true" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" DataValueField="CveCamion" DataTextField="Placa"></asp:DropDownList>
|
||||
</div>
|
||||
<div id="divPlacaEspecificacion" runat="server">
|
||||
<label class="col-md-1">Placa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtPlaca" Width="100px" />
|
||||
</div>
|
||||
<label class="col-md-3">Especificación de la Unidad:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtEspecifUnidad" Width="100px" />
|
||||
</div>
|
||||
<label class="col-md-2">Placa:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtPlaca" CssClass="form-control" />
|
||||
</div>
|
||||
<label class="col-md-2">Especificación de la Unidad:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox runat="server" Text="" ID="TxtEspecifUnidad" CssClass="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -380,7 +380,7 @@
|
||||
<th style="width: 88px" runat="server" id="ThSerie" visible="false">Serie</th>
|
||||
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
|
||||
<th style="width: 88px" runat="server" id="ThFechaCaducidad" visible="false">Caducidad</th>
|
||||
|
||||
|
||||
<th width="160px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -416,12 +416,12 @@
|
||||
<asp:TextBox ID="TxtnObservaciones" CssClass="form-control input-sm" runat="server" Width="100px"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="TdSeccionAlmacen" visible="false">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
Destino:<asp:DropDownList ID="DdlSeccionAlmacenDestino" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
Destino:<asp:DropDownList ID="DdlSeccionAlmacenDestino" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td runat="server" id="TdSerie" visible="false">
|
||||
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
||||
@@ -661,12 +661,11 @@
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -739,7 +738,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--CARGA EXCEL--%>
|
||||
<div id="DivCargaExcelConceptos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
@@ -787,38 +786,38 @@
|
||||
</div>
|
||||
</div>
|
||||
<%--Modal para agregar camion--%>
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="DivAgregarNuevoCamion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Unidad</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Placa: </label>
|
||||
<asp:TextBox ID="TxtPlacaNuevo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="VgNuevoCamion"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="VgNuevoCamion"></asp:RegularExpressionValidator>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Especificación: </label>
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div id="DivAgregarNuevoCamion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Unidad</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Placa: </label>
|
||||
<asp:TextBox ID="TxtPlacaNuevo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtPlacaNuevo" ControlToValidate="TxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> es necesario, por favor ingréselo." ValidationGroup="VgNuevoCamion"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator runat="server" ID="RevTxtPlacaNuevo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Placa''</b> no contiene los caracteres suficientes." ControlToValidate="TxtPlacaNuevo" ValidationExpression="^.{6,8}$" ValidationGroup="VgNuevoCamion"></asp:RegularExpressionValidator>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label>Especificación: </label>
|
||||
<asp:TextBox ID="TxtEspecificacionNuevo" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAgregarCamion" Text="Agregar" runat="server" ClientIDMode="Static" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
@@ -185,7 +185,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divGastoIndirecto.Visible = False
|
||||
LblGastoIndirecto.Visible = False
|
||||
divResponsable.Visible = False
|
||||
LblResponsable.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
@@ -204,7 +206,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
If ChkTransitorio.Checked Then RegistraScript("$('#DivTransitorio').show(0);$('#DivGastoIndirecto').show(0);$('#DivDocChofer').show(0);")
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then DivEmitirTimbrado.Visible = True
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 119) Then
|
||||
DivEmitirTimbrado.Visible = True
|
||||
LblEmitirTimbrado.Visible = True
|
||||
End If
|
||||
|
||||
CantidadTotal = 0
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ Partial Class LogIn
|
||||
userm.Nombre = Usuario.Nombre
|
||||
userm.Contraseña = Usuario.Contraseña
|
||||
userm.CvePerfil = Usuario.CveRol
|
||||
userm.CveEmpresa = 1 'Usuario.CveEmpresa
|
||||
userm.CveEmpresa = 119 'Usuario.CveEmpresa
|
||||
userm.CveUsuarioModifico = Usuario.CveEmpresa
|
||||
userm.CveUsuarioRegistro = Usuario.CveEmpresa
|
||||
RegistraScript(String.Format("opennewlocation('{0}','{1}')", ReturnUrl, GenerateJSONWebToken(userm)))
|
||||
|
||||
@@ -101,9 +101,8 @@ Partial Class RH_CatCursosTemas
|
||||
If objRH.TemasRemove(CveTema) Then
|
||||
CargadatosGvTemas()
|
||||
LoadComboTemas()
|
||||
Alert("Tema elimino correctamente ", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al eliminar el tema", TipoMensaje.MsgError)
|
||||
Alert("Tema elimino correctamente ", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -179,9 +178,8 @@ Partial Class RH_CatCursosTemas
|
||||
|
||||
If objRH.SubtemaRemove(CveTema) Then
|
||||
CargadatosGvTemas()
|
||||
Alert("Subtema Elimino Correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrio un error al Eliminar el Subtema.", TipoMensaje.MsgError)
|
||||
Alert("Subtema Elimino Correctamente.", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
LoadComboTemas()
|
||||
CargadatosGvSubtemas()
|
||||
|
||||
@@ -1576,9 +1576,13 @@ end_of_for:
|
||||
|
||||
BtnEliminar.Visible = True
|
||||
|
||||
If (EnviarCorreoNuevaSolicitud()) Then
|
||||
Dim Destinatario As String = ""
|
||||
If (UsuarioActual.CveEmpresa.Contiene(72)) Then
|
||||
|
||||
Destinatario = "recursoshumanos@compuproveedores.com"
|
||||
End If
|
||||
If Destinatario.Length > 0 AndAlso (EnviarCorreoNuevaSolicitud(Destinatario)) Then
|
||||
|
||||
Dim Destinatario As String = GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
|
||||
Mensaje.AppendLine(String.Format("<br /><br />Se ha notificado al correo <b>{0}</b>", Destinatario))
|
||||
End If
|
||||
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
@@ -1635,7 +1639,7 @@ end_of_for:
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Function EnviarCorreoNuevaSolicitud() As Boolean
|
||||
Protected Function EnviarCorreoNuevaSolicitud(Destinatario As String) As Boolean
|
||||
Dim Correo As New ClsSisMail()
|
||||
Dim Asunto As String = String.Format("{0} Nueva Solicitud de Viáticos: {1}", UsuarioActual.Empresa.NombreCorto, TxtFolio.Text)
|
||||
Dim Cuerpo As New StringBuilder()
|
||||
@@ -1647,14 +1651,8 @@ end_of_for:
|
||||
|
||||
If (UsuarioActual.CveEmpresa.Contiene(72, 1, 2)) Then
|
||||
|
||||
Dim Destinatario As String = ""
|
||||
|
||||
If (UsuarioActual.CveEmpresa.Contiene(72)) Then
|
||||
|
||||
Destinatario = "recursoshumanos@compuproveedores.com"
|
||||
End If
|
||||
|
||||
If (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())) Then
|
||||
If Destinatario.Length > 0 AndAlso (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString())) Then
|
||||
|
||||
MensajeEnviado = True
|
||||
|
||||
@@ -1831,9 +1829,12 @@ end_of_for:
|
||||
|
||||
BtnEliminar.Visible = True
|
||||
|
||||
If (EnviarCorreoNuevaSolicitud()) Then
|
||||
Dim Destinatario As String = ""
|
||||
If (UsuarioActual.CveEmpresa.Contiene(72)) Then
|
||||
|
||||
Dim Destinatario As String = GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo")
|
||||
Destinatario = "recursoshumanos@compuproveedores.com"
|
||||
End If
|
||||
If Destinatario.Length > 0 AndAlso (EnviarCorreoNuevaSolicitud(Destinatario)) Then
|
||||
Mensaje.AppendLine(String.Format("<br /><br />Se ha notificado al correo <b>{0}</b>", Destinatario))
|
||||
End If
|
||||
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
|
||||
@@ -791,7 +791,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpGvUniformes" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvUniforme" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de uniforme" ToolTip="Uniformes"
|
||||
<asp:GridView ID="GvUniforme" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros de Resguardo" ToolTip="Resguardos"
|
||||
CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Fecha">
|
||||
@@ -857,7 +857,7 @@
|
||||
<asp:BoundField runat="server" DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" Enabled='<%# If(CInt(Eval("LiberadoConfirm")) > 0, False, True)%>' OnClick="LbLiberarUniforme" Style='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "color:red", "color:#337ab7")%>' Text='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "Devuelto", "Liberar")%>' data-toggle='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "collapse", "confirmation")%>' data-popout="true" data-original-title="¿Esta seguro que desea liberar el uniforme?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" Enabled='<%# If(CInt(Eval("LiberadoConfirm")) > 0, False, True)%>' OnClick="LbLiberarUniforme" Style='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "color:red", "color:#337ab7")%>' Text='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "Devuelto", "Liberar")%>' data-toggle='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "collapse", "confirmation")%>' data-popout="true" data-original-title="¿Esta seguro que desea liberar el Resguardo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -3858,7 +3858,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Liberar Uniforme</h4>
|
||||
<h4 class="modal-title">Liberar Resguardo</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPPLiberarUniforme" UpdateMode="Conditional">
|
||||
|
||||
@@ -5105,7 +5105,7 @@ Partial Class RH_Personal
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1) Then
|
||||
If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal, -1, -1, Todo:=True) Then
|
||||
GvUniformesResguardo.DataSource = ObjInv.DtResultados
|
||||
UniformesInfo = ObjInv.DtResultados
|
||||
Else
|
||||
@@ -5168,15 +5168,15 @@ Partial Class RH_Personal
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
|
||||
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, CveMovimientoRelacionado:=CveMovimientoUniforme, Observaciones:=DescripcionUniforme, Modulo:="RHLibResg")
|
||||
Dim CveResultadoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenUniforme, 3, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveAlmacenDestino:=DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme)
|
||||
Dim ResultadoDetalleSalida As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoSalida, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacenUniforme, CveMovimientoDetalleEntrada:=CveMovimientoDetalleUniforme)
|
||||
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveResultadoSalida, Modulo:="RHLibResg2")
|
||||
Dim CveResultadoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestinoLiberarUniforme.SelectedValue.ToEntero, 2, 1, Date.Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CvePersonal:=CvePersonal, Observaciones:=DescripcionUniforme, CveMovimientoRelacionado:=CveMovimientoUniforme)
|
||||
Dim ResultadoDetalleEntrada As Boolean = ObjInventario.AddMovimientoDetalle(CveResultadoEntrada, 1.0, CveUM, CvePS, PU, CveSeccionAlmacen:=CveSeccionAlmacen)
|
||||
|
||||
If ResultadoDetalleSalida And ResultadoDetalleEntrada Then
|
||||
ObjInventario.Commit()
|
||||
Alert("Resguardo liberado correctamente")
|
||||
Alert("El resguardo se liberó correctamente")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalUniforme"))
|
||||
CargaUniformesPersonal()
|
||||
Else
|
||||
|
||||
@@ -519,9 +519,14 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
|
||||
BtnEliminar.Visible = true;
|
||||
|
||||
if (EnviarCorreoNuevaSolicitud())
|
||||
string Destinatario = "";
|
||||
|
||||
if (UsuarioActual.CveEmpresa.Contiene(72))
|
||||
{
|
||||
String Destinatario = get_GlobalDTUsuarios(1781, UsuarioActual.CveEmpresa).FiltroPrimeroValor("Correo");
|
||||
Destinatario = "recursoshumanos@compuproveedores.com";
|
||||
}
|
||||
if (EnviarCorreoNuevaSolicitud(Destinatario))
|
||||
{
|
||||
Mensaje.AppendLine(String.Format("<br /><br />Se ha notificado al correo <b>{0}</b>", Destinatario));
|
||||
}
|
||||
Alert(Mensaje.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
@@ -745,7 +750,7 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
#endregion
|
||||
|
||||
#region "ENVIO DE CORREOS"
|
||||
protected Boolean EnviarCorreoNuevaSolicitud()
|
||||
protected Boolean EnviarCorreoNuevaSolicitud(string Destinatario)
|
||||
{
|
||||
ClsSisMail Correo = new ClsSisMail();
|
||||
String Asunto = String.Format("{0} Nueva Solicitud de Viáticos: {1}", UsuarioActual.Empresa.NombreCorto, TxtFolio.Text);
|
||||
@@ -758,14 +763,8 @@ public partial class RH_SolicitudViaticos : ClsPaginas
|
||||
|
||||
if (UsuarioActual.CveEmpresa.Contiene(72, 1, 2))
|
||||
{
|
||||
String Destinatario = "";
|
||||
|
||||
if (UsuarioActual.CveEmpresa.Contiene(72))
|
||||
{
|
||||
Destinatario = "recursoshumanos@compuproveedores.com";
|
||||
}
|
||||
|
||||
if (Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()))
|
||||
if (Destinatario.Length > 0 && Correo.SendMail(UsuarioActual.Empresa, Destinatario, Asunto, Cuerpo.ToString()))
|
||||
{
|
||||
MensajeEnviado = true;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user