Commit inicial Ventas Productivo
This commit is contained in:
3487
AF/AF.aspx
Normal file
3487
AF/AF.aspx
Normal file
File diff suppressed because it is too large
Load Diff
3641
AF/AF.aspx.vb
Normal file
3641
AF/AF.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
284
AF/CatAF.aspx
Normal file
284
AF/CatAF.aspx
Normal file
@@ -0,0 +1,284 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatAF.aspx.vb" Inherits="AF_CatAF" %>
|
||||
|
||||
<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">
|
||||
Catálogo de Activos Fijos
|
||||
</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 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_Click1" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1">Código:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="170px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Tipo Activo Fijo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoActivo" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" OnSelectedIndexChanged="DdlTipoActivo_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">SubTipo Activo Fijo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubTipoActivo" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" OnSelectedIndexChanged="DdlSubTipoActivo_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1">Estatus:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">Proyecto: </div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlProyecto_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">SubProyecto: </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">Año:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:TextBox ID="TxtAño" runat="server" CssClass="form-control input-sm " MaxLength="4" Width="50px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtAño" FilterType="Custom, Numbers" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1">Cliente:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCliente" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveCliente"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">Grupo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataValueField="CveGrupo" DataTextField="Grupo"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">Responsable:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlResponsable" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" Width="100%" runat="server" DataTextField="NombreCompleto" DataValueField="CvePersonal">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Asignados" Value="-2"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin Responsable" Value="-3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row col-md-12">
|
||||
<asp:GridView ID="GvCaracteristicas" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion,CveCaracteristica,TipoCampo,Requerida" ShowHeaderWhenEmpty="true" CssClass="table table-hover table-advance Widthall ScrollAD">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="132px">
|
||||
<ItemStyle BorderStyle="None" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica","{0}:")%>' Width="65"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle BorderStyle="None" Width="410px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="400px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtValorNum" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="50px"></asp:TextBox>
|
||||
<asp:ImageButton ID="ImgTxtValor" runat="server" AlternateText="Click para ver el Calendario" Height="16px" ImageAlign="AbsMiddle" ImageUrl="/Imagenes/calendar.png" Visible="false" Width="16px" />
|
||||
<ajax:MaskedEditExtender ID="MEETxtValor" runat="server" AcceptNegative="Left" DisplayMoney="Left" Enabled="false" Mask="99/99/9999" MaskType="Date" TargetControlID="TxtValor" UserDateFormat="DayMonthYear"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtValor" runat="server" Enabled="False" PopupButtonID="ImgTxtValor" PopupPosition="BottomRight" TargetControlID="TxtValor"></ajax:CalendarExtender>
|
||||
<asp:DropDownList ID="DdlRespuesta" runat="server" Width="206px" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" Visible="false" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RadioButtonList ID="RbRespuesta" runat="server" Font-family="sans serif" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" RepeatDirection="Horizontal" ValidationGroup="GrpGuardar" Visible="false"></asp:RadioButtonList>
|
||||
<asp:CheckBox ID="ChbValor" runat="server" ValidationGroup="GrpGuardar" Visible="false" />
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVRbRespuesta" runat="server" ControlToValidate="DdlRespuesta" Enabled="false" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCORbRespuesta" runat="server" HighlightCssClass="vco" TargetControlID="RFVRbRespuesta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVTxtValor" Enabled="false" runat="server" ControlToValidate="TxtValor" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
|
||||
<asp:HiddenField ID="HdnEsOpcion" runat="server" Value='<%# Eval("TipoCampo")%>' />
|
||||
<asp:HiddenField ID="HdnCveCaracteristica" runat="server" Value='<%# Eval("CveCaracteristica")%>' />
|
||||
<asp:HiddenField ID="HdnCveValor" runat="server" Value="-1" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="450px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div>
|
||||
<td>Encontrados:</td>
|
||||
<td><b>
|
||||
<asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
|
||||
</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>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var OrdenarGV = function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 330;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, });
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
478
AF/CatAF.aspx.vb
Normal file
478
AF/CatAF.aspx.vb
Normal file
@@ -0,0 +1,478 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_CatAF
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
Private Property DtActivosFijos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtActivosFijos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtActivosFijos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveActivoFijo As Integer
|
||||
Get
|
||||
Return ViewState("CveActivoFijo").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property DTAFCaracteristicas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAFCaracteristicas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAFCaracteristicas") = 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()
|
||||
CargaCaracteristicas()
|
||||
|
||||
If (Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0) Then
|
||||
CargaParametrosInicial()
|
||||
Else
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
Private Sub CargaParametrosInicial()
|
||||
|
||||
Dim CveTipoActivoFijo As Integer = (Request("CveTipoActivoFijo")).ToEntero
|
||||
Dim CveSubTipoActivoFijo As Integer = (Request("CveSubTipoActivoFijo")).ToEntero
|
||||
Dim CvePersonalResponsable As Integer = (Request("CvePersonaResponsable")).ToEntero
|
||||
Dim CveSubProyecto As Integer = (Request("CveSubProyecto")).ToEntero
|
||||
Dim CveEstadoActivoFijo As Integer = (Request("CveEstadoActivoFijo")).ToEntero
|
||||
|
||||
Dim Año As Integer = -1
|
||||
Dim Grupo, CveAgrupador As Integer
|
||||
Dim ObjAF As New ClsAF()
|
||||
Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString.ToEntero
|
||||
CveAgrupador = If(Request("CveAgrupador") IsNot Nothing AndAlso Request("CveAgrupador").ToEntero() > 0, Request("CveAgrupador").ToEntero(), -1).ToEntero
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", IfNull(CveTipoActivoFijo, "-1").ToString.ToEntero, IfNull(CveSubTipoActivoFijo, "-1").ToString.ToEntero, "-1", IfNull(Request("Anio"), Now.Year).ToString.ToEntero,
|
||||
IfNull(CvePersonalResponsable, "-1").ToString.ToEntero, DdlProyecto.SelectedValue.ToEntero, IfNull(CveSubProyecto, "-1").ToString.ToEntero, IfNull(CveEstadoActivoFijo, "-1").ToString.ToEntero, "", -1) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DtActivosFijos = ObjAF.DtResultados
|
||||
Else
|
||||
DtActivosFijos = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGvDatos()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaCombos()
|
||||
DdlSubTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlEstatus.DataSource = GlobalDTEstadoActivoFijo
|
||||
DdlEstatus.DataBind()
|
||||
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
|
||||
DdlProyecto.DataBind()
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
CargarTipoActivoFijo()
|
||||
CargaGrupos()
|
||||
CargaResponsable()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrupos()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
DdlGrupo.Items.Clear()
|
||||
If ObjAF.GetGrupoAF(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlGrupo.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlGrupo.DataSource = Nothing
|
||||
End If
|
||||
DdlGrupo.DataBind()
|
||||
ObjAF.Dispose()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub CargarTipoActivoFijo()
|
||||
DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivo.DataBind()
|
||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaResponsable()
|
||||
Dim DtPersonal = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlResponsable.DataSource = DtPersonal
|
||||
DdlResponsable.DataBind()
|
||||
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"))
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
Protected Sub DdlSubTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click1(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
Dim Codigo As String = "-1"
|
||||
Dim Descripcion As String = "-1"
|
||||
Dim CveMarcaActivoFijo As Integer = -1
|
||||
Dim NoSerie As String = "-1"
|
||||
Dim Año As Integer = -1
|
||||
Dim CvePersonaResponsable As Integer = DdlResponsable.SelectedValue.ToEntero()
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
|
||||
If TxtAño.Text.Trim <> String.Empty Then Año = TxtAño.Text.Trim.ToEntero
|
||||
|
||||
Dim strSQL1 As New StringBuilder
|
||||
Dim booPrimerCampo As Boolean = False
|
||||
Dim intContador As Integer = 0
|
||||
|
||||
For Each DR As GridViewRow In GvCaracteristicas.Rows
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CveValor As Integer = DR.FCHiddenField("HdnCveValor").Value.ToEntero
|
||||
Dim Valor As String = DR.FCTextBox("TxtValor").Text.Trim
|
||||
Dim CveCaracteristica As Integer = DR.FCHiddenField("HdnCveCaracteristica").Value.ToEntero
|
||||
|
||||
Select Case DR.FCHiddenField("HdnEsOpcion").Value
|
||||
Case "0", "4"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" Or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} And Valor Like '%{1}%') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "1" 'Listado o DropDownList
|
||||
CveCaracteristicaOpcion = DR.FCDropDownList("DdlRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "2" 'Radio o RadioButtonList
|
||||
CveCaracteristicaOpcion = DR.FCRadioButtonList("RbRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "3"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "5"
|
||||
Valor = DR.FCCheckBox("ChbValor").Checked.ToString
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "6"
|
||||
Valor = DR.FCTextBox("TxtValorNum").Text.Trim
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor like '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, CvePersonaResponsable, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, -1, CveGrupo:=DdlGrupo.SelectedValue.ToEntero) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DtActivosFijos = ObjAF.DtResultados
|
||||
'GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DtActivosFijos = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("Ocurrió un error al cargar los Activos Fijos. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
DtActivosFijos = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
CargaGvDatos()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS "
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaGvDatos()
|
||||
GvDatos.DataSource = DtActivosFijos
|
||||
GvDatos.DataBind()
|
||||
|
||||
'LtlTotalRegistros.Text = DtActivosFijos.Rows.Count.ToString.FormatoNumero(0)
|
||||
|
||||
UpGV.Update()
|
||||
OrdenaDatos()
|
||||
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
|
||||
|
||||
e.Row.Cells(9).Attributes.Add("data-order", e.Row.DBCampo("FechaIng").ToDate.Ticks.ToString)
|
||||
|
||||
If DtActivosFijos.Rows.Count.ToEntero < 17 Then
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(135)
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(63)
|
||||
'e.Row.Cells(3).Width = Unit.Pixel(98)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(93)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(125)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(52)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(92)
|
||||
'e.Row.Cells(8).Width = Unit.Pixel(74)
|
||||
'e.Row.Cells(9).Width = Unit.Pixel(83)
|
||||
'e.Row.Cells(10).Width = Unit.Pixel(68)
|
||||
'e.Row.FCLiteral("LtlCodigo").Text = "<a class=""Texto"" href=""/AF/AF.aspx?CveActivoFijo=" & e.Row.DBCampo("CveActivoFijo") & """>" & e.Row.FCLiteral("LtlCodigo").Text & "</a>"
|
||||
'e.Row.FCLiteral("LtlDescripcion").Text = "<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal=" & e.Row.DBCampo("CvePersonal") & """>" & e.Row.FCLiteral("LtlDescripcion").Text & "</a>"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARACTERISTICAS "
|
||||
Private Sub CargaCaracteristicas()
|
||||
Dim ObjAFCaracteristicas As New ClsAF
|
||||
If ObjAFCaracteristicas.GetActivosFijosValores(-1, UsuarioActual.CveEmpresa) Then
|
||||
If DdlSubTipoActivo.SelectedIndex <> 0 Then
|
||||
GvCaracteristicas.DataSource = ObjAFCaracteristicas.DtResultados.FiltraParametros("CveSubTipoActivoFijo = '" + DdlSubTipoActivo.SelectedValue + "'")
|
||||
Else
|
||||
GvCaracteristicas.DataSource = Nothing
|
||||
End If
|
||||
If ObjAFCaracteristicas.GetCaracteristicasOpcionesSubTipo(-1, DdlSubTipoActivo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTAFCaracteristicas = ObjAFCaracteristicas.DtResultados '.FiltraParametros("SubtipoActivoFijo = '" + DdlSubTipoActivoFijo.SelectedValue + "'") 'FiltraParametros("EstatusOpcion = 'True'")
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjAFCaracteristicas.Dispose()
|
||||
GvCaracteristicas.DataBind()
|
||||
UpFiltro.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCaracteristicas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim TipoCampo As Integer = e.Row.DBCampo("TipoCampo").ToEntero
|
||||
Dim CveCaracteristica As Integer = e.Row.DBCampo("CveCaracteristica").ToEntero
|
||||
|
||||
Select Case TipoCampo
|
||||
Case 0, 4 'Texto, Multiline
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
.Visible = True
|
||||
If TipoCampo = 4 Then
|
||||
.Rows = 3
|
||||
.TextMode = TextBoxMode.MultiLine
|
||||
End If
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValor"
|
||||
End If
|
||||
|
||||
End With
|
||||
|
||||
Case 1, 2 'DropDownList, Radios
|
||||
Dim dt As DataTable = DTAFCaracteristicas.FiltraParametros(String.Format("CveCaracteristica = {0} AND EstatusOpcion ='True' AND CveCaracteristicaOpcion > 0 ", CveCaracteristica))
|
||||
|
||||
If TipoCampo = 1 Then
|
||||
With e.Row.FCDropDownList("DdlRespuesta")
|
||||
.Visible = True
|
||||
.DataTextField = "CaracteristicaOpcion"
|
||||
.DataValueField = "CveCaracteristicaOpcion"
|
||||
.DataSource = dt
|
||||
|
||||
.DataBind()
|
||||
.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
.SelectedValue = e.Row.DBCampo("CveOpcion")
|
||||
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "DdlRespuesta"
|
||||
End If
|
||||
|
||||
End With
|
||||
ElseIf TipoCampo = 2 Then
|
||||
With e.Row.FCRadioButtonList("RbRespuesta")
|
||||
.Visible = True
|
||||
.DataSource = dt
|
||||
.DataBind()
|
||||
|
||||
End With
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ErrorMessage = String.Format("ERROR: Falta contestar la pregunta: <b>{0}</b>", e.Row.DBCampo("Caracteristica"))
|
||||
End If
|
||||
|
||||
Case 3 'Fecha
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
|
||||
.Visible = True
|
||||
.Width = New Unit(80)
|
||||
End With
|
||||
e.Row.FCImageButton("ImgTxtValor").Visible = True
|
||||
e.Row.FCMaskedEditExtender("MEETxtValor").Enabled = True
|
||||
e.Row.FCCalendarExtender("CETxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Date
|
||||
|
||||
Case 5 'Checkbox
|
||||
With e.Row.FCCheckBox("ChbValor")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Caracteristica")
|
||||
.Checked = CBool(e.Row.DBCampo("Valor").ToEntero)
|
||||
End With
|
||||
|
||||
Case 6 ' Numerico
|
||||
With e.Row.FCTextBox("TxtValorNum")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Integer
|
||||
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValorNum"
|
||||
End If
|
||||
End With
|
||||
End Select
|
||||
End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
Dim DV As DataView = Nothing
|
||||
DV = New DataView(DtActivosFijos, "", Orden, DataViewRowState.CurrentRows)
|
||||
If Orden <> String.Empty Then
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
GvDatos.DataBind()
|
||||
Else
|
||||
GvDatos.DataSource = DtActivosFijos
|
||||
End If
|
||||
|
||||
DV.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R P D F / Excel"
|
||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
GenerarPDF("EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtActivosFijos.Rows.Count > 0 Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato)
|
||||
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
180
AF/CatCargasCombustible.aspx
Normal file
180
AF/CatCargasCombustible.aspx
Normal file
@@ -0,0 +1,180 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatCargasCombustible.aspx.vb" Inherits="AF_CatCargasCombustible" %>
|
||||
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Cargas de combustible
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCargaCombustible" runat="server"><i class="fa fa-plus"></i>Agregar Carga de Combustible</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCargaCombustible.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCargaCombustible.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvCargaCombustible" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveCargaCombustible,CveCombustible,CveProveedor,CveAF,Folio,FechaCarga,TanqueLleno,Cantidad,CostoUnitario,Odometro,FechaIng,CveUsuario,CveEmpresa,Usuario" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Operadores">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Folio" HeaderText="Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="ActivoFijo" HeaderText="Activo Fijo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FechaCarga" HeaderText="Fecha Carga" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:F2}" />
|
||||
<asp:BoundField DataField="CostoUnitario" HeaderText="Costo Unitario" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:c}"/>
|
||||
|
||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-xs green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="Delete_Click" 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>
|
||||
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--POPUP AGREGAR--%>
|
||||
<div id="DivAddCargaCombustible" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddCargaCombustible" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Carga Combustible</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyCargaCombustible" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" CssClass="tabBodyOverride">
|
||||
|
||||
<ajax:TabPanel ID="TabInformacion" runat="server" HeaderText="Datos Generales">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></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>
|
||||
<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="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpSolicitarMateriales"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label for="<%= TimeSelector.ClientID.ToString()%>">Hora:</label>
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false">
|
||||
</cc1:TimeSelector>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFolio" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="form-control select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProveedor" runat="server" ControlToValidate="DdlProveedor" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedor''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlProveedor.ClientID.ToString()%>">Proveedor:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= CkhTanque.ClientID.ToString()%>">¿Tanque lleno?</label>
|
||||
<asp:CheckBox ID="CkhTanque" runat="server" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabValoresCarga" runat="server" HeaderText="Informacion de Carga">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlActivoFijo" runat="server" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion" CssClass="form-control select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVActivo" runat="server" ControlToValidate="DdlActivoFijo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlActivoFijo.ClientID.ToString()%>">Activo Fijo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCombustible" runat="server" DataValueField="CveCombustible" DataTextField="Combustible" CssClass="form-control select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCombustible" runat="server" ControlToValidate="DdlCombustible" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Combustible''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlCombustible.ClientID.ToString()%>">Combustible:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCantidad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad (Lt):</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCosto" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCosto" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtCosto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Costo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCosto.ClientID.ToString()%>">Costo Unitario:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOdometro" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOdometro" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtOdometro" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Odómetro''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtOdometro.ClientID.ToString()%>">Odómetro (Km):</label>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarCarga" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i>Agregar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
126
AF/CatCargasCombustible.aspx.vb
Normal file
126
AF/CatCargasCombustible.aspx.vb
Normal file
@@ -0,0 +1,126 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Partial Class AF_CatCargasCombustible
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Sub AF_CatCargasCombustible_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaDatos()
|
||||
CargaProveedor()
|
||||
CargaCombustible()
|
||||
CargaAF()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S "
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||
Dim CveProveedor = If(Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToEntero() > 0, Request("CveProveedor").ToEntero(), -1).ToString
|
||||
Dim CveSubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1).ToString
|
||||
Dim CveTipoAF = If(Request("CveTipoAF") IsNot Nothing AndAlso Request("CveTipoAF").ToEntero() > 0, Request("CveTipoAF").ToEntero(), -1).ToString
|
||||
Dim CveAF = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString
|
||||
Dim FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||
Dim FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||
|
||||
|
||||
Dim sMes As String
|
||||
Dim sDias As String = ""
|
||||
Dim dias As Integer = 0
|
||||
Dim sAnio As String = If(AnioMes <> "-1", AnioMes.Substring(0, 4), "")
|
||||
|
||||
If AnioMes.Trim.Length = 7 Then
|
||||
sMes = AnioMes.Substring(5, 2).ToEntero.ToString("00")
|
||||
Else
|
||||
sMes = If(AnioMes <> "-1", AnioMes.Substring(5, 1).ToEntero.ToString("00"), "")
|
||||
End If
|
||||
|
||||
If AnioMes <> "-1" Then
|
||||
FechaI = String.Format("01/{0}/{1}", sMes, sAnio)
|
||||
FechaF = FechaI.ToDate.LastDayOfMonth
|
||||
End If
|
||||
|
||||
If ObjAF.GetCargasCombustible(CveAF, CveProveedor, CveTipoAF, CveSubProyecto, FechaI, FechaF, UsuarioActual.CveEmpresa, CveCargaCombustible:=-1) Then
|
||||
GvCargaCombustible.DataSource = ObjAF.DtResultados
|
||||
GvCargaCombustible.DataBind()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaProveedor()
|
||||
DdlProveedor.Items.Clear()
|
||||
DdlProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
|
||||
UpAddCargaCombustible.Update()
|
||||
End Sub
|
||||
Private Sub CargaCombustible()
|
||||
Dim ObjAF As New ClsAF()
|
||||
DdlCombustible.Items.Clear()
|
||||
|
||||
If ObjAF.GetCombustibles(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCombustible.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlCombustible.DataSource = ObjAF.DtResultados
|
||||
DdlCombustible.DataBind()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
UpAddCargaCombustible.Update()
|
||||
End Sub
|
||||
Private Sub CargaAF()
|
||||
Dim ObjAF As New ClsAF()
|
||||
DdlActivoFijo.Items.Clear()
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, "-1", -1) Then
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlActivoFijo.DataSource = ObjAF.DtResultados
|
||||
DdlActivoFijo.DataBind()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
UpAddCargaCombustible.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "A G R E G A R "
|
||||
Private Sub LnkCargaCombustible_Click(sender As Object, e As EventArgs) Handles LnkCargaCombustible.Click
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarCarga.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Operador"
|
||||
TxtFecha.Text = ""
|
||||
TxtFolio.Text = ""
|
||||
TxtCantidad.Text = ""
|
||||
TxtCosto.Text = ""
|
||||
TxtOdometro.Text = ""
|
||||
|
||||
DdlActivoFijo.SelectedIndex = 0
|
||||
DdlCombustible.SelectedIndex = 0
|
||||
DdlProveedor.SelectedIndex = 0
|
||||
UpAddCargaCombustible.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCargaCombustible"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarCarga_Click(sender As Object, e As EventArgs) Handles BtnAgregarCarga.Click
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim FechaCarga As DateTime
|
||||
|
||||
FechaCarga = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFecha.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
|
||||
If ObjAF.AddCargaCombustible(DdlCombustible.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, TxtFolio.Text.Trim, FechaCarga, CkhTanque.Checked, TxtCantidad.Text.ToDouble, TxtCosto.Text.ToDouble,
|
||||
TxtOdometro.Text.ToDouble, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Se registró la carga correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCargaCombustible"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
703
AF/CatClasificacionesCaracteristicas.aspx
Normal file
703
AF/CatClasificacionesCaracteristicas.aspx
Normal file
@@ -0,0 +1,703 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatClasificacionesCaracteristicas.aspx.vb" Inherits="AF_CatClasificacionesCaracteristicas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Clasificaciones y Caracteristicas de Activos Fijo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top: 20px;">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="1" Width="100%" CssClass="tabBodyOverride">
|
||||
<ajax:TabPanel ID="TabClasificaciones" runat="server" HeaderText="Clasificaciones">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="contenido">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpTitulosCL" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<%-- <td width="200px">
|
||||
<asp:LinkButton ID="LbTiposActivosFijosCL" runat="server" CausesValidation="false" Text="Tipo Activo Fijo"></asp:LinkButton> <asp:ImageButton ID="ImgTiposActivosFijosCL" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>
|
||||
<td width="200px">
|
||||
<asp:LinkButton ID="LbSubTiposActivosFijosCL" runat="server" CausesValidation="false" Text="SubTipo Activo Fijo"></asp:LinkButton> <asp:ImageButton ID="ImgSubTiposActivosFijosCL" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbCaracteristicaClasificacionCL" runat="server" CausesValidation="false" Text="" CommandArgument="CaracteristicaClasificacion0;0" OnClick="LbOrden_Click">
|
||||
Clasificación
|
||||
<asp:Literal ID="ImgCaracteristicaClasificacion0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbEstatusCL" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus0;0" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbFechaIngCL" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng0;0" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuarioCL" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario0;0" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario0" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="116px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<%--<td>
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosCL" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" ValidationGroup="GrpGuardarCL" Width="195px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTiposActivosFijosCL" runat="server" ControlToValidate="DdlTiposActivosFijosCL" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCL"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTiposActivosFijosCL" runat="server" HighlightCssClass="vco" TargetControlID="RFVTiposActivosFijosCL" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosCL" runat="server" AppendDataBoundItems="true" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" ValidationGroup="GrpGuardarCL" Width="195px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubTiposActivosFijosCL" runat="server" ControlToValidate="DdlSubTiposActivosFijosCL" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCL"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTiposActivosFijosCL" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTiposActivosFijosCL" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>--%>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCaracteristicaClasificacionCL" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarCL" Width="184px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaClasificacionCL" runat="server" ControlToValidate="TxtCaracteristicaClasificacionCL" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCL"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaClasificacionCL" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaClasificacionCL" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<asp:LinkButton ID="LbAgregarCL" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCL"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosCL" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosCL" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion" EmptyDataText="No se encontraron Clasificaciones" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<%--<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosCL" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosCL" runat="server" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" Width="195px"></asp:DropDownList></EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlSubTiposActivosFijosCL" runat="server" Text='<%# Eval("SubTipoActivoFijo", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosCL" runat="server" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" Width="195px"></asp:DropDownList></EditItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCaracteristicaClasificacionCL" runat="server" Text='<%# Eval("CaracteristicaClasificacion", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCaracteristicaClasificacionCL" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CaracteristicaClasificacion")%>' ValidationGroup="GrpEditGuardarCL" Width="184px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaClasificacionCL" runat="server" ControlToValidate="TxtCaracteristicaClasificacionCL" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarCL"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaClasificacionCL" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaClasificacionCL" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatusCL" runat="server" Checked='<%# If(Eval("Estatus").ToString = "Activo", "True", "False") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusCL" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIngCL" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioCL" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditGuardarCL" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" ToolTip="Editar" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClientClick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCaracteristicas" runat="server" HeaderText="Características">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="contenido">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpTitulosCA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<%--SE UTIIZAN LAS id´S CON UN NÚMERO AL FINAL PARA IDENTIFICAR QUE IMAGEN DE FLECHA Y DE QUE TABLA SE ESTÁ MANDANDO LLAMAR AL MOMENTO DEL ORDENAMIENTO--%>
|
||||
<th width="95px">
|
||||
<asp:LinkButton ID="LbTiposActivosFijosCA" runat="server" CausesValidation="false" Text="" CommandArgument="TipoActivoFijo1;1" OnClick="LbOrden_Click">
|
||||
Tipo Activo Fijo
|
||||
<asp:Literal ID="ImgTipoActivoFijo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbSubTiposActivosFijosCA" runat="server" CausesValidation="false" Text="" CommandArgument="SubTipoActivoFijo1;1" OnClick="LbOrden_Click">
|
||||
SubTipo Activo Fijo
|
||||
<asp:Literal ID="ImgSubTipoActivoFijo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="110px">
|
||||
<asp:LinkButton ID="LbCaracteristicaClasificacionCA" runat="server" CausesValidation="false" Text="" CommandArgument="CaracteristicaClasificacion1;1" OnClick="LbOrden_Click">
|
||||
Clasificación
|
||||
<asp:Literal ID="ImgCaracteristicaClasificacion1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LbCaracteristicaCA" runat="server" CausesValidation="false" Text="" CommandArgument="Caracteristica1;1" OnClick="LbOrden_Click">
|
||||
Característica
|
||||
<asp:Literal ID="ImgCaracteristica1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbOrdenCA" runat="server" CausesValidation="false" Text="" CommandArgument="Orden1;1" OnClick="LbOrden_Click">
|
||||
Orden
|
||||
<asp:Literal ID="ImgOrden1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbLongitudCA" runat="server" CausesValidation="false" Text="" CommandArgument="Longitud1;1" OnClick="LbOrden_Click">
|
||||
Long.
|
||||
<asp:Literal ID="ImgLongitud1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbTipoCampoCA" runat="server" CausesValidation="false" Text="" CommandArgument="TipoCampo1;1" OnClick="LbOrden_Click">
|
||||
Tipo
|
||||
<asp:Literal ID="ImgTipoCampo1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="50px">
|
||||
<asp:LinkButton ID="LbRequeridaCA" runat="server" CausesValidation="false" Text="" CommandArgument="Requerida1;1" OnClick="LbOrden_Click">
|
||||
Req.
|
||||
<asp:Literal ID="ImgRequerida1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="70px">
|
||||
<asp:LinkButton ID="LbEstatusCA" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus1;1" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbFechaIngCA" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng1;1" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="75px">
|
||||
<asp:LinkButton ID="LbUsuarioCA" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario1;1" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="116px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosCA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" ValidationGroup="GrpGuardarCA" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 79px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVTiposActivosFijosCA" runat="server" ControlToValidate="DdlTiposActivosFijosCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTiposActivosFijosCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVTiposActivosFijosCA" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosCA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" ValidationGroup="GrpGuardarCA" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 84px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVSubTiposActivosFijosCA" runat="server" ControlToValidate="DdlSubTiposActivosFijosCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTiposActivosFijosCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTiposActivosFijosCA" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlClasificacionesCA" runat="server" AppendDataBoundItems="true" DataValueField="CveCaracteristicaClasificacion" DataTextField="CaracteristicaClasificacion" ValidationGroup="GrpGuardarCA" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 84px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionesCA" runat="server" ControlToValidate="DdlClasificacionesCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionesCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionesCA" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtCaracteristicaCA" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarCA" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaCA" runat="server" ControlToValidate="TxtCaracteristicaCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Característica''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaCA" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtOrdenCA" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarCA" Width="54px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrdenCA" runat="server" ControlToValidate="TxtOrdenCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOrdenCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrdenCA" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtLongitudCA" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarCA" Width="54px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLongitudCA" runat="server" ControlToValidate="TxtLongitudCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Longitud''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCLongitudCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVLongitudCA" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td align="center" style="text-align: center">
|
||||
<asp:DropDownList ID="DdlTipoCampoCA" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 64px !important;">
|
||||
<asp:ListItem Text="Texto" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Listado" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Radio" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Multiline" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Checkbox" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Numerico" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlRequeridoCA" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 54px !important;">
|
||||
<asp:ListItem Text="SI" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="NO" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td align="center" style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregarCA" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarCA"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosCA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosCA" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristica" EmptyDataText="No se encontraron Características" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosCA" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosCA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 79px !important;" OnSelectedIndexChanged="DdlTiposActivosFijosCA_SelectedIndexChanged1"></asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTiposActivosFijosCA" runat="server" ControlToValidate="DdlTiposActivosFijosCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTiposActivosFijosCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVTiposActivosFijosCA" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlSubTiposActivosFijosCA" runat="server" Text='<%# Eval("SubTipoActivoFijo", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosCA" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 84px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlClasificacionesCA" runat="server" Text='<%# Eval("CaracteristicaClasificacion", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlClasificacionesCA" runat="server" DataValueField="CveCaracteristicaClasificacion" DataTextField="CaracteristicaClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 84px !important;"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCaracteristicaCA" runat="server" Text='<%# Eval("Caracteristica", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCaracteristicaCA" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Caracteristica")%>' ValidationGroup="GrpEditGuardarCA" Width="84px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaCA" runat="server" ControlToValidate="TxtCaracteristicaCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaCA" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrden" runat="server" Text='<%# Eval("Orden", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOrdenCA" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Orden")%>' ValidationGroup="GrpEditGuardarCA" Width="54px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrdenCA" runat="server" ControlToValidate="TxtOrdenCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOrdenCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrdenCA" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlLongitudCA" runat="server" Text='<%# Eval("Longitud", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtLongitudCA" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Longitud")%>' ValidationGroup="GrpEditGuardarCA" Width="54px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLongitudCA" runat="server" ControlToValidate="TxtLongitudCA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarCA"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOLongitudCA" runat="server" HighlightCssClass="vco" TargetControlID="RFVLongitudCA" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoCampoCA" runat="server" Text='<%# FncTipoCampo(CType(Eval("TipoCampo").ToString, Integer))%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipoCampoCA" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 64px !important;">
|
||||
<asp:ListItem Text="Texto" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Listado" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Radio" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Multiline" Value="4"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRequerida" runat="server" Text='<%# Eval("Requerida")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlRequeridaCA" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 64px !important;">
|
||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatusCA" runat="server" Checked='<%# If(Eval("Estatus").ToString = "Activo", "True", "False") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusCA" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIngCA" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioCA" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditGuardarCA" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" ToolTip="Editar" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnCAientCAick="javascript:return C();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCaracteristicasOpciones" runat="server" HeaderText="Opciones">
|
||||
<ContentTemplate>
|
||||
<table border="0" class="contenido">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpTitulosOpciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="166px">
|
||||
<asp:LinkButton ID="LbTiposActivosFijosOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="TipoActivoFijo2;2" OnClick="LbOrden_Click">
|
||||
Tipo Activo Fijo
|
||||
<asp:Literal ID="ImgTipoActivoFijo2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="168px">
|
||||
<asp:LinkButton ID="LbSubTiposActivosFijosOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="SubTipoActivoFijo2;2" OnClick="LbOrden_Click">
|
||||
SubTipo Activo Fijo
|
||||
<asp:Literal ID="ImgSubTipoActivoFijo2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="100px">
|
||||
<asp:LinkButton ID="LbCaracteristicaClasificacionOpciones" runat="server" CausesValidation="false" Text="Clasificación"></asp:LinkButton> <asp:ImageButton ID="ImgCaracteristicaClasificacionOpciones" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="169px">
|
||||
<asp:LinkButton ID="LbCaracteristica" runat="server" CausesValidation="false" Text="" CommandArgument="Caracteristica2;2" OnClick="LbOrden_Click">
|
||||
Característica
|
||||
<asp:Literal ID="ImgCaracteristica2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbCaracteristicaOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="CaracteristicaOpcion2;2" OnClick="LbOrden_Click">
|
||||
Opciones
|
||||
<asp:Literal ID="ImgCaracteristicaOpcion2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbOrdenOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="OrdenOpcion2;2" OnClick="LbOrden_Click">
|
||||
Orden
|
||||
<asp:Literal ID="ImgOrdenOpcion2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<%--<td width="50px"><asp:LinkButton ID="LbLongitudOpciones" runat="server" CausesValidation="false" Text="Long."></asp:LinkButton> <asp:ImageButton ID="ImgLongitudOpciones" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" /></td>--%>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbEstatusOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus2;2" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="81px">
|
||||
<asp:LinkButton ID="LbFechaIngOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng2;2" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="81px">
|
||||
<asp:LinkButton ID="LbUsuarioOpciones" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario2;2" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario2" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="121px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosOpciones" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" ValidationGroup="GrpGuardarOpciones" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTiposActivosFijosOpciones" runat="server" ControlToValidate="DdlTiposActivosFijosOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTiposActivosFijosOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVTiposActivosFijosOpciones" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosOpciones" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" ValidationGroup="GrpGuardarOpciones" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 152px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVSubTiposActivosFijosOpciones" runat="server" ControlToValidate="DdlSubTiposActivosFijosOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Tipo de Activo Fijo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTiposActivosFijosOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTiposActivosFijosOpciones" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</td>
|
||||
<%--<td>
|
||||
<asp:DropDownList ID="DdlClasificacionesOpciones" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveCaracteristicaClasificacion" DataTextField="CaracteristicaClasificacion" ValidationGroup="GrpGuardarOpciones" Width="95px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVClasificacionesOpciones" runat="server" ControlToValidate="DdlClasificacionesOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOClasificacionesOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionesOpciones" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>--%>
|
||||
<td style="text-align: center">
|
||||
<%--<asp:TextBox ID="TxtCaracteristicaOpciones" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarOpciones" Width="75px"></asp:TextBox>--%>
|
||||
<asp:DropDownList ID="DdlCaracteristicaOpciones" runat="server" AppendDataBoundItems="true" DataValueField="CveCaracteristica" DataTextField="Caracteristica" ValidationGroup="GrpGuardarOpciones" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 153px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaOpciones" runat="server" ControlToValidate="DdlCaracteristicaOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Opción''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaOpciones" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtOpcion" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarOpciones" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOpcion" runat="server" ControlToValidate="TxtOpcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Opcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEOpcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVOpcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<asp:TextBox ID="TxtOrdenOpciones" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarOpciones" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrdenOpciones" runat="server" ControlToValidate="TxtOrdenOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOrdenOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrdenOpciones" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<asp:TextBox ID="TxtLongitudOpciones" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardarOpciones" Width="45px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLongitudOpciones" runat="server" ControlToValidate="TxtLongitudOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCLongitudOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVLongitudOpciones" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>--%>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td align="center" style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregarOpciones" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardarOpciones"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosOpciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosOpciones" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaOpcion" EmptyDataText="No se encontraron Opciones" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosOpciones" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTiposActivosFijosOpciones" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;" OnSelectedIndexChanged="DdlTiposActivosFijosOpciones_SelectedIndexChanged1"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlSubTiposActivosFijosOpciones" runat="server" Text='<%# Eval("SubTipoActivoFijo", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSubTiposActivosFijosOpciones" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CveSubTipoActivoFijo" DataTextField="SubTipoActivoFijo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 152px !important;" OnSelectedIndexChanged="DdlSubTiposActivosFijosOpciones_SelectedIndexChanged1"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlClasificacionesOpciones" runat="server" Text='<%# Eval("CaracteristicaClasificacion", "{0}") %>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlClasificacionesOpciones" runat="server" DataValueField="CveCaracteristicaClasificacion" DataTextField="CaracteristicaClasificacion" Width="95px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaracteristicasOpciones" runat="server" DataValueField="CveCaracteristica" DataTextField="Caracteristica" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 151px !important;"></asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVCaracteristica" runat="server" ControlToValidate="DdlCaracteristicasOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristica" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristica" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlCaracteristicaOpciones" runat="server" Text='<%# Eval("CaracteristicaOpcion", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtCaracteristicaOpciones" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("CaracteristicaOpcion")%>' ValidationGroup="GrpEditGuardarOpciones" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCaracteristicaOpciones" runat="server" ControlToValidate="TxtCaracteristicaOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCaracteristicaOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaracteristicaOpciones" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrdenOpciones" runat="server" Text='<%# Eval("OrdenOpcion", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtOrdenOpciones" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("OrdenOpcion")%>' ValidationGroup="GrpEditGuardarOpciones" Width="64px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOrdenOpciones" runat="server" ControlToValidate="TxtOrdenOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOrdenOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVOrdenOpciones" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlLongitudOpciones" runat="server" Text='<%# Eval("Longitud", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtLongitudOpciones" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Longitud")%>' ValidationGroup="GrpEditGuardarOpciones" Width="45px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLongitudOpciones" runat="server" ControlToValidate="TxtLongitudOpciones" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarOpciones"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOLongitudOpciones" runat="server" HighlightCssClass="vco" TargetControlID="RFVLongitudOpciones" Width="100px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstatusOpciones" runat="server" Checked='<%# Eval("Estatus")%>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusOpciones" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIngOpciones" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioOpciones" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditGuardarOpciones" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" ToolTip="Editar" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnCAientCAick="javascript:return COpciones();" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<asp:HiddenField ID="hdnCaracteristicaOpcion" Value="" ClientIDMode="Static" runat="server" />
|
||||
<asp:Panel ID="divDuplicar" runat="server" ClientIDMode="Static" Width="300px" BackColor="White" Style="border: solid 1px black; color: Black; display: none; position: absolute;">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UPPBuscar">
|
||||
<ContentTemplate>
|
||||
<table border="0" width="300px" cellpadding="0" cellspacing="1">
|
||||
<tr class="Titulos">
|
||||
<td colspan="2">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="TbBuscar" style="cursor: move;">
|
||||
<tr>
|
||||
<td style="width: 510px">Duplicar Tipo de Caracteristica</td>
|
||||
<td style="padding-right: 4px; padding-top: 4px" valign="top">
|
||||
<img alt="" src="/imagenes/cerrarX.jpg" style="cursor: pointer;" onclick="$get('divDuplicar').style.display='none';" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<tr>
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td style="width: 80px">Tipo Característica:</td>
|
||||
<td>
|
||||
|
||||
<asp:TextBox runat="server" ID="TxtCaracteristicaOpcionDuplicar"></asp:TextBox>
|
||||
<asp:Button ID="BtnDuplicarCaracteristicaOpcion" runat="server" Text="Aceptar" ValidationGroup="GrpBusqueda" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Panel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Tipo de Característica?');
|
||||
}
|
||||
|
||||
function CC() {
|
||||
return confirm('¿Está seguro que desea eliminar la Característica?');
|
||||
}
|
||||
|
||||
function COpciones() {
|
||||
return confirm('¿Está seguro que desea eliminar la Opción?');
|
||||
}
|
||||
function COST() {
|
||||
return confirm('¿Está seguro que desea eliminar la Característica?');
|
||||
}
|
||||
function Up() {
|
||||
|
||||
if ($("#ChkTipoCampo").Checked == false && $("hdnTipoCampo").value == 'Sí')
|
||||
return confirm('¿Está cambiando la Característica para NO tener Opciones, eso generara que sus Opciones sean Eliminadas. Está Seguro de Continuar?');
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
776
AF/CatClasificacionesCaracteristicas.aspx.vb
Normal file
776
AF/CatClasificacionesCaracteristicas.aspx.vb
Normal file
@@ -0,0 +1,776 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
'Imports Telerik.Charting.Styles
|
||||
Partial Class AF_CatClasificacionesCaracteristicas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Caracteristicas"
|
||||
Private Property DTClasificacionesCaracteristicas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTClasificacionesCaracteristicas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTClasificacionesCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTCaracteristicasOpciones As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTCaracteristicasOpciones"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTCaracteristicasOpciones") = 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
|
||||
'Clasificaciones
|
||||
ViewState("OrdenCL") = ""
|
||||
CargaDatosCL()
|
||||
|
||||
'Características
|
||||
ViewState("OrdenCA") = ""
|
||||
'CargaSubTiposActivosFijosCA()
|
||||
'CargaClasificacionesCA()
|
||||
CargaDatosCA()
|
||||
|
||||
'Opciones
|
||||
ViewState("OrdenOpciones") = ""
|
||||
'CargaSubTiposActivosFijosOpciones()
|
||||
'CargaClasificacionesOpciones()
|
||||
'CargaCaracteristicas()
|
||||
CargaDatosOpciones()
|
||||
|
||||
|
||||
'Carga Globals para DT
|
||||
CargaTiposActivosFijos()
|
||||
CargaSubTiposActivosFijos()
|
||||
CargaCaracteristicasClasificaciones()
|
||||
CargaCaracteristicas()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTiposActivosFijos()
|
||||
'DdlTiposActivosFijosCL.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
'DdlTiposActivosFijosCL.DataBind()
|
||||
DdlTiposActivosFijosCA.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTiposActivosFijosCA.DataBind()
|
||||
DdlTiposActivosFijosOpciones.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTiposActivosFijosOpciones.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaSubTiposActivosFijos()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetSubTiposActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa) = ObjAF.DtResultados
|
||||
Else
|
||||
Alert("Ocurrio un error al obtener los SubTipos de Activos Fijos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaCaracteristicasClasificaciones()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTAFCaracteristicasClasificaciones = ObjAF.DtResultados
|
||||
ViewState("DTCaracteristicaClasificacion") = ObjAF.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
Else
|
||||
Alert("Ocurrio un error al obtener las caracteristicas clasificaciones de Activos Fijos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaCaracteristicas()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetCaracteristicas(UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTAFCaracteristicas = ObjAF.DtResultados
|
||||
Else
|
||||
Alert("Ocurrio un error al obtener las caracteristicas de Activos Fijos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region "CLASIFICACIONES"
|
||||
Protected Sub LbAgregarCL_Click(sender As Object, e As System.EventArgs) Handles LbAgregarCL.Click
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
If ObjCaracteristicaClasificacion.AddClasificacionesCaracteristicas(TxtCaracteristicaClasificacionCL.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
'DdlSubTiposActivosFijosCL.SelectedIndex = 0
|
||||
TxtCaracteristicaClasificacionCL.Text = ""
|
||||
Alert("La Nueva Clasificación de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulosCL.Update()
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
CargaCaracteristicasClasificaciones()
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End If
|
||||
ObjCaracteristicaClasificacion.Dispose()
|
||||
|
||||
CargaClasificacionesCA()
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS"
|
||||
Public Sub CargaDatosCL()
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
If ObjCaracteristicaClasificacion.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTCaracteristicaClasificacion") = ObjCaracteristicaClasificacion.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||
GlobalDTAFCaracteristicasClasificaciones = ObjCaracteristicaClasificacion.DtResultados
|
||||
Else
|
||||
Me.GvDatosCL.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjCaracteristicaClasificacion.Dispose()
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End Sub
|
||||
'Protected Sub DdlTiposActivosFijosCL_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTiposActivosFijosCL.SelectedIndexChanged
|
||||
' DdlSubTiposActivosFijosCL.Items.Clear()
|
||||
' DdlSubTiposActivosFijosCL.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", DdlTiposActivosFijosCL.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
' DdlSubTiposActivosFijosCL.DataBind()
|
||||
' DdlSubTiposActivosFijosCL.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "-- G V --"
|
||||
Protected Sub GvDatosCL_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosCL.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(55)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(61)
|
||||
End If
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
'If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
' e.Row.FCDropDownList("DdlTiposActivosFijosCL").DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
' e.Row.FCDropDownList("DdlTiposActivosFijosCL").DataBind()
|
||||
' e.Row.FCDropDownList("DdlTiposActivosFijosCL").SelectedValue = e.Row.DBCampo("CveTipoActivoFijo")
|
||||
|
||||
' e.Row.FCDropDownList("DdlSubTiposActivosFijosCL").DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
' e.Row.FCDropDownList("DdlSubTiposActivosFijosCL").DataBind()
|
||||
' e.Row.FCDropDownList("DdlSubTiposActivosFijosCL").SelectedValue = e.Row.DBCampo("CveSubTipoActivoFijo")
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosCL_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosCL.RowDeleting
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
If ObjCaracteristicaClasificacion.RemoveClasificacionesCaracteristicas(GvDatosCL.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosCL.EditIndex = -1
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
CargaCaracteristicasClasificaciones()
|
||||
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicaClasificacion.Dispose()
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
|
||||
CargaClasificacionesCA()
|
||||
End Sub
|
||||
Protected Sub GvDatosCL_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatosCL.RowCancelingEdit
|
||||
GvDatosCL.EditIndex = -1
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosCL_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatosCL.RowUpdating
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
|
||||
'Dim CveSubTiposActivosFijos As Integer = GvDatosCL.Rows(e.RowIndex).FCDropDownList("DdlSubTiposActivosFijosCL").SelectedValue.ToEntero
|
||||
Dim CaracteristicaClasificacion As String = GvDatosCL.Rows(e.RowIndex).FCTextBox("TxtCaracteristicaClasificacionCL").Text.Trim
|
||||
Dim Estatus As Boolean = GvDatosCL.Rows(e.RowIndex).FCCheckBox("ChkEstatusCL").Checked
|
||||
Dim CveCaracteristicaClasificacion As Integer = GvDatosCL.Rows(e.RowIndex).DataKey("CveCaracteristicaClasificacion").ToString.ToEntero
|
||||
|
||||
If ObjCaracteristicaClasificacion.UpdateClasificacionesCaracteristicas(CaracteristicaClasificacion, Estatus, CveCaracteristicaClasificacion, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosCL.EditIndex = -1
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
CargaCaracteristicasClasificaciones()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicaClasificacion.Dispose()
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
|
||||
CargaClasificacionesCA()
|
||||
End Sub
|
||||
Protected Sub GvDatosCL_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatosCL.RowEditing
|
||||
GvDatosCL.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CARACTERISTICAS"
|
||||
Protected Sub LbAgregarCA_Click(sender As Object, e As System.EventArgs) Handles LbAgregarCA.Click
|
||||
|
||||
If DdlTiposActivosFijosCA.SelectedValue.ToEntero < 0 And DdlSubTiposActivosFijosCA.SelectedValue.ToEntero < 0 Then
|
||||
Alert("Debe seleccionar un ActivoFijo o un SubActivoFijo", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
If ObjCaracteristicas.AddCaracteristica(TxtCaracteristicaCA.Text.Trim, DdlClasificacionesCA.SelectedValue.ToEntero, DdlTiposActivosFijosCA.SelectedValue.ToEntero, DdlSubTiposActivosFijosCA.SelectedValue.ToEntero, DdlTipoCampoCA.SelectedValue.ToEntero, TxtLongitudCA.Text.Trim.ToEntero, DdlRequeridoCA.SelectedValue.ToEntero, TxtOrdenCA.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
TxtCaracteristicaCA.Text = ""
|
||||
TxtOrdenCA.Text = ""
|
||||
TxtLongitudCA.Text = ""
|
||||
Alert("La Nueva Característica de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulosCA.Update()
|
||||
ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
CargaCaracteristicasClasificaciones()
|
||||
CargaCaracteristicas()
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
End If
|
||||
ObjCaracteristicas.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " CARGA DATOS"
|
||||
Public Sub CargaDatosCA()
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
If ObjCaracteristicas.GetCaracteristicas(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAFCaracteristicas = ObjCaracteristicas.DtResultados
|
||||
Else
|
||||
Me.GvDatosCA.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
|
||||
CargaClasificacionesCA()
|
||||
End Sub
|
||||
Private Sub CargaClasificacionesCA()
|
||||
DdlClasificacionesCA.Items.Clear()
|
||||
DdlClasificacionesCA.DataSource = GlobalDTAFCaracteristicasClasificaciones '.FiltraParametros(String.Format("CveSubTipoActivoFijo = {0}", DdlSubTiposActivosFijosCA.SelectedValue.ToEntero))
|
||||
DdlClasificacionesCA.DataBind()
|
||||
UpdatePanel1.Update()
|
||||
End Sub
|
||||
Protected Sub DdlTiposActivosFijosCA_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTiposActivosFijosCA.SelectedIndexChanged
|
||||
DdlSubTiposActivosFijosCA.Items.Clear()
|
||||
DdlSubTiposActivosFijosCA.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", DdlTiposActivosFijosCA.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
DdlSubTiposActivosFijosCA.DataBind()
|
||||
DdlSubTiposActivosFijosCA.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
Protected Sub DdlSubTiposActivosFijosCA_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTiposActivosFijosCA.SelectedIndexChanged
|
||||
'DdlClasificacionesCA.Items.Clear()
|
||||
'DdlClasificacionesCA.DataSource = GlobalDTAFCaracteristicasClasificaciones '.FiltraParametros(String.Format("CveSubTipoActivoFijo = {0}", DdlSubTiposActivosFijosCA.SelectedValue.ToEntero))
|
||||
'DdlClasificacionesCA.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "-- G V --"
|
||||
Protected Sub GvDatosCA_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosCA.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
|
||||
End If
|
||||
e.Row.Cells(0).Width = Unit.Pixel(95) 'TipoActivoFijo
|
||||
e.Row.Cells(1).Width = Unit.Pixel(100) 'SubTipoActivoFIjo
|
||||
e.Row.Cells(2).Width = Unit.Pixel(110) 'Clasificacion
|
||||
e.Row.Cells(3).Width = Unit.Pixel(120) 'Caracteristica
|
||||
e.Row.Cells(4).Width = Unit.Pixel(70) 'Orden
|
||||
e.Row.Cells(5).Width = Unit.Pixel(70) 'Longitud
|
||||
e.Row.Cells(6).Width = Unit.Pixel(80) 'Tipo
|
||||
e.Row.Cells(7).Width = Unit.Pixel(70) 'Requerido
|
||||
e.Row.Cells(8).Width = Unit.Pixel(70) 'Estatus
|
||||
e.Row.Cells(9).Width = Unit.Pixel(75) 'FechaIng
|
||||
e.Row.Cells(10).Width = Unit.Pixel(75) 'Usuario
|
||||
e.Row.Cells(11).Width = Unit.Pixel(55) '
|
||||
e.Row.Cells(12).Width = Unit.Pixel(61) '
|
||||
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
'If e.Row.DBCampo("SubTipoActivoFijo").ToString = "" Then
|
||||
' e.Row.FCLiteral("LtlSubTiposActivosFijosCA").Text = "Todos"
|
||||
'End If
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosCA").DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosCA").DataBind()
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosCA").SelectedValue = e.Row.DBCampo("CveTipoActivoFijo")
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosCA").DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} ", e.Row.FCDropDownList("DdlTiposActivosFijosCA").SelectedValue))
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosCA").DataBind()
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosCA").SelectedValue = e.Row.DBCampo("CveSubTipoActivoFijo")
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosCA").Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
Dim ObjClasificacion As New ClsAF
|
||||
If ObjClasificacion.GetCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
e.Row.FCDropDownList("DdlClasificacionesCA").DataSource = ObjClasificacion.DtResultados '.FiltraParametros("CveSubTipoActivoFijo = " & e.Row.FCDropDownList("DdlSubTiposActivosFijosCA").SelectedValue)
|
||||
e.Row.FCDropDownList("DdlClasificacionesCA").DataBind()
|
||||
e.Row.FCDropDownList("DdlClasificacionesCA").SelectedValue = e.Row.DBCampo("CveCaracteristicaClasificacion")
|
||||
End If
|
||||
|
||||
e.Row.FCDropDownList("DdlTipoCampoCA").SelectedValue = e.Row.DBCampo("TipoCampo")
|
||||
e.Row.FCDropDownList("DdlRequeridaCA").SelectedValue = If(e.Row.DBCampo("Requerida") = "True", "1", "0")
|
||||
ObjClasificacion.Dispose()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosCA_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosCA.RowDeleting
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
If ObjCaracteristicas.RemoveCaracteristica(GvDatosCA.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosCA.EditIndex = -1
|
||||
ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTAFCaracteristicas = ObjCaracteristicas.DtResultados
|
||||
Alert("La Característica se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosCA_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatosCA.RowCancelingEdit
|
||||
GvDatosCA.EditIndex = -1
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosCA_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatosCA.RowUpdating
|
||||
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
|
||||
Dim CveTipoActivoFijo As Integer = GvDatosCA.Rows(e.RowIndex).FCDropDownList("DdlTiposActivosFijosCA").SelectedValue.ToEntero
|
||||
Dim CveSubTipoActivoFijo As Integer = GvDatosCA.Rows(e.RowIndex).FCDropDownList("DdlSubTiposActivosFijosCA").SelectedValue.ToEntero
|
||||
Dim CveCaracteristicaClasificacion As Integer = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("DdlClasificacionesCA"), DropDownList).SelectedValue.ToEntero
|
||||
Dim Caracteristica As String = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("TxtCaracteristicaCA"), TextBox).Text.Trim
|
||||
Dim TipoCampo As Integer = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("DdlTipoCampoCA"), DropDownList).SelectedValue.ToEntero
|
||||
Dim Longitud As Integer = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("TxtLongitudCA"), TextBox).Text.Trim.ToEntero
|
||||
Dim Requerida As Integer = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("DdlRequeridaCA"), DropDownList).SelectedValue.ToEntero
|
||||
Dim Orden As Integer = DirectCast(GvDatosCA.Rows(e.RowIndex).FindControl("TxtOrdenCA"), TextBox).Text.Trim.ToEntero
|
||||
Dim Estatus As Boolean = GvDatosCA.Rows(e.RowIndex).FCCheckBox("ChkEstatusCA").Checked
|
||||
Dim CveCaracteristica As Integer = GvDatosCA.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjCaracteristicas.UpdateCaracteristica(CveCaracteristicaClasificacion, Caracteristica, CveTipoActivoFijo, CveSubTipoActivoFijo, TipoCampo, Longitud, CBool(Requerida), Orden, Estatus, UsuarioActual.CveEmpresa, CveCaracteristica) Then
|
||||
GvDatosCA.EditIndex = -1
|
||||
ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatosCA_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatosCA.RowEditing
|
||||
GvDatosCA.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
Else
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlTiposActivosFijosCA_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
Dim ddl1 As DropDownList = CType(sender, DropDownList)
|
||||
Dim gvr As GridViewRow = CType(ddl1.NamingContainer, GridViewRow)
|
||||
Dim ddl As DropDownList = gvr.FCDropDownList("DdlSubTiposActivosFijosCA")
|
||||
|
||||
ddl.Items.Clear()
|
||||
ddl.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", ddl1.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
ddl.DataBind()
|
||||
ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "OPCIONES"
|
||||
Protected Sub LbAgregarOpciones_Click(sender As Object, e As System.EventArgs) Handles LbAgregarOpciones.Click
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
If ObjCaracteristicas.AddCaracteristicasOpciones(TxtOpcion.Text, DdlCaracteristicaOpciones.SelectedValue.ToEntero, TxtOrdenOpciones.Text.Trim.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
|
||||
''Limpia datos
|
||||
TxtOpcion.Text = ""
|
||||
TxtOrdenOpciones.Text = ""
|
||||
Alert("La Nueva Opción de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulosOpciones.Update()
|
||||
End If
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
CargaDatosGridOpciones()
|
||||
'CargaSubTiposActivosFijosCA()
|
||||
End Sub
|
||||
|
||||
#Region "CARGA DATOS"
|
||||
Public Sub CargaDatosOpciones()
|
||||
CargaDatosGridOpciones()
|
||||
'CargaDdlClasificacionesOpiones()
|
||||
End Sub
|
||||
Private Sub CargaDatosGridOpciones()
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
If ObjCaracteristicas.GetCaracteristicasOpciones(-1, UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTCatacteristicaOpciones") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'GlobalDTAFCaracteristicas = ObjCaracteristicas.DtResultados
|
||||
Else
|
||||
Me.GvDatosOpciones.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenOpciones").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenOpciones").ToString(), 2)
|
||||
Else
|
||||
CargaGrid("", 2)
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub CargaDdlClasificacionesOpiones()
|
||||
' DdlClasificacionesOpciones.DataSource = GlobalDTAFCaracteristicasClasificaciones
|
||||
' DdlClasificacionesOpciones.DataBind()
|
||||
' DdlClasificacionesOpciones.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End Sub
|
||||
Protected Sub DdlTiposActivosFijosOpciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTiposActivosFijosOpciones.SelectedIndexChanged
|
||||
DdlSubTiposActivosFijosOpciones.Items.Clear()
|
||||
DdlSubTiposActivosFijosOpciones.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", DdlTiposActivosFijosOpciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
DdlSubTiposActivosFijosOpciones.DataBind()
|
||||
DdlSubTiposActivosFijosOpciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
FiltraCaracteristicas()
|
||||
End Sub
|
||||
Protected Sub DdlSubTiposActivosFijosOpciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTiposActivosFijosOpciones.SelectedIndexChanged
|
||||
'DdlClasificacionesOpciones.Items.Clear()
|
||||
|
||||
'Dim Filtro = If(DdlSubTiposActivosFijosOpciones.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0}", DdlSubTiposActivosFijosOpciones.SelectedValue.ToEntero), String.Format("CveTipoActivoFijo = {0}", DdlTiposActivosFijosOpciones.SelectedValue.ToEntero))
|
||||
|
||||
'DdlClasificacionesOpciones.DataSource = GlobalDTAFCaracteristicasClasificaciones '.FiltraParametros(Filtro)
|
||||
'DdlClasificacionesOpciones.DataBind()
|
||||
'DdlClasificacionesOpciones.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
FiltraCaracteristicas()
|
||||
End Sub
|
||||
'Protected Sub DdlClasificacionesOpciones_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacionesOpciones.SelectedIndexChanged
|
||||
' FiltraCaracteristicas()
|
||||
'End Sub
|
||||
Private Sub FiltraCaracteristicas()
|
||||
DdlCaracteristicaOpciones.Items.Clear()
|
||||
'Dim Filtro = String.Format("CveCaracteristicaClasificacion = {0} AND ", DdlClasificacionesOpciones.SelectedValue.ToEntero)
|
||||
Dim Filtro = If(DdlSubTiposActivosFijosOpciones.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0}", DdlSubTiposActivosFijosOpciones.SelectedValue.ToEntero), String.Format("CveTipoActivoFijo = {0}", DdlTiposActivosFijosOpciones.SelectedValue.ToEntero))
|
||||
DdlCaracteristicaOpciones.DataSource = GlobalDTAFCaracteristicas.FiltraParametros(Filtro)
|
||||
DdlCaracteristicaOpciones.DataBind()
|
||||
DdlCaracteristicaOpciones.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
'Private Sub CargaClasificacionesOpciones()
|
||||
' Dim ObjCaracteristicaClasificacionCl As New ClsAF
|
||||
' If ObjCaracteristicaClasificacionCl.GetSubTiposActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
' DdlClasificacionesOpciones.DataSource = ObjCaracteristicaClasificacionCl.DtResultados.FiltraParametros("CveSubTipoActivoFijo = " & DdlSubTiposActivosFijosOpciones.SelectedItem.ToEntero)
|
||||
' DdlClasificacionesOpciones.DataBind()
|
||||
' End If
|
||||
' ObjCaracteristicaClasificacionCl.Dispose()
|
||||
'End Sub
|
||||
'Private Sub CargaCaracteristicas()
|
||||
' Dim ObjCaracteristicaClasificacionCl As New ClsAF
|
||||
' If ObjCaracteristicaClasificacionCl.GetCaracteristicasOpciones(DdlCaracteristicaOpciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' DdlClasificacionesOpciones.DataSource = ObjCaracteristicaClasificacionCl.DtResultados '.FiltraParametros("CveSubTipoActivoFijo = " & DdlSubTiposActivosFijosOpciones.SelectedItem.ToEntero)
|
||||
' DdlClasificacionesOpciones.DataBind()
|
||||
' End If
|
||||
' ObjCaracteristicaClasificacionCl.Dispose()
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
#Region "-- G V --"
|
||||
Protected Sub GvDatosOpciones_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatosOpciones.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(170) 'TipoActivoFijo
|
||||
e.Row.Cells(1).Width = Unit.Pixel(170) 'SubTipoActivoFIjo
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(100) 'Clasificacion
|
||||
e.Row.Cells(2).Width = Unit.Pixel(170) 'Caracteristica
|
||||
e.Row.Cells(3).Width = Unit.Pixel(97) 'Opcion
|
||||
e.Row.Cells(4).Width = Unit.Pixel(80) 'Orden
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(50) 'Longitud
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(70) 'Tipo
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(50) 'Requerido
|
||||
e.Row.Cells(5).Width = Unit.Pixel(80) 'Estatus
|
||||
e.Row.Cells(6).Width = Unit.Pixel(81) 'FechaIng
|
||||
e.Row.Cells(7).Width = Unit.Pixel(81) 'Usuario
|
||||
e.Row.Cells(8).Width = Unit.Pixel(55) '
|
||||
e.Row.Cells(9).Width = Unit.Pixel(61) '
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
'If e.Row.DBCampo("SubTipoActivoFijo").ToString = "" Then
|
||||
' e.Row.FCLiteral("LtlSubTiposActivosFijosOpciones").Text = "Todos"
|
||||
'End If
|
||||
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosOpciones").DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosOpciones").DataBind()
|
||||
e.Row.FCDropDownList("DdlTiposActivosFijosOpciones").SelectedValue = e.Row.DBCampo("CveTipoActivoFijo")
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosOpciones").DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} ", e.Row.FCDropDownList("DdlTiposActivosFijosOpciones").SelectedValue))
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosOpciones").DataBind()
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosOpciones").Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
e.Row.FCDropDownList("DdlSubTiposActivosFijosOpciones").SelectedValue = e.Row.DBCampo("CveSubTipoActivoFijo")
|
||||
|
||||
e.Row.FCDropDownList("DdlCaracteristicasOpciones").DataSource = GlobalDTAFCaracteristicas
|
||||
e.Row.FCDropDownList("DdlCaracteristicasOpciones").DataBind()
|
||||
FiltraCaracteristicas1(e.Row.FCDropDownList("DdlTiposActivosFijosOpciones"), e.Row.FCDropDownList("DdlSubTiposActivosFijosOpciones"), e.Row.FCDropDownList("DdlCaracteristicasOpciones"))
|
||||
e.Row.FCDropDownList("DdlCaracteristicasOpciones").SelectedValue = e.Row.DBCampo("CveCaracteristica")
|
||||
'Dim ObjClasificacion As New ClsAF
|
||||
|
||||
|
||||
'If ObjClasificacion.GetCaracteristicasOpciones(-1, UsuarioActual.CveEmpresa) Then
|
||||
' e.Row.FCDropDownList("DdlCaracteristicasOpciones").DataSource = ObjClasificacion.DtResultados
|
||||
' e.Row.FCDropDownList("DdlCaracteristicasOpciones").DataBind()
|
||||
' e.Row.FCDropDownList("DdlCaracteristicasOpciones").SelectedValue = e.Row.DBCampo("CveCaracteristica")
|
||||
'End If
|
||||
'e.Row.FCDropDownList("DdlTipoCampoOpciones").SelectedValue = e.Row.DBCampo("TipoCampo")
|
||||
'e.Row.FCDropDownList("DdlRequeridaOpciones").SelectedValue = If(e.Row.DBCampo("Requerida") = "True", "1", "0")
|
||||
'ObjClasificacion.Dispose()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosOpciones_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatosOpciones.RowDeleting
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
|
||||
If ObjCaracteristicas.RemoveCaracteristicasOpciones(GvDatosOpciones.Rows(e.RowIndex).DataKey("CveCaracteristicaOpcion").ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosOpciones.EditIndex = -1
|
||||
|
||||
CargaDatosOpciones()
|
||||
'ViewState("DTCatacteristicaOpciones") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
'GlobalDTAFCaracteristicas = ObjCaracteristicas.DtResultados
|
||||
Alert("La Opción se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenOpciones").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenOpciones").ToString(), 2)
|
||||
Else
|
||||
CargaGrid("", 2)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosOpciones_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatosOpciones.RowCancelingEdit
|
||||
GvDatosOpciones.EditIndex = -1
|
||||
If ViewState("OrdenOpciones").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenOpciones").ToString(), 2)
|
||||
Else
|
||||
CargaGrid("", 2)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatosOpciones_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatosOpciones.RowUpdating
|
||||
Dim ObjCaracteristicas As New ClsAF
|
||||
|
||||
Dim CaracteristicaOpcion = GvDatosOpciones.Rows(e.RowIndex).FCTextBox("TxtCaracteristicaOpciones").Text
|
||||
Dim Orden = GvDatosOpciones.Rows(e.RowIndex).FCTextBox("TxtOrdenOpciones").Text.ToEntero
|
||||
Dim Estatus As Boolean = GvDatosOpciones.Rows(e.RowIndex).FCCheckBox("ChkEstatusOpciones").Checked
|
||||
Dim CveCaracteristicaOpcion = GvDatosOpciones.Rows(e.RowIndex).DataKey("CveCaracteristicaOpcion").ToString.ToEntero
|
||||
Dim CveCaracteristica = GvDatosOpciones.Rows(e.RowIndex).FCDropDownList("DdlCaracteristicasOpciones").SelectedValue.ToEntero
|
||||
|
||||
If ObjCaracteristicas.UpdateCaracteristicasOpciones(CveCaracteristica, CaracteristicaOpcion, Orden, Estatus, CveCaracteristicaOpcion, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosOpciones.EditIndex = -1
|
||||
ViewState("DTCatacteristicaOpciones") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjCaracteristicas.Dispose()
|
||||
|
||||
If ViewState("OrdenOpciones").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenOpciones").ToString(), 2)
|
||||
Else
|
||||
CargaGrid("", 2)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatosOpciones_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatosOpciones.RowEditing
|
||||
GvDatosOpciones.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("OrdenOpciones").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenOpciones").ToString(), 2)
|
||||
Else
|
||||
CargaGrid("", 2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlTiposActivosFijosOpciones_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
Dim ddlT As DropDownList = CType(sender, DropDownList)
|
||||
Dim gvr As GridViewRow = CType(ddlT.NamingContainer, GridViewRow)
|
||||
Dim ddlST As DropDownList = gvr.FCDropDownList("DdlSubTiposActivosFijosOpciones")
|
||||
Dim ddlC As DropDownList = gvr.FCDropDownList("DdlCaracteristicasOpciones")
|
||||
|
||||
ddlST.Items.Clear()
|
||||
ddlST.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", ddlT.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
ddlST.DataBind()
|
||||
ddlST.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
FiltraCaracteristicas1(ddlT, ddlST, ddlC)
|
||||
End Sub
|
||||
Protected Sub DdlSubTiposActivosFijosOpciones_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
Dim ddlST As DropDownList = CType(sender, DropDownList)
|
||||
Dim gvr As GridViewRow = CType(ddlST.NamingContainer, GridViewRow)
|
||||
Dim ddlT As DropDownList = gvr.FCDropDownList("DdlTiposActivosFijosOpciones")
|
||||
Dim ddlC As DropDownList = gvr.FCDropDownList("DdlCaracteristicasOpciones")
|
||||
|
||||
FiltraCaracteristicas1(ddlT, ddlST, ddlC)
|
||||
End Sub
|
||||
Private Sub FiltraCaracteristicas1(ddlT As DropDownList, ddlST As DropDownList, ddlC As DropDownList)
|
||||
ddlC.Items.Clear()
|
||||
'Dim Filtro = String.Format("CveCaracteristicaClasificacion = {0} AND ", DdlClasificacionesOpciones.SelectedValue.ToEntero)
|
||||
Dim Filtro = If(ddlST.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0}", ddlST.SelectedValue.ToEntero), String.Format("CveTipoActivoFijo = {0}", ddlT.SelectedValue.ToEntero))
|
||||
ddlC.DataSource = GlobalDTAFCaracteristicas.FiltraParametros(Filtro)
|
||||
ddlC.DataBind()
|
||||
ddlC.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Function FncTipoCampo(TipoCampo As Integer) As String
|
||||
Dim Retorno As String = ""
|
||||
Select Case TipoCampo
|
||||
Case 0 : Retorno = "Texto"
|
||||
Case 1 : Retorno = "Listado"
|
||||
Case 2 : Retorno = "Radio"
|
||||
Case 3 : Retorno = "Fecha"
|
||||
Case 4 : Retorno = "Multiline"
|
||||
Case 5 : Retorno = "Checkbox"
|
||||
Case 6 : Retorno = "Numerico"
|
||||
Case 7 : Retorno = "1"
|
||||
End Select
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim gvi As Integer = 0
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
gvi = Arg(1).ToEntero
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
Campo = Campo.Substring(0, Campo.Length - 1)
|
||||
If ViewState(String.Format("O{0}", Campo, gvi)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo, gvi)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo, gvi)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo, gvi)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden, gvi)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String, gvi As Integer)
|
||||
If gvi = 0 Then
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTCaracteristicaClasificacion"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatosCL.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatosCL.DataSource = CType(ViewState("DTCaracteristicaClasificacion"), DataTable)
|
||||
End If
|
||||
GvDatosCL.DataBind()
|
||||
UpDatosCL.Update()
|
||||
ElseIf gvi = 1 Then
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTCatacteristica"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatosCA.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatosCA.DataSource = CType(ViewState("DTCatacteristica"), DataTable)
|
||||
End If
|
||||
GvDatosCA.DataBind()
|
||||
UpDatosCA.Update()
|
||||
ElseIf gvi = 2 Then
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTCatacteristicaOpciones"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatosOpciones.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatosOpciones.DataSource = CType(ViewState("DTCatacteristicaOpciones"), DataTable)
|
||||
End If
|
||||
GvDatosOpciones.DataBind()
|
||||
UpDatosOpciones.Update()
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
104
AF/CatMarcas.aspx
Normal file
104
AF/CatMarcas.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMarcas.aspx.vb" Inherits="AF_CatMarcas" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Marcas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkMarca" runat="server"><i class="fa fa-plus"></i>Agregar Marca</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvMarcas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvMarcas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvMarcas" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveMarcaActivoFijo,MarcaActivoFijo,Estatus,FechaIng,CveUsuario,CveEmpresa" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Operadores">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="MarcaActivoFijo" HeaderText="Marca" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-xs green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="Delete_Click" 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>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<%--POPUP AGREGAR--%>
|
||||
<div id="DivAddMarcas" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddMarca" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Marca</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyMarcha" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMarca" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOperador" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtMarca" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMarca.ClientID.ToString()%>">Marca:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarMarca" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i>Agregar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
108
AF/CatMarcas.aspx.vb
Normal file
108
AF/CatMarcas.aspx.vb
Normal file
@@ -0,0 +1,108 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatMarcas
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
#End Region
|
||||
Private Sub AF_CatOperadores_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA´S"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF
|
||||
If ObjAF.GetMarcasActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
GvMarcas.DataSource = ObjAF.DtResultados
|
||||
GvMarcas.DataBind()
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "A G R E G A R M A R C A"
|
||||
Private Sub LnkMarca_Click(sender As Object, e As EventArgs) Handles LnkMarca.Click
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarMarca.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Marca"
|
||||
TxtMarca.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddMarca.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddMarcas"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarMarca_Click(sender As Object, e As EventArgs) Handles BtnAgregarMarca.Click
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim Estatus = False
|
||||
If ChkEstatus.Checked Then Estatus = True
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAF.AddMarcasActivosFijos(TxtMarca.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjAF.UpdateMarcasActivosFijos(HdnID.Value.ToEntero, TxtMarca.Text.Trim, Estatus, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddMarcas"))
|
||||
CargaDatos()
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveMarcaActivoFijo")
|
||||
UpDatos.Update()
|
||||
BtnAgregarMarca.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Marca"
|
||||
TxtMarca.Text = GvRow.DataKey("MarcaActivoFijo")
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
UpAddMarca.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddMarcas"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "GV "
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAF As New ClsAF()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveMarcaActivoFijo")
|
||||
UpDatos.Update()
|
||||
If ObjAF.RemoveMarcasActivosFijos(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvMarcas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Estatus") = "Activo" Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
110
AF/CatModelos.aspx
Normal file
110
AF/CatModelos.aspx
Normal file
@@ -0,0 +1,110 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatModelos.aspx.vb" Inherits="AF_CatModelos" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Modelos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkModelo" runat="server"><i class="fa fa-plus"></i>Agregar Modelo</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvModelos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvModelos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvModelos" runat="server" GridLines="None" data-sort="true" DataKeyNames="CveModeloActivoFijo,ModeloActivoFijo,Estatus,FechaIng,CveUsuario,CveEmpresa,CveMarcaActivoFijo,MarcaActivoFijo" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Operadores">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ModeloActivoFijo" HeaderText="Modelo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="MarcaActivoFijo" HeaderText="Marca" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-xs green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="Delete_Click" 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>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<%--POPUP AGREGAR--%>
|
||||
<div id="DivAddModelos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddModelos" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Modelo</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyModelo" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtModelo" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVModelo" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtModelo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtModelo.ClientID.ToString()%>">Modelo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMarcaActivoFijo" runat="server" DataValueField="CveMarcaActivoFijo" DataTextField="MarcaActivoFijo" CssClass="form-control select2me" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMarcaActivoFijo" runat="server" ControlToValidate="DdlMarcaActivoFijo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlMarcaActivoFijo.ClientID.ToString()%>">Marca:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarModelo" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i>Agregar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
119
AF/CatModelos.aspx.vb
Normal file
119
AF/CatModelos.aspx.vb
Normal file
@@ -0,0 +1,119 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatModelos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
#End Region
|
||||
Private Sub AF_CatOperadores_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaMarcaAF()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGA´S"
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF
|
||||
If ObjAF.GetModelosActivosFijos(UsuarioActual.CveEmpresa, -1) Then
|
||||
GvModelos.DataSource = ObjAF.DtResultados
|
||||
GvModelos.DataBind()
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaMarcaAF()
|
||||
Dim ObjAF As New ClsAF
|
||||
If ObjAF.GetMarcasActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaActivoFijo.DataSource = ObjAF.DtResultados
|
||||
DdlMarcaActivoFijo.DataBind()
|
||||
End If
|
||||
DdlMarcaActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "A G R E G A R M A R C A"
|
||||
Private Sub LnkModelo_Click(sender As Object, e As EventArgs) Handles LnkModelo.Click
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarModelo.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Modelo"
|
||||
TxtModelo.Text = ""
|
||||
DdlMarcaActivoFijo.SelectedIndex = 0
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
UpAddModelos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddModelos"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarModelo_Click(sender As Object, e As EventArgs) Handles BtnAgregarModelo.Click
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim Estatus = False
|
||||
If ChkEstatus.Checked Then Estatus = True
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAF.AddModelosActivosFijos(TxtModelo.Text.Trim, DdlMarcaActivoFijo.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If ObjAF.UpdateModelosActivosFijos(HdnID.Value.ToEntero, TxtModelo.Text.Trim, DdlMarcaActivoFijo.SelectedValue.ToEntero, Estatus, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddModelos"))
|
||||
CargaDatos()
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveModeloActivoFijo")
|
||||
UpDatos.Update()
|
||||
BtnAgregarModelo.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Modelo"
|
||||
TxtModelo.Text = GvRow.DataKey("ModeloActivoFijo")
|
||||
DdlMarcaActivoFijo.SelectedValueExist(GvRow.DataKey("CveMarcaActivoFijo"))
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
|
||||
UpAddModelos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddModelos"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "GV "
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAF As New ClsAF()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnID.Value = GvRow.DataKey("CveModeloActivoFijo")
|
||||
UpDatos.Update()
|
||||
If ObjAF.RemoveModelosActivosFijos(HdnID.Value.ToEntero) Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Private Sub GvModelo_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvModelos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Estatus") = "Activo" Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
146
AF/CatSubTipos.aspx
Normal file
146
AF/CatSubTipos.aspx
Normal file
@@ -0,0 +1,146 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatSubTipos.aspx.vb" Inherits="AF_CatSubTipos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de SubTipos de Activo Fijo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped Widthall">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbTipoActivoFijo" runat="server" CausesValidation="false" Text="" CommandArgument="TipoActivoFijo" OnClick="LbOrden_Click">
|
||||
Tipos
|
||||
<asp:Literal ID="ImgTipoActivoFijo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="200px">
|
||||
<asp:LinkButton ID="LbSubTipoActivoFijo" runat="server" CausesValidation="false" Text="" CommandArgument="SubTipoActivoFijo" OnClick="LbOrden_Click">
|
||||
SubTipos
|
||||
<asp:Literal ID="ImgSubTipoActivoFijo" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="85px">
|
||||
<asp:LinkButton ID="LbEstatus" runat="server" CausesValidation="false" Text="" CommandArgument="Estatus" OnClick="LbOrden_Click">
|
||||
Estatus
|
||||
<asp:Literal ID="ImgEstatus" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="80px">
|
||||
<asp:LinkButton ID="LbFechaIng" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng" OnClick="LbOrden_Click">
|
||||
Fecha
|
||||
<asp:Literal ID="ImgFechaIng" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="100px">
|
||||
<asp:LinkButton ID="LbUsuario" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="165px">Comandos</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipos" runat="server" AppendDataBoundItems="true" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" ValidationGroup="GrpGuardar" Width="190px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipos" runat="server" ControlToValidate="DdlTipos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipos''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipos" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSubTipos" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="190px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSubTipos" runat="server" ControlToValidate="TxtSubTipos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubTipos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTipos" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTipos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td style="text-align: center">
|
||||
<asp:LinkButton ID="LbAgregar" runat="server" CausesValidation="true" CssClass="Texto" Text="Agregar" ValidationGroup="GrpGuardar"></asp:LinkButton></td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubTipoActivoFijo" EmptyDataText="No se encontraron SubTipos" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="206px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipos" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlTipos" runat="server" DataValueField="CveTipoActivoFijo" DataTextField="TipoActivoFijo" Width="184px"></asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="206px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTipos" runat="server" Text='<%# Eval("SubTipoActivoFijo", "{0}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtSubTipos" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("SubTipoActivoFijo")%>' ValidationGroup="GrpEditGuardar" Width="184px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVSubTipos" runat="server" ControlToValidate="TxtSubTipos" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubTipos''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTipos" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTipos" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</EditItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="85px" />
|
||||
<EditItemTemplate>
|
||||
<asp:CheckBox ID="ChkEstado" runat="server" Checked='<%# If(Eval("Estatus").ToString = "Activo", "True", "False") %>' />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="75px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Editar">
|
||||
<EditItemTemplate>
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpEditGuardar" />
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" ToolTip="Editar" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el SubTipo?" data-btn-ok-label="si"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el SubTipo?');
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
207
AF/CatSubTipos.aspx.vb
Normal file
207
AF/CatSubTipos.aspx.vb
Normal file
@@ -0,0 +1,207 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatSubTipos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
ViewState("Orden") = ""
|
||||
CargaTipos()
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipos()
|
||||
DdlTipos.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlTipos.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGlobal()
|
||||
Dim ObjSubTipos As New ClsAF
|
||||
If ObjSubTipos.GetSubTiposActivosFijos(-1) Then
|
||||
GlobalDTSubTipoActivoFijo(-1) = ObjSubTipos.DtResultados
|
||||
End If
|
||||
ObjSubTipos.Dispose()
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjSubTipos As New ClsAF
|
||||
If ObjSubTipos.GetSubTiposActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
ViewState("DTSubTipos") = ObjSubTipos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjSubTipos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
CargaGlobal()
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
|
||||
If e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5 Then
|
||||
e.Row.FCDropDownList("DdlTipos").DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
e.Row.FCDropDownList("DdlTipos").DataBind()
|
||||
e.Row.FCDropDownList("DdlTipos").SelectedValue = e.Row.DBCampo("CveTipoActivoFijo")
|
||||
End If
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(5).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(65)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjSubTipos As New ClsAF
|
||||
Dim TieneError = False
|
||||
|
||||
If ObjSubTipos.RemoveSubTiposActivosFijos(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubTipos") = ObjSubTipos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Alert("El SubTipos se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("OCurrió un error al eliminar el sub tipo del Activo Fijo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
ObjSubTipos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
GvDatos.EditIndex = -1
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
Dim ObjSubTipos As New ClsAF
|
||||
Dim TieneError = False
|
||||
|
||||
Dim CveTipos As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlTipos"), DropDownList).SelectedValue.ToEntero
|
||||
Dim SubTipos As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtSubTipos"), TextBox).Text.Trim
|
||||
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstado").Checked
|
||||
Dim CveSubTipos As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
If ObjSubTipos.UpdateSubTiposActivosFijos(CveSubTipos, CveTipos, SubTipos, Estatus, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTSubTipos") = ObjSubTipos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("OCurrió un error al actualizar el sub tipo del Activo Fijo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
|
||||
ObjSubTipos.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim Orden As String = ""
|
||||
Dim Campo As String = ""
|
||||
Dim Literal As Literal = Nothing
|
||||
Const OrdenInicial As String = ""
|
||||
Dim Arg(2) As String
|
||||
|
||||
Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c)
|
||||
Campo = Arg(0)
|
||||
Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal)
|
||||
|
||||
If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-asc' style='color:#999' ></i>")
|
||||
Else
|
||||
ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo)
|
||||
Literal.Text = String.Format("<i class='fa fa-sort-desc' style='color:#999' ></i>")
|
||||
End If
|
||||
Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString
|
||||
ViewState("Orden") = Orden
|
||||
CargaGrid(Orden)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGrid(Orden As String)
|
||||
If Orden <> String.Empty Then
|
||||
Dim DV As New DataView(CType(ViewState("DTSubTipos"), DataTable), "", Orden, DataViewRowState.CurrentRows)
|
||||
GvDatos.DataSource = DV.ToTable()
|
||||
DV.Dispose()
|
||||
Else
|
||||
GvDatos.DataSource = CType(ViewState("DTSubTipos"), DataTable)
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim TieneError = False
|
||||
|
||||
If ObjAF.AddSubTiposActivosFijos(DdlTipos.SelectedValue.ToEntero, TxtSubTipos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TxtSubTipos.Text = ""
|
||||
Alert("El nuevo SubTipo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulos.Update()
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
147
AF/CatTipos.aspx
Normal file
147
AF/CatTipos.aspx
Normal file
@@ -0,0 +1,147 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatTipos.aspx.vb" Inherits="AF_CatTipos" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Tipos de Activos Fijos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTipoAF" runat="server"><i class="fa fa-plus"></i>Agregar Tipo Activo Fijo</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoActivoFijo,TipoActivoFijo,PorDepreciacion,Conta_CuentaInicial,Estado,MedidaVehicularClave,AutoFolio,Contable" EmptyDataText="No se encontraron Tipos Registrados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="TipoActivoFijo" HeaderText="Tipo Activo Fijo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PorDepreciacion" HeaderText="Depreciacion Anual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Conta_CuentaInicial" HeaderText="Cuenta Inicial" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField DataField="MedidaVehicular" HeaderText="Medida Vehicular" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estado") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" OnClick="Edit_Click" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" OnClick="Delete_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm 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>
|
||||
<asp:HiddenField ID="HdnModalidad" runat="server" Value="A" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<%--POPUP AGREGAR--%>
|
||||
<div id="DivAddTipoAF" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddTipoAF" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Tipo Activo Fijo</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyTipoAF" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipo" runat="server" MaxLength="50" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtTipo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTipo.ClientID.ToString()%>">Tipo Activo Fijo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDepreciacionAF" runat="server" MaxLength="6" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RegularExpressionValidator ID="REDepreciacion" runat="server" ControlToValidate="TxtDepreciacionAF" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Porcentaje Depreciacion''</b> solo permite 2 Decimales." Operator="DataTypeCheck" ValidationExpression="^(\d{1}\.)?(\d+\.?)+(,\d{2})?$" ValidationGroup="GrpGuardar"></asp:RegularExpressionValidator>
|
||||
<asp:RangeValidator ID="RVDepreciacion" runat="server" Type="Currency" ControlToValidate="TxtDepreciacionAF" CssClass="help-block errorimput" MinimumValue="0" MaximumValue="100" ErrorMessage="El porcentaje no puede ser mayor de 100" ValidationGroup="GrpGuardar"></asp:RangeValidator>
|
||||
<label for="<%= TxtDepreciacionAF.ClientID.ToString()%>">Depreciación Anual %</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= DdlMedidaVehicular.ClientID.ToString()%>">Medida Vehicular</label>
|
||||
<asp:DropDownList ID="DdlMedidaVehicular" runat="server" Width="100%" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Ninguna" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Odómetro" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Horómetro" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="TdCuentaInicial" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlCuentaInicial" runat="server" Width="100%" CssClass="form-control select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.1 Mobiliario y Equipo de Administración" Value="1241"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.2 Mobiliario y Equipo Educacional y Recreativo" Value="1242"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.3 Equipo e Instrumental Médico y de Laboratorio" Value="1243"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.4 Vehículos y Equipo de Transporte Nombre de cuenta mejorado DOF 02-01-2013" Value="1244"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.5 Equipo de Defensa y Seguridad" Value="1245"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.6 Maquinaria, Otros Equipos y Herramientas" Value="1246"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.7 Colecciones, Obras de Arte y Objetos Valiosos" Value="1247"></asp:ListItem>
|
||||
<asp:ListItem Text="1.2.4.8 Activos Biológicos" Value="1248"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuentaInicial" runat="server" ControlToValidate="DdlCuentaInicial" InitialValue="-1" Display="None" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta Inicial''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlCuentaInicial.ClientID.ToString()%>">Cuenta Inicial</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DivAutoFolio" runat="server">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<label for="<%= ChkFolio.ClientID.ToString()%>">Auto Folio:</label>
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" CssClass="form-control" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label for="<%= ChkContable.ClientID.ToString()%>">Contable:</label>
|
||||
<asp:CheckBox ID="ChkContable" runat="server" CssClass="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="divEstatus" runat="server">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnAgregarTipoAF" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpGuardar"> <i class='material-icons'>done_all</i>Agregar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function C() {
|
||||
return confirm('¿Está seguro que desea eliminar el Tipo de Activo Fijo?');
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
153
AF/CatTipos.aspx.vb
Normal file
153
AF/CatTipos.aspx.vb
Normal file
@@ -0,0 +1,153 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatTipos
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TdCuentaInicial.Visible = True
|
||||
GvDatos.Columns(3).Visible = True
|
||||
GvDatos.Columns(1).Visible = True
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "AGREGAR / ACTUALIZAR"
|
||||
Private Sub LnkTipoAF_Click(sender As Object, e As EventArgs) Handles LnkTipoAF.Click
|
||||
HdnModalidad.Value = "A"
|
||||
UpDatos.Update()
|
||||
BtnAgregarTipoAF.Text = "Agregar"
|
||||
myModalLabel.InnerText = "Agregar Tipo Activo Fijo"
|
||||
TxtTipo.Text = ""
|
||||
TxtDepreciacionAF.Text = ""
|
||||
DdlCuentaInicial.SelectedIndex = 0
|
||||
DdlMedidaVehicular.SelectedIndex = 0
|
||||
ChkFolio.Checked = False
|
||||
ChkContable.Checked = False
|
||||
divEstatus.Visible = False
|
||||
UpAddTipoAF.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddTipoAF"))
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
HdnModalidad.Value = "U"
|
||||
HdnID.Value = GvRow.DataKey("CveTipoActivoFijo")
|
||||
UpDatos.Update()
|
||||
BtnAgregarTipoAF.Text = "Actualizar"
|
||||
myModalLabel.InnerText = "Actualizar Tipo Activo Fijo"
|
||||
TxtTipo.Text = GvRow.DataKey("TipoActivoFijo")
|
||||
TxtDepreciacionAF.Text = GvRow.DataKey("PorDepreciacion")
|
||||
|
||||
DdlCuentaInicial.SelectedValueExist(GvRow.DataKey("Conta_CuentaInicial"))
|
||||
|
||||
If GvRow.DataKey("MedidaVehicularClave").ToEntero > 0 Then
|
||||
DdlMedidaVehicular.SelectedValueExist(GvRow.DataKey("MedidaVehicularClave"))
|
||||
Else
|
||||
DdlMedidaVehicular.SelectedIndex = 0
|
||||
End If
|
||||
|
||||
ChkFolio.Checked = CBool(If(GvRow.DataKey("AutoFolio") = "Activo", True, False))
|
||||
ChkContable.Checked = CBool(If(GvRow.DataKey("Contable") = "Activo", True, False))
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = CBool(If(GvRow.DataKey("Estado") = "Activo", True, False))
|
||||
UpAddTipoAF.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddTipoAF"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarTipoAF_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoAF.Click
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim TieneError = False
|
||||
Dim Estatus = False
|
||||
If ChkEstatus.Checked Then Estatus = True Else Estatus = False
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If Not ObjAF.AddTiposActivosFijos(TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal, MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf HdnModalidad.Value = "U" Then
|
||||
If Not ObjAF.UpdateTiposActivosFijos(HdnID.Value.ToEntero, TxtTipo.Text.Trim, DdlCuentaInicial.SelectedValue.ToEntero, Estatus, PorDepreciacion:=TxtDepreciacionAF.Text.ToDecimal, MedidaVehicular:=DdlMedidaVehicular.SelectedValue.ToEntero, AutoFolio:=ChkFolio.Checked, Contable:=ChkContable.Checked) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
Alert("Agregado / Actualizado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddTipoAF"))
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
CargaDatos()
|
||||
CargaGlobal()
|
||||
Else
|
||||
Alert("Ha Ocurrido un error al Agregar o Actualizar", TipoMensaje.MsgInformacion)
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddTipoAF"))
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjTipo As New ClsAF
|
||||
If ObjTipo.GetTiposActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjTipo.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
|
||||
ObjTipo.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaGlobal()
|
||||
Dim ObjTipo As New ClsAF
|
||||
If ObjTipo.GetTiposActivosFijos(-1) Then
|
||||
GlobalDTTipoActivoFijo(-1) = ObjTipo.DtResultados
|
||||
End If
|
||||
ObjTipo.Dispose()
|
||||
End Sub
|
||||
|
||||
#Region " G V - D A T O S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Estado") = "Activo" Then
|
||||
e.Row.FCLabel("LblEstatus").Text = "Activo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green
|
||||
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").Text = "Inactivo"
|
||||
e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Delete_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjAF As New ClsAF()
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim TieneError = False
|
||||
|
||||
HdnID.Value = GvRow.DataKey("CveTipoActivoFijo")
|
||||
UpDatos.Update()
|
||||
If Not ObjAF.RemoveTiposActivosFijos(HdnID.Value.ToEntero) Then
|
||||
TieneError = True
|
||||
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
CargaDatos()
|
||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||
ObjAF.Dispose()
|
||||
UpDatos.Update()
|
||||
CargaGlobal()
|
||||
Else
|
||||
Alert("Ha ocurrido un error al eliminar", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
459
AF/PopUpBuscarAF.aspx
Normal file
459
AF/PopUpBuscarAF.aspx
Normal file
@@ -0,0 +1,459 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpBuscarAF.aspx.vb" Inherits="AF_PopUpBuscarAF" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.truncate {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 750px !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Búsqueda de Activos Fijos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
|
||||
function Ir(c) {
|
||||
gotourl('/AF/AF.aspx?CveActivoFijo=' + c);
|
||||
|
||||
}
|
||||
function Ir2(c) {
|
||||
debugger;
|
||||
window.opener.CargaActivoFijo(c);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
}
|
||||
function Ir3(L, H1, H2, Cve, Cod, Serie) {
|
||||
window.opener.CargaActivoFijo(L, H1, H2, Cve, Cod, Serie);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
}
|
||||
function Ir4(cve, codigo) {
|
||||
window.opener.CargaActivoFijo(cve, codigo);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
}
|
||||
function Ir5(cve, codigo, ri) {
|
||||
window.opener.CargaActivoFijoEdit(cve, codigo, ri);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
}
|
||||
|
||||
function Ir6(cve, tipo) {
|
||||
window.opener.CargaActivoFijo(cve, tipo);
|
||||
window.close();
|
||||
parent.$('#ajax').modal('hide');
|
||||
}
|
||||
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 350;
|
||||
if (Alto < 200) { Alto = 200; }
|
||||
Alto = 200;
|
||||
$('#gv-container').css({ 'max-height': Alto + 'px' });
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
});
|
||||
</script>
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="Widthall">
|
||||
<%--tablenobottomborder--%>
|
||||
<tr>
|
||||
<th class="Titulos" colspan="4">Filtros para búsqueda</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Código:</b></td>
|
||||
<td align="left" colspan="3">
|
||||
<asp:TextBox ID="TxtCodigo" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="200px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Descripción:</b></td>
|
||||
<td align="left" colspan="3">
|
||||
<asp:TextBox ID="TxtDescripcion" CssClass="form-control input-sm" runat="server" MaxLength="70" Width="400px"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion del ActivoFijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Tipo de Activo Fijo:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlTipoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoActivoFijo" runat="server" ControlToValidate="DdlTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%--</tr>--%>
|
||||
<%--<tr>--%>
|
||||
<td class="text-right"><b>SubTipo de Activo Fijo:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubTipoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubTipoActivoFijo" runat="server" ControlToValidate="DdlSubTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubTipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<%-- <tr>
|
||||
<td>Modelo:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlModeloActivoFijo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="ModeloActivoFijo" DataValueField="CveModeloActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVModeloActivoFijo" runat="server" ControlToValidate="DdlModeloActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOModeloActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVModeloActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Marca:</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMarcaActivoFijo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="MarcaActivoFijo" DataValueField="CveMarcaActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMarcaActivoFijo" runat="server" ControlToValidate="DdlMarcaActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOMarcaActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVMarcaActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
</tr>--%>
|
||||
<tr>
|
||||
<td class="text-right"><b>NoSerie:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtNoSerie" CssClass="form-control input-sm" runat="server" MaxLength="50" Width="200px"></asp:TextBox>
|
||||
</td>
|
||||
<%-- </tr>
|
||||
<tr>--%>
|
||||
<td class="text-right"><b>Año:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtAño" CssClass="form-control input-sm" runat="server" MaxLength="13" Width="200px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Estado:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlEstadoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo" Width="200px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Estado Asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEstadoActivoFijo" runat="server" ControlToValidate="DdlEstadoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOEstadoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVEstadoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<%-- </tr>
|
||||
<tr>--%>
|
||||
<td class="text-right"><b>Responsable:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlResponsable" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CvePersonal" Width="200px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Responsable Asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Proyecto:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="200px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Proyecto asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<%-- </tr>
|
||||
<tr>--%>
|
||||
<td class="text-right"><b>SubProyecto:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin SubProyecto asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Cliente:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlCliente" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Nombre" DataValueField="CveCliente" Width="200px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Selected="True" Text="Sin Cliente Asignado" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center;" align="center" colspan="4">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" />
|
||||
<%-- </td>
|
||||
<td align="center" colspan="2">--%>
|
||||
<asp:Button ID="BtnAFAceptar" runat="server" Text="Vincular" Visible="false" OnClick="BtnAFAceptar_Click" class="btn btn-primary" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%-- <tr>
|
||||
<td colspan="4">--%>
|
||||
<asp:GridView ID="GvCaracteristicas" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover table-advance Widthall" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion,CveCaracteristica,TipoCampo,Requerida" ShowHeader="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle BorderStyle="None" />
|
||||
<ItemTemplate>
|
||||
<asp:Panel ID="PnlClasif" Visible="False" runat="server">
|
||||
<div style="width: 100%" class="SubTotales">
|
||||
<asp:Label ID="LblClasif" runat="server" Text=""></asp:Label>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<div style="width: 130px; display: inline-block;">
|
||||
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica", "{0}:")%>'></asp:Label>
|
||||
</div>
|
||||
<div style="display: inline-block;">
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="400px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtValorNum" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="50px"></asp:TextBox>
|
||||
<asp:ImageButton ID="ImgTxtValor" runat="server" AlternateText="Click para ver el Calendario" Height="16px" ImageAlign="AbsMiddle" ImageUrl="/Imagenes/calendar.png" Visible="false" Width="16px" />
|
||||
<ajax:MaskedEditExtender ID="MEETxtValor" runat="server" AcceptNegative="Left" DisplayMoney="Left" Enabled="false" Mask="99/99/9999" MaskType="Date" TargetControlID="TxtValor" UserDateFormat="DayMonthYear"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtValor" runat="server" Enabled="False" PopupButtonID="ImgTxtValor" PopupPosition="BottomRight" TargetControlID="TxtValor"></ajax:CalendarExtender>
|
||||
<asp:DropDownList ID="DdlRespuesta" runat="server" Width="206px" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" Visible="false" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RadioButtonList ID="RbRespuesta" runat="server" Font-family="sans serif" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" RepeatDirection="Vertical" ValidationGroup="GrpGuardar" Visible="false"></asp:RadioButtonList>
|
||||
<asp:CheckBox ID="ChbValor" runat="server" ValidationGroup="GrpGuardar" Visible="false" />
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVRbRespuesta" runat="server" ControlToValidate="DdlRespuesta" Enabled="false" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCORbRespuesta" runat="server" HighlightCssClass="vco" TargetControlID="RFVRbRespuesta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVTxtValor" Enabled="false" runat="server" ControlToValidate="TxtValor" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
|
||||
<asp:HiddenField ID="HdnEsOpcion" runat="server" Value='<%# Eval("TipoCampo")%>' />
|
||||
<asp:HiddenField ID="HdnCveCaracteristica" runat="server" Value='<%# Eval("CveCaracteristica")%>' />
|
||||
<asp:HiddenField ID="HdnCveValor" runat="server" Value="-1" />
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<%--</td>
|
||||
</tr>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table id="TblBusqueda" runat="server" class="Widthall" visible="false">
|
||||
<%--table table-striped table-advance table-hover style="width: 750px;"--%>
|
||||
<tr>
|
||||
<td align="left">Número de registros encontrados: <b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="DivBeneficiarios">
|
||||
<asp:HiddenField ID="HdnAFCveActivoFijo" runat="server" />
|
||||
<asp:HiddenField ID="HdnAFCodigo" runat="server" />
|
||||
<div class="table-VH">
|
||||
<div id="gv-container" class="table-VH-container">
|
||||
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" DataKeyNames="Codigo,CveActivoFijo,NoSerie" EmptyDataText="No se encontraron registros" ToolTip="Listado de Activos Fijos Encontrados." CssClass="Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código" ItemStyle-CssClass="truncate">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 56px;">
|
||||
<asp:LinkButton ID="LBCodigo" runat="server" Text='<%# Eval("Codigo")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="75" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 152px;">
|
||||
<asp:LinkButton ID="LBDescripcion" runat="server" Text='<%# Eval("Descripcion")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="200" HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Tipo AF">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 84px;">
|
||||
<asp:LinkButton ID="LBTipoAF" runat="server" Text='<%# Eval("TipoActivoFijo")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubTipoAF">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 84px;">
|
||||
<asp:LinkButton ID="LBSubTipoAF" runat="server" Text='<%# Eval("SubTipoActivoFijo")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="NoSerie">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 74px;">
|
||||
<asp:LinkButton ID="LBNoSerie" runat="server" Text='<%# Eval("NoSerie")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="SubProyecto">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 90px;">
|
||||
<asp:LinkButton ID="LBSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estado">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 50px;">
|
||||
<asp:LinkButton ID="LBEstadoAF" runat="server" Text='<%# Eval("EstadoActivoFijo")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 50px;">
|
||||
<asp:LinkButton ID="LbCliente" runat="server" Text='<%# Eval("NombreCliente")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Empresa" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 100px;">
|
||||
<asp:LinkButton ID="LBEmpresa" runat="server" Text='<%# Eval("Empresa")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>Modelo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlModelo" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="LBModelo" runat="server" CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Marca</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMarca" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="LBMarca" runat="server" CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<%--<asp:TemplateField>
|
||||
<HeaderTemplate>Año</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAño" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="LBAño" runat="server" Text='<%# Eval("Año")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Responsabke</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlResponsable" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="LBResponsable" runat="server" Text='<%# Eval("Responsable")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proyecto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProyecto" runat="server"></asp:Literal>
|
||||
<asp:LinkButton ID="LBProyecto" runat="server" Text='<%# Eval("Proyecto")%>' CssClass="Texto" OnClick="LnkAFSeleccionar_Click"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
<%-- <RowStyle CssClass="Texto" />
|
||||
<SelectedRowStyle CssClass="tabla_seleccionado"></SelectedRowStyle>
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="TitulosChico" />--%>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="height: 125px; overflow: auto;">
|
||||
<asp:GridView ID="GVAFC" runat="server" AutoGenerateColumns="False" Caption="<b>Últimas Compras</b>" EmptyDataText="No se encontraron compras o insumos del activo fijo" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LtlFactura" CssClass="Texto" runat="server" Text='<%# Eval("Folio") %>' NavigateUrl='<%# Eval("CveCompra","/Compras/Compras.aspx?CveCompra={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cantidad</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>UM</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUM" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Clasificación</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Producto o Servicio</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPS" runat="server" Text='<%# Eval("PS") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Total</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# If (CDbl(Eval("Total")) = 0, "", Eval("Total", "{0:N2}")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Proveedor</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="LtlProveedor" runat="server" Text='<%# Eval("Proveedor") %>' NavigateUrl='<%# Eval("CveProveedor","/Compras/Proveedores.aspx?CveProveedor={0}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="TitulosChico" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
609
AF/PopUpBuscarAF.aspx.vb
Normal file
609
AF/PopUpBuscarAF.aspx.vb
Normal file
@@ -0,0 +1,609 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Partial Class AF_PopUpBuscarAF
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private ReadOnly Property CveActivoFijo As Integer
|
||||
Get
|
||||
Return ViewState("CveActivoFijo").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property LabelCompras As String
|
||||
Get
|
||||
Return ViewState("LabelCompras").ToString
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property LabelResguardo As String
|
||||
Get
|
||||
Return ViewState("LabelResguardo").ToString
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property LabelTraslado As String
|
||||
Get
|
||||
Return ViewState("LabelTraslado").ToString
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property HiddenCompras1 As String
|
||||
Get
|
||||
Return ViewState("HiddenCompras1").ToString
|
||||
End Get
|
||||
End Property
|
||||
Private ReadOnly Property HiddenCompras2 As String
|
||||
Get
|
||||
Return ViewState("HiddenCompras2").ToString
|
||||
End Get
|
||||
End Property
|
||||
Private Property DTAFCaracteristicas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAFCaracteristicas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAFCaracteristicas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCaracteristica As Integer
|
||||
Get
|
||||
Return ViewState("CveCaracteristica").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCaracteristica") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Opcion As String
|
||||
Get
|
||||
Return ViewState("Opcion").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Opcion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CaracClasif As String
|
||||
Get
|
||||
Return ViewState("CaracClasif").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CaracClasif") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property BuscarGrupo As Integer
|
||||
Get
|
||||
Return ViewState("BuscarGrupo").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("BuscarGrupo") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
ViewState("LabelCompras") = ""
|
||||
ViewState("HiddenCompras1") = ""
|
||||
ViewState("HiddenCompras2") = ""
|
||||
ViewState("RowIndex") = ""
|
||||
ViewState("LabelTraslado") = ""
|
||||
ViewState("LabelResguardo") = ""
|
||||
|
||||
|
||||
If Request("L") IsNot Nothing AndAlso Request("L").ToString <> "" Then
|
||||
If Request("H1") IsNot Nothing AndAlso Request("H1").ToString <> "" Then
|
||||
If Request("H2") IsNot Nothing AndAlso Request("H2").ToString <> "" Then
|
||||
ViewState("LabelCompras") = Request("L")
|
||||
ViewState("HiddenCompras1") = Request("H1")
|
||||
ViewState("HiddenCompras2") = Request("H2")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Request("AFT") IsNot Nothing AndAlso Request("AFT").ToString <> "" Then
|
||||
ViewState("LabelTraslado") = Request("AFT")
|
||||
End If
|
||||
|
||||
If Request("AFR") IsNot Nothing AndAlso Request("AFR").ToString <> "" Then
|
||||
ViewState("LabelResguardo") = Request("AFR")
|
||||
End If
|
||||
|
||||
|
||||
If Request("RI") IsNot Nothing AndAlso Request("RI").ToString <> "" Then
|
||||
ViewState("RowIndex") = Request("RI")
|
||||
End If
|
||||
|
||||
If Not IsPostBack Then
|
||||
BuscarGrupo = -1
|
||||
|
||||
ViewState("Tipo") = ""
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 1220
|
||||
RegistraScript("if($get('tdContenido')){$get('tdContenido').style.height='920px'}")
|
||||
'RegistraScript("$('#ajaxidmodal #myFrame').css({ width: 900 }); $('#ajaxidmodal ').css({ width: 900 });")
|
||||
|
||||
CargaTipoActivoFijo()
|
||||
CargaResponsable()
|
||||
CargaEstatusActivoFijo()
|
||||
CargaMarcaActivoFijo()
|
||||
'CargaModeloActivoFijo()
|
||||
CargaProyecto()
|
||||
CargaSubProyecto()
|
||||
CargaSubTipoActivoFijo()
|
||||
CargaCliente()
|
||||
|
||||
If Request("Tipo") IsNot Nothing Then
|
||||
ViewState("Tipo") = Request("Tipo")
|
||||
BtnBuscar.Text = "Vincular"
|
||||
End If
|
||||
|
||||
If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then
|
||||
ViewState("CveActivoFijo") = Request("CveActivoFijo")
|
||||
'CargaDatos()
|
||||
Else
|
||||
ViewState("CveActivoFijo") = -1
|
||||
End If
|
||||
|
||||
If Request("OPCION") IsNot Nothing AndAlso Request("OPCION").ToString <> "" Then
|
||||
Opcion = Request("OPCION")
|
||||
Else
|
||||
Opcion = "-1"
|
||||
End If
|
||||
|
||||
CargaCaracteristicas()
|
||||
BuscaGrupo()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BuscaGrupo()
|
||||
If UsuarioActual.Empresa.GrupoEmpresa > 0 Then
|
||||
GV.Columns(7).Visible = True
|
||||
End If
|
||||
|
||||
If ViewState("LabelCompras").ToString <> "" And Opcion <> "OCE" Then
|
||||
BuscarGrupo = UsuarioActual.CveEmpresa
|
||||
ElseIf ViewState("Tipo").ToString = "C" Then
|
||||
BuscarGrupo = UsuarioActual.CveEmpresa
|
||||
ElseIf Opcion = "OC" Then
|
||||
BuscarGrupo = UsuarioActual.CveEmpresa
|
||||
ElseIf Opcion = "OCE" Then
|
||||
BuscarGrupo = UsuarioActual.CveEmpresa
|
||||
Else
|
||||
BuscarGrupo = -1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " C A R G A - D A T O S"
|
||||
Private Sub CargaTipoActivoFijo()
|
||||
DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlTipoActivoFijo.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaSubTipoActivoFijo()
|
||||
DdlSubTipoActivoFijo.Items.Clear()
|
||||
DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'")
|
||||
'DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'")
|
||||
DdlSubTipoActivoFijo.DataBind()
|
||||
DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCaracteristicas()
|
||||
CaracClasif = ""
|
||||
Dim ObjAFCaracteristicas As New ClsAF
|
||||
If ObjAFCaracteristicas.GetActivosFijosValores(CveActivoFijo, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim Filtro = If(DdlSubTipoActivoFijo.SelectedValue.ToEntero > 0, String.Format("CveSubTipoActivoFijo = {0} OR (CveTipoActivoFijo = {1} AND CveSubTipoActivoFijo IS NULL)", DdlSubTipoActivoFijo.SelectedValue, DdlTipoActivoFijo.SelectedValue), String.Format("CveTipoActivoFijo = {0}", DdlTipoActivoFijo.SelectedValue))
|
||||
GvCaracteristicas.DataSource = ObjAFCaracteristicas.DtResultados.FiltraParametros(Filtro, "CaracteristicaClasificacion, Orden")
|
||||
|
||||
If ObjAFCaracteristicas.GetCaracteristicasOpcionesSubTipo(-1, DdlSubTipoActivoFijo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTAFCaracteristicas = ObjAFCaracteristicas.DtResultados '.FiltraParametros("SubtipoActivoFijo = '" + DdlSubTipoActivoFijo.SelectedValue + "'") 'FiltraParametros("EstatusOpcion = 'True'")
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjAFCaracteristicas.Dispose()
|
||||
GvCaracteristicas.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaModeloActivoFijo()
|
||||
' DdlModeloActivoFijo.Items.Clear()
|
||||
' DdlModeloActivoFijo.DataSource = GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' DdlModeloActivoFijo.DataBind()
|
||||
' DdlModeloActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End Sub
|
||||
Private Sub CargaMarcaActivoFijo()
|
||||
'DdlMarcaActivoFijo.DataSource = GlobalDTMarcaActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'DdlMarcaActivoFijo.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaResponsable()
|
||||
'Application("GlobalDTResponsable")
|
||||
Dim ObjResponsable As New ClsRH
|
||||
If ObjResponsable.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlResponsable.DataSource = ObjResponsable.DtResultados
|
||||
Else
|
||||
DdlResponsable.DataSource = Nothing
|
||||
End If
|
||||
ObjResponsable.Dispose()
|
||||
'Application("GlobalDTResponsable")
|
||||
|
||||
DdlResponsable.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaProyecto()
|
||||
DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1)
|
||||
DdlProyecto.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaEstatusActivoFijo()
|
||||
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo
|
||||
DdlEstadoActivoFijo.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaCliente()
|
||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||
DdlCliente.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
Dim Codigo As String = "-1"
|
||||
Dim Descripcion As String = "-1"
|
||||
Dim CveTipoActivoFijo As Integer = -1
|
||||
Dim CveSubTipoActivoFijo As Integer = -1
|
||||
Dim CveMarcaActivoFijo As Integer = -1
|
||||
Dim NoSerie As String = "-1"
|
||||
Dim Año As Integer = -1
|
||||
Dim CvePersonaResponsable As Integer = -1
|
||||
Dim CveProyecto As Integer = -1
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim EstadoActivoFijo As Integer = -1
|
||||
Dim CveCliente As Integer = -1
|
||||
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
|
||||
If TxtDescripcion.Text.Trim <> String.Empty Then Descripcion = TxtDescripcion.Text.Trim
|
||||
If DdlTipoActivoFijo.SelectedValue <> String.Empty Then CveTipoActivoFijo = DdlTipoActivoFijo.SelectedValue.ToEntero
|
||||
If DdlSubTipoActivoFijo.SelectedValue <> String.Empty Then CveSubTipoActivoFijo = DdlSubTipoActivoFijo.SelectedValue.ToEntero
|
||||
'If DdlMarcaActivoFijo.SelectedValue <> String.Empty Then CveMarcaActivoFijo = DdlMarcaActivoFijo.SelectedValue.ToEntero
|
||||
If TxtNoSerie.Text.Trim <> String.Empty Then NoSerie = TxtNoSerie.Text.Trim
|
||||
If TxtAño.Text.Trim <> String.Empty Then Año = TxtAño.Text.Trim.ToEntero
|
||||
If DdlResponsable.SelectedValue <> String.Empty Then CvePersonaResponsable = DdlResponsable.SelectedValue.ToEntero
|
||||
If DdlProyecto.SelectedValue <> String.Empty Then CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
If DdlSubProyecto.SelectedValue <> String.Empty Then CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
If DdlEstadoActivoFijo.SelectedValue <> String.Empty Then EstadoActivoFijo = DdlEstadoActivoFijo.SelectedValue.ToEntero
|
||||
If DdlCliente.SelectedValue <> String.Empty Then CveCliente = DdlCliente.SelectedValue.ToEntero
|
||||
|
||||
Dim strSQL1 As New StringBuilder
|
||||
Dim booPrimerCampo As Boolean = False
|
||||
Dim intContador As Integer = 0
|
||||
For Each DR As GridViewRow In GvCaracteristicas.Rows
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CveValor As Integer = DR.FCHiddenField("HdnCveValor").Value.ToEntero
|
||||
'Alert(CveValor.ToString, TipoMensaje.MsgInformacion)
|
||||
Dim Valor As String = DR.FCTextBox("TxtValor").Text.Trim
|
||||
Dim CveCaracteristica As Integer = DR.FCHiddenField("HdnCveCaracteristica").Value.ToEntero
|
||||
Select Case DR.FCHiddenField("HdnEsOpcion").Value
|
||||
Case "0", "4"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor like '%{1}%') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "1" 'Listado o DropDownList
|
||||
CveCaracteristicaOpcion = DR.FCDropDownList("DdlRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "2" 'Radio o RadioButtonList
|
||||
CveCaracteristicaOpcion = DR.FCRadioButtonList("RbRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "3"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "5"
|
||||
Valor = DR.FCCheckBox("ChbValor").Checked.ToString
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "6"
|
||||
Valor = DR.FCTextBox("TxtValorNum").Text.Trim
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor like '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
||||
'Alert(strSQL1.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
|
||||
If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, CveTipoActivoFijo, CveSubTipoActivoFijo, NoSerie, Año, CvePersonaResponsable, CveProyecto, CveSubProyecto, EstadoActivoFijo, strSQL1.ToString, CveCliente, BuscaGrupoEmpresa:=BuscarGrupo) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjAF.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
GV.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
TblBusqueda.Visible = True
|
||||
End Sub
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
'If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Cells(0).Width = Unit.Pixel(350)
|
||||
' e.Row.Cells(1).Width = Unit.Pixel(80)
|
||||
' e.Row.Cells(2).Width = Unit.Pixel(200)
|
||||
' e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
' e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
'End If
|
||||
'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
''SUSTITUIDO
|
||||
''If ViewState("LabelCompras").ToString <> "" Then
|
||||
'' e.Row.FCLiteral("LtlDescripcion").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"",""{6}"");'>{0}</a>", e.Row.DBCampo("Descripcion"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
'' e.Row.FCLiteral("LtlTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"",""{6}"");'>{0}</a>", e.Row.DBCampo("TipoActivoFijo"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
'' e.Row.FCLiteral("LtlSubTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"",""{6}"");'>{0}</a>", e.Row.DBCampo("SubTipoActivoFijo"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
'' 'e.Row.FCLiteral("LtlModelo").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");'>{0}</a>", e.Row.DBCampo("ModeloActivoFijo"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"))
|
||||
'' 'e.Row.FCLiteral("LtlMarca").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");'>{0}</a>", e.Row.DBCampo("MarcaActivoFijo"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"))
|
||||
'' e.Row.FCLiteral("LtlNoSerie").Text = String.Format("<a class='Texto' href='javascript:Ir3(""{1}"",""{2}"",""{3}"",""{4}"",""{5}"",""{6}"");'>{0}</a>", e.Row.DBCampo("NoSerie"), ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
''ElseIf ViewState("Tipo").ToString = "C" Then
|
||||
'' e.Row.FCLiteral("LtlDescripcion").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Descripcion"))
|
||||
'' e.Row.FCLiteral("LtlTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("TipoActivoFijo"))
|
||||
'' e.Row.FCLiteral("LtlSubTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("SubTipoActivoFijo"))
|
||||
'' 'e.Row.FCLiteral("LtlModelo").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("ModeloActivoFijo"))
|
||||
'' 'e.Row.FCLiteral("LtlMarca").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("MarcaActivoFijo"))
|
||||
'' e.Row.FCLiteral("LtlNoSerie").Text = String.Format("<a class='Texto' href='javascript:Ir2(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("NoSerie"))
|
||||
''Else
|
||||
'' e.Row.FCLiteral("LtlDescripcion").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Descripcion"))
|
||||
'' e.Row.FCLiteral("LtlTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("TipoActivoFijo"))
|
||||
'' e.Row.FCLiteral("LtlSubTipoAF").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("SubTipoActivoFijo"))
|
||||
'' 'e.Row.FCLiteral("LtlModelo").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("ModeloActivoFijo"))
|
||||
'' 'e.Row.FCLiteral("LtlMarca").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("MarcaActivoFijo"))
|
||||
'' e.Row.FCLiteral("LtlNoSerie").Text = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>{1}</a>", e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("NoSerie"))
|
||||
''End If
|
||||
|
||||
If Opcion = "-1" Then
|
||||
If ViewState("LabelCompras").ToString <> "" Then
|
||||
e.Row.FCLinkButton("LBDescripcion").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBTipoAF").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBSubTipoAF").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBNoSerie").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBCodigo").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBSubProyecto").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBEstadoAF").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
e.Row.FCLinkButton("LBEmpresa").OnClientClick = String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), e.Row.DBCampo("CveActivoFijo"), e.Row.DBCampo("Codigo"), e.Row.DBCampo("NoSerie"))
|
||||
|
||||
ElseIf ViewState("Tipo").ToString = "C" Then
|
||||
e.Row.FCLinkButton("LBDescripcion").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBTipoAF").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubTipoAF").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBNoSerie").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBCodigo").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubProyecto").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEstadoAF").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEmpresa").OnClientClick = String.Format("Ir2(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
|
||||
ElseIf ViewState("LabelTraslado").ToString = "1" Then
|
||||
BtnAFAceptar.Style.Add("display", "none")
|
||||
' BtnBuscar.Style.Add("display", "none")
|
||||
e.Row.FCLinkButton("LBDescripcion").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBTipoAF").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubTipoAF").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBNoSerie").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBCodigo").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubProyecto").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEstadoAF").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEmpresa").OnClientClick = String.Format("Ir6(""{0}"", ""2"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
|
||||
ElseIf ViewState("LabelResguardo").ToString = "1" Then
|
||||
BtnAFAceptar.Style.Add("display", "none")
|
||||
'BtnBuscar.Style.Add("display", "none")
|
||||
e.Row.FCLinkButton("LBDescripcion").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBTipoAF").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubTipoAF").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBNoSerie").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBCodigo").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubProyecto").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEstadoAF").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEmpresa").OnClientClick = String.Format("Ir6(""{0}"", ""1"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
|
||||
Else
|
||||
e.Row.FCLinkButton("LBDescripcion").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBTipoAF").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubTipoAF").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBNoSerie").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBCodigo").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBSubProyecto").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEstadoAF").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
e.Row.FCLinkButton("LBEmpresa").OnClientClick = String.Format("Ir(""{0}"");", e.Row.DBCampo("CveActivoFijo"))
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGED"
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargaSubProyecto()
|
||||
End Sub
|
||||
Protected Sub DdlTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlTipoActivoFijo.SelectedIndexChanged
|
||||
CargaSubTipoActivoFijo()
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
Protected Sub DdlSubTipoActivoFijo_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlSubTipoActivoFijo.SelectedIndexChanged
|
||||
'CargaModeloActivoFijo()
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCaracteristicas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If CaracClasif <> e.Row.DBCampo("CaracteristicaClasificacion") OrElse e.Row.RowIndex = 0 Then
|
||||
CaracClasif = e.Row.DBCampo("CaracteristicaClasificacion")
|
||||
e.Row.FCLabel("LblClasif").Text = e.Row.DBCampo("CaracteristicaClasificacion")
|
||||
e.Row.FindControl("PnlClasif").Visible = True
|
||||
End If
|
||||
|
||||
Dim TipoCampo As Integer = e.Row.DBCampo("TipoCampo").ToEntero
|
||||
Dim tCveCaracteristica As Integer = e.Row.DBCampo("CveCaracteristica").ToEntero
|
||||
Select Case TipoCampo
|
||||
Case 0, 4 'Texto, Multiline
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
.Visible = True
|
||||
If TipoCampo = 4 Then
|
||||
.Rows = 3
|
||||
.TextMode = TextBoxMode.MultiLine
|
||||
End If
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValor"
|
||||
End If
|
||||
End With
|
||||
Case 1, 2 'DropDownList, Radios
|
||||
Dim dt As DataTable = DTAFCaracteristicas.FiltraParametros(String.Format("CveCaracteristica = {0} AND EstatusOpcion ='True' AND CveCaracteristicaOpcion > 0 ", tCveCaracteristica))
|
||||
If TipoCampo = 1 Then
|
||||
With e.Row.FCDropDownList("DdlRespuesta")
|
||||
.Visible = True
|
||||
.DataTextField = "CaracteristicaOpcion"
|
||||
.DataValueField = "CveCaracteristicaOpcion"
|
||||
.DataSource = dt
|
||||
.DataBind()
|
||||
.Items.Insert(0, New ListItem("Seleccione", "")) '63636363636363
|
||||
'.SelectedValue = e.Row.DBCampo("CveValor")
|
||||
.SelectedValue = e.Row.DBCampo("CveOpcion")
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "DdlRespuesta"
|
||||
End If
|
||||
End With
|
||||
ElseIf TipoCampo = 2 Then
|
||||
With e.Row.FCRadioButtonList("RbRespuesta")
|
||||
.Visible = True
|
||||
.DataSource = dt
|
||||
.DataBind()
|
||||
.SelectedValue = e.Row.DBCampo("CveOpcion")
|
||||
End With
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ErrorMessage = String.Format("ERROR: Falta contestar la pregunta: <b>{0}</b>", e.Row.DBCampo("Caracteristica"))
|
||||
End If
|
||||
Case 3 'Fecha
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
.Visible = True
|
||||
.Width = New Unit(80)
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
End With
|
||||
e.Row.FCImageButton("ImgTxtValor").Visible = True
|
||||
e.Row.FCMaskedEditExtender("MEETxtValor").Enabled = True
|
||||
e.Row.FCCalendarExtender("CETxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Date
|
||||
Case 5 'Checkbox
|
||||
With e.Row.FCCheckBox("ChbValor")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Caracteristica")
|
||||
'.Checked = CBool(e.Row.DBCampo("Valor").ToEntero)
|
||||
.Checked = (e.Row.DBCampo("Valor") = "True")
|
||||
End With
|
||||
|
||||
Case 6 ' Numerico
|
||||
With e.Row.FCTextBox("TxtValorNum")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Integer
|
||||
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValorNum"
|
||||
End If
|
||||
End With
|
||||
|
||||
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAFSeleccionar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvr As GridViewRow = CType(CType(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
HdnAFCveActivoFijo.Value = gvr.DataKey("CveActivoFijo")
|
||||
HdnAFCodigo.Value = gvr.DataKey("Codigo")
|
||||
|
||||
'CARGA GV
|
||||
GV.SelectedIndex = gvr.RowIndex
|
||||
|
||||
'carga las últimas compras
|
||||
BtnAFAceptar.Visible = True
|
||||
CargaComprasActivoFijo(gvr.DataKey("CveActivoFijo").ToEntero)
|
||||
UPFiltros.Update()
|
||||
End Sub
|
||||
Private Sub CargaComprasActivoFijo(pCveActivoFijo As Integer)
|
||||
Dim ObjActivoFijo As New ClsAF()
|
||||
If ObjActivoFijo.GetActivosFijosCompras(pCveActivoFijo, -1) Then
|
||||
GVAFC.DataSource = ObjActivoFijo.DtResultados
|
||||
Else
|
||||
GVAFC.DataSource = Nothing
|
||||
End If
|
||||
ObjActivoFijo.Dispose()
|
||||
GVAFC.DataBind()
|
||||
GVAFC.Visible = True
|
||||
End Sub
|
||||
Protected Sub BtnAFAceptar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvr As GridViewRow = GV.Rows(GV.SelectedIndex)
|
||||
|
||||
If ViewState("LabelCompras").ToString <> "" And Opcion <> "OCE" Then
|
||||
RegistraScript(String.Format("Ir3(""{0}"",""{1}"",""{2}"",""{3}"",""{4}"",""{5}"");", ViewState("LabelCompras"), ViewState("HiddenCompras1"), ViewState("HiddenCompras2"), gvr.DataKey("CveActivoFijo"), gvr.DataKey("Codigo"), gvr.DataKey("NoSerie")))
|
||||
ElseIf ViewState("Tipo").ToString = "C" Then
|
||||
RegistraScript(String.Format("Ir2(""{0}"");", gvr.DataKey("CveActivoFijo")))
|
||||
ElseIf Opcion = "OC" Then
|
||||
RegistraScript(String.Format("Ir4(""{0}"",""{1}"");", gvr.DataKey("CveActivoFijo"), gvr.DataKey("Codigo")))
|
||||
ElseIf Opcion = "OCE" Then
|
||||
RegistraScript(String.Format("Ir5(""{0}"",""{1}"",""{2}"");", gvr.DataKey("CveActivoFijo"), gvr.DataKey("Codigo"), ViewState("RowIndex")))
|
||||
Else
|
||||
RegistraScript(String.Format("Ir(""{0}"");", gvr.DataKey("CveActivoFijo")))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
238
AF/RepAF.aspx
Normal file
238
AF/RepAF.aspx
Normal file
@@ -0,0 +1,238 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAF.aspx.vb" Inherits="AF_RepAF" %>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
.table-advance > tbody > tr > th {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
.table-advance > tbody > tr > th:nth-child(3) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.table-advance > tbody > tr > td:nth-child(3) {
|
||||
text-align: right !important;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.table-advance > tbody > tr > td:nth-child(3) > div {
|
||||
text-align: right !important;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<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-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server">
|
||||
<i class="fa fa-ad-excel"></i> Exportar Excel
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Activos Fijos
|
||||
</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 portletfiltrostitlee">
|
||||
<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_Click1" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<a href="javascript:;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption text-size-12 ">
|
||||
<div class="row">
|
||||
<div class="col-md-1 ">Tipo:</div>
|
||||
<div class="col-md-2">
|
||||
<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">
|
||||
<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>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" CssClass="form-control input-sm select2me Widthall" runat="server" AutoPostBack="false">
|
||||
<asp:ListItem Text="Tipo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="SubTipo" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Año" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Estatus" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="SubProyecto" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Responsable" Value="6"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1">Estatus:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" runat="server" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
<div runat="server" id="DivProyecto">
|
||||
<div class="col-md-1">Proyecto:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="Proyecto" DataValueField="CveProyecto" OnSelectedIndexChanged="DdlProyecto_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="SubProyecto: "></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">Responsable:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlResponsable" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CvePersonal">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1">Año:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox ID="TxtAño" runat="server" CssClass="form-control input-sm " MaxLength="4" Width="40px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtAño" FilterType="Custom, Numbers" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<asp:GridView ID="GvCaracteristicas" runat="server" GridLines="None" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion,CveCaracteristica,TipoCampo,Requerida" ShowHeader="False" CssClass="table table-striped table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="132px">
|
||||
<ItemStyle BorderStyle="None" />
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlCaracteristica" runat="server" Text='<%# Eval("Caracteristica","{0}:")%>' Width="65"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle BorderStyle="None" Width="410px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtValor" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="400px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtValorNum" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Visible="false" Width="50px"></asp:TextBox>
|
||||
<asp:ImageButton ID="ImgTxtValor" runat="server" AlternateText="Click para ver el Calendario" Height="16px" ImageAlign="AbsMiddle" ImageUrl="/Imagenes/calendar.png" Visible="false" Width="16px" />
|
||||
<ajax:MaskedEditExtender ID="MEETxtValor" runat="server" AcceptNegative="Left" DisplayMoney="Left" Enabled="false" Mask="99/99/9999" MaskType="Date" TargetControlID="TxtValor" UserDateFormat="DayMonthYear"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CETxtValor" runat="server" Enabled="False" PopupButtonID="ImgTxtValor" PopupPosition="BottomRight" TargetControlID="TxtValor"></ajax:CalendarExtender>
|
||||
<asp:DropDownList ID="DdlRespuesta" runat="server" Width="206px" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" Visible="false" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||
<asp:RadioButtonList ID="RbRespuesta" runat="server" Font-family="sans serif" DataTextField="CaracteristicaOpcion" DataValueField="CveCaracteristicaOpcion" RepeatDirection="Horizontal" ValidationGroup="GrpGuardar" Visible="false"></asp:RadioButtonList>
|
||||
<asp:CheckBox ID="ChbValor" runat="server" ValidationGroup="GrpGuardar" Visible="false" />
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVRbRespuesta" runat="server" ControlToValidate="DdlRespuesta" Enabled="false" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCORbRespuesta" runat="server" HighlightCssClass="vco" TargetControlID="RFVRbRespuesta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:CompareValidator ID="CVTxtValor" Enabled="false" runat="server" ControlToValidate="TxtValor" Display="None" ErrorMessage='<%# Eval("Caracteristica", "El campo: <b>{0}</b>, es Requerido")%>' Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
|
||||
<asp:HiddenField ID="HdnEsOpcion" runat="server" Value='<%# Eval("TipoCampo")%>' />
|
||||
<asp:HiddenField ID="HdnCveCaracteristica" runat="server" Value='<%# Eval("CveCaracteristica")%>' />
|
||||
<asp:HiddenField ID="HdnCveValor" runat="server" Value="-1" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="450px" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</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-striped table-hover Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Agrupador" ItemStyle-Width="40%">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="Hpl" runat="server" Text='<%# Eval("Agrupador") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Cantidad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoActivoFijo" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'> </asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var OrdenarGV = function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 330;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, });
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
349
AF/RepAF.aspx.vb
Normal file
349
AF/RepAF.aspx.vb
Normal file
@@ -0,0 +1,349 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_RepAF
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property DtActivosFijos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtActivosFijos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtActivosFijos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property CveActivoFijo As Integer
|
||||
Get
|
||||
Return ViewState("CveActivoFijo").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property DTAFCaracteristicas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAFCaracteristicas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAFCaracteristicas") = 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
|
||||
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
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
Protected Sub CargaFiltros()
|
||||
DdlSubTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlEstatus.DataSource = GlobalDTEstadoActivoFijo
|
||||
DdlEstatus.DataBind()
|
||||
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
|
||||
DdlProyecto.DataBind()
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlResponsable.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlResponsable.DataBind()
|
||||
DdlResponsable.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivo.DataBind()
|
||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnFiltrar_Click1(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF()
|
||||
Dim Codigo As String = "-1"
|
||||
Dim Descripcion As String = "-1"
|
||||
Dim CveMarcaActivoFijo As Integer = -1
|
||||
Dim NoSerie As String = "-1"
|
||||
Dim Año As Integer = -1
|
||||
Dim CvePersonaResponsable As Integer = -1
|
||||
If TxtAño.Text.Trim <> String.Empty Then Año = TxtAño.Text.Trim.ToEntero
|
||||
|
||||
Dim strSQL1 As New StringBuilder
|
||||
Dim booPrimerCampo As Boolean = False
|
||||
Dim intContador As Integer = 0
|
||||
For Each DR As GridViewRow In GvCaracteristicas.Rows
|
||||
Dim CveCaracteristicaOpcion As Integer = -1
|
||||
Dim CveValor As Integer = DR.FCHiddenField("HdnCveValor").Value.ToEntero
|
||||
Dim Valor As String = DR.FCTextBox("TxtValor").Text.Trim
|
||||
Dim CveCaracteristica As Integer = DR.FCHiddenField("HdnCveCaracteristica").Value.ToEntero
|
||||
Select Case DR.FCHiddenField("HdnEsOpcion").Value
|
||||
Case "0", "4"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor like '%{1}%') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "1" 'Listado o DropDownList
|
||||
CveCaracteristicaOpcion = DR.FCDropDownList("DdlRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "2" 'Radio o RadioButtonList
|
||||
CveCaracteristicaOpcion = DR.FCRadioButtonList("RbRespuesta").SelectedValue.ToEntero
|
||||
If booPrimerCampo = True And CveCaracteristicaOpcion <> 0 Then strSQL1 = strSQL1.Append(" or ")
|
||||
If CveCaracteristicaOpcion <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1 = strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and CveOpcion = {1} ) ", CveCaracteristica, CveCaracteristicaOpcion)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "3"
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "5"
|
||||
Valor = DR.FCCheckBox("ChbValor").Checked.ToString
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor = '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
Case "6"
|
||||
Valor = DR.FCTextBox("TxtValorNum").Text.Trim
|
||||
If booPrimerCampo = True And Valor.Length <> 0 Then strSQL1.Append(" or ")
|
||||
If Valor.Length <> 0 Then
|
||||
If booPrimerCampo = False Then strSQL1.Append("Select CveActivoFijo from AF_ActivosFijosValores where ")
|
||||
strSQL1.AppendFormat(" (CveCaracteristica = {0} and Valor like '{1}') ", CveCaracteristica, Valor)
|
||||
If booPrimerCampo = False Then booPrimerCampo = True
|
||||
intContador += 1
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
If intContador > 0 Then strSQL1.AppendFormat(" group by CveActivoFijo having count(*)={0}", intContador)
|
||||
|
||||
If ObjAF.GetRepActivosFijos(-1, UsuarioActual.CveEmpresa, Codigo, Descripcion, DdlTipoActivo.SelectedValue.ToEntero, DdlSubTipoActivo.SelectedValue.ToEntero, NoSerie, Año, DdlResponsable.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, strSQL1.ToString, -1, DdlAgrupador.SelectedValue.ToEntero) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DtActivosFijos = ObjAF.DtResultados
|
||||
'If DdlAgrupador.SelectedValue = "6" Then
|
||||
' CargaDdlResponsable()
|
||||
'End If
|
||||
Else
|
||||
DtActivosFijos = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
CargaGV()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGV()
|
||||
GvDatos.DataSource = DtActivosFijos
|
||||
GvDatos.DataBind()
|
||||
UpGV.Update()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCHyperLink("Hpl").NavigateUrl = $"/AF/CatAF.aspx?GPO={DdlAgrupador.SelectedValue}&CveTipoActivoFijo={e.Row.DBCampo("CveTipoActivoFijo")}&CveSubTipoActivoFijo={e.Row.DBCampo("CveSubTipoActivoFijo")}&CvePersonaResponsable={e.Row.DBCampo("CvePersonaResponsable")}&CveSubProyecto={e.Row.DBCampo("CveSubProyecto")}&CveEstadoActivoFijo={e.Row.DBCampo("CveEstadoActivoFijo")}&Anio={e.Row.DBCampo("Anio")}"
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARACTERISTICAS "
|
||||
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"))
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlSubTipoActivo_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaCaracteristicas()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCaracteristicas()
|
||||
Dim ObjAFCaracteristicas As New ClsAF
|
||||
If ObjAFCaracteristicas.GetActivosFijosValores(-1, UsuarioActual.CveEmpresa) Then
|
||||
If DdlSubTipoActivo.SelectedIndex <> 0 Then
|
||||
GvCaracteristicas.DataSource = ObjAFCaracteristicas.DtResultados.FiltraParametros("CveSubTipoActivoFijo = '" + DdlSubTipoActivo.SelectedValue + "'")
|
||||
Else
|
||||
GvCaracteristicas.DataSource = Nothing
|
||||
End If
|
||||
If ObjAFCaracteristicas.GetCaracteristicasOpcionesSubTipo(-1, DdlSubTipoActivo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
DTAFCaracteristicas = ObjAFCaracteristicas.DtResultados '.FiltraParametros("SubtipoActivoFijo = '" + DdlSubTipoActivoFijo.SelectedValue + "'") 'FiltraParametros("EstatusOpcion = 'True'")
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjAFCaracteristicas.Dispose()
|
||||
GvCaracteristicas.DataBind()
|
||||
UpFiltro.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvCaracteristicas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCaracteristicas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim TipoCampo As Integer = e.Row.DBCampo("TipoCampo").ToEntero
|
||||
Dim CveCaracteristica As Integer = e.Row.DBCampo("CveCaracteristica").ToEntero
|
||||
|
||||
Select Case TipoCampo
|
||||
Case 0, 4 'Texto, Multiline
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
.Visible = True
|
||||
If TipoCampo = 4 Then
|
||||
.Rows = 3
|
||||
.TextMode = TextBoxMode.MultiLine
|
||||
End If
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValor"
|
||||
End If
|
||||
|
||||
End With
|
||||
|
||||
Case 1, 2 'DropDownList, Radios
|
||||
Dim dt As DataTable = DTAFCaracteristicas.FiltraParametros(String.Format("CveCaracteristica = {0} AND EstatusOpcion ='True' AND CveCaracteristicaOpcion > 0 ", CveCaracteristica))
|
||||
|
||||
If TipoCampo = 1 Then
|
||||
With e.Row.FCDropDownList("DdlRespuesta")
|
||||
.Visible = True
|
||||
.DataTextField = "CaracteristicaOpcion"
|
||||
.DataValueField = "CveCaracteristicaOpcion"
|
||||
.DataSource = dt
|
||||
|
||||
.DataBind()
|
||||
.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
.SelectedValue = e.Row.DBCampo("CveOpcion")
|
||||
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "DdlRespuesta"
|
||||
End If
|
||||
|
||||
End With
|
||||
ElseIf TipoCampo = 2 Then
|
||||
With e.Row.FCRadioButtonList("RbRespuesta")
|
||||
.Visible = True
|
||||
.DataSource = dt
|
||||
.DataBind()
|
||||
|
||||
End With
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ErrorMessage = String.Format("ERROR: Falta contestar la pregunta: <b>{0}</b>", e.Row.DBCampo("Caracteristica"))
|
||||
End If
|
||||
|
||||
Case 3 'Fecha
|
||||
With e.Row.FCTextBox("TxtValor")
|
||||
|
||||
.Visible = True
|
||||
.Width = New Unit(80)
|
||||
End With
|
||||
e.Row.FCImageButton("ImgTxtValor").Visible = True
|
||||
e.Row.FCMaskedEditExtender("MEETxtValor").Enabled = True
|
||||
e.Row.FCCalendarExtender("CETxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Date
|
||||
|
||||
Case 5 'Checkbox
|
||||
With e.Row.FCCheckBox("ChbValor")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Caracteristica")
|
||||
.Checked = CBool(e.Row.DBCampo("Valor").ToEntero)
|
||||
End With
|
||||
|
||||
Case 6 ' Numerico
|
||||
With e.Row.FCTextBox("TxtValorNum")
|
||||
.Visible = True
|
||||
.Text = e.Row.DBCampo("Valor")
|
||||
e.Row.FCCompareValidator("CVTxtValor").Enabled = True
|
||||
e.Row.FCCompareValidator("CVTxtValor").Type = ValidationDataType.Integer
|
||||
|
||||
If e.Row.DBCampo("Requerida") = "True" Then
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").Enabled = True
|
||||
e.Row.FCRequiredFieldValidator("RFVRbRespuesta").ControlToValidate = "TxtValorNum"
|
||||
End If
|
||||
End With
|
||||
End Select
|
||||
End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "I M P R I M I R P D F/Excel"
|
||||
Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click
|
||||
GenerarPDF()
|
||||
End Sub
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
GenerarPDF("EXCEL")
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtActivosFijos.Rows.Count > 0 Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
ImprimirPDF(String.Format("{0}Formatos\RepAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "ReporteActivosFijos", Formato:=Formato)
|
||||
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
279
AF/RepDepreciacion.aspx
Normal file
279
AF/RepDepreciacion.aspx
Normal file
@@ -0,0 +1,279 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepDepreciacion.aspx.vb" Inherits="AF_RepDepreciacion" %>
|
||||
|
||||
<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">
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right btn-separete">
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server" defaultbutton="BtnConsultar">
|
||||
<asp:UpdatePanel ID="UPFiltros" 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:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" style="max-width: 60px">Fecha:</div>
|
||||
<div class="col-md-1" style="min-width: 120px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 105px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Activo Fijo con depreciacion" DataKeyNames="CveActivoFijo, TipoActivoFijo" ToolTip="Reporte de Depreciacion" CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center; position: static" UseAccessibleHeader="false" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Descripcion" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcion" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Fecha Adquisicion" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaCompra", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="MOI" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMOI" runat="server" Text='<%# Eval("MOI", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Tasa de Depn" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDepreciacion" runat="server" Text='<%# Eval("TasaDepreciacion", "{0:0.##}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Meses Vida" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMesesVida" runat="server" Text='<%# Eval("MesesVida", "{0:0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Depn Mensual" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDepreciacionMensual" runat="server" Text='<%# Eval("DepreciacionMensual", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Depn Acumulada" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDepAcumulada" runat="server" Text='<%# Eval("DepreciacionAcumulada", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<asp:Label Text="Saldo x Deducir" runat="server" CausesValidation="false"> </asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldoxDeducir" runat="server" Text='<%# Eval("SaldoXDeducir", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
function Scroll() {
|
||||
$(document).ready(function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 300;
|
||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
||||
width: 995,
|
||||
height: Alto
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function GetSelectedRow(lnk, txtf, txtoi) {
|
||||
|
||||
|
||||
//var row = lnk.parentNode.parentNode;
|
||||
//var txtoi = row.cells[10].getElementsByTagName("input")[1];
|
||||
if (lnk.checked) {
|
||||
debugger;
|
||||
if (txtf) { txtf.style.display = ""; }
|
||||
if (txtoi) { txtoi.style.display = ""; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// if (txtoi) { txtoi.style.display = ""; }
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "";
|
||||
// }
|
||||
} else {
|
||||
if (txtf) { txtf.style.display = "none"; }
|
||||
if (txtoi) { txtoi.style.display = "none"; }
|
||||
// try {
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
// catch (err) {
|
||||
// row = row.parentNode;
|
||||
// row.cells[10].getElementsByTagName("input")[0].style.display = "none";
|
||||
// }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function PlaySound() {
|
||||
var sound = document.getElementById("audio");
|
||||
sound.play()
|
||||
}
|
||||
|
||||
function FechaGeneral(lnk, FechaDocumento) {
|
||||
debugger;
|
||||
var row = lnk.parentNode.parentNode;
|
||||
|
||||
var parts = FechaDocumento.split("/");
|
||||
var F1 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
|
||||
if (lnk.checked) {
|
||||
try {
|
||||
parts = $get("TxtFechaAplicadoHeader").value.split("/");
|
||||
var F2 = new Date(parts[2], parts[1], parts[0]);
|
||||
|
||||
if (F1 < F2) {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
} else {
|
||||
row.cells[10].getElementsByTagName("input")[0].value = FechaDocumento;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
row = row.parentNode;
|
||||
row.cells[10].getElementsByTagName("input")[0].value = $get("TxtFechaAplicadoHeader").value;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function OnClientShown(sender, args) {
|
||||
sender._popupBehavior._element.style.zIndex = 10005;
|
||||
sender._popupBehavior._element.style.position = "absolute";
|
||||
sender._popupBehavior._element.style.top = "0px";
|
||||
document.getElementById("C_GvDatosPanelItem").style.overflow = "initial";
|
||||
}
|
||||
</script>
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var OrdenarGV = function () {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 330;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
$('#C_GvDatos').DataTable({ scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false, });
|
||||
$('#C_GvDatos').parent().parent().children().first().css("position", "static");
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
58
AF/RepDepreciacion.aspx.vb
Normal file
58
AF/RepDepreciacion.aspx.vb
Normal file
@@ -0,0 +1,58 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Partial Class AF_RepDepreciacion
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
txtFechaI.Text = Now.ToString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
If GvDatos.Rows.Count = 0 Then Alert("No se encontraron Registros con los filtros actuales.", TipoMensaje.MsgAdvertencia)
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetRepActivosFijosDepreciacion(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "G V - D A T O S "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("CveActivoFijo") = "0" Then
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Font.Size = 10
|
||||
e.Row.FCLiteral("LtlDepreciacion").Text = "%"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
#End Region
|
||||
|
||||
#Region "DDLS SELECTED INDEX CHANGED"
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
134
AF/RepFlotillas.aspx
Normal file
134
AF/RepFlotillas.aspx
Normal file
@@ -0,0 +1,134 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepFlotillas.aspx.vb" Inherits="AF_RepFlotillas" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Flotillas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1">Tipo AF: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoActivo" CssClass="form-control input-sm select2me" runat="server" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1">Centro de costo: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Grupo:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Text="Centro Costo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo Fijo" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo AF" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Proveedor" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1 truncate">Proveedor:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" CssClass="form-control input-sm select2me" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">F.I.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">F.F.:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1">Estatus: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" CssClass="form-control input-sm select2me" runat="server" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</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 Ventas con los filtros especificados" ToolTip="Listado de Flotillas" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad / LT" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:F2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Costo total" ItemStyle-Width="25%" DataField="CostoTotal" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Precio Promedio" ItemStyle-Width="25%" DataField="CostoPromedio" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
78
AF/RepFlotillas.aspx.vb
Normal file
78
AF/RepFlotillas.aspx.vb
Normal file
@@ -0,0 +1,78 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class AF_RepFlotillas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Sub AF_RepFlotillas_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S"
|
||||
Private Sub CargaCombos()
|
||||
'Estatus AF
|
||||
DdlEstatus.DataSource = GlobalDTEstadoActivoFijo
|
||||
DdlEstatus.DataBind()
|
||||
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'Tipos Activo
|
||||
DdlTipoActivo.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivo.DataBind()
|
||||
DdlTipoActivo.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'Proveedor
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'CentroCosto
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjAF As New ClsAF()
|
||||
Dim FechaI, FechaF As String
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
If ObjAF.GetRepCargasCombustible(FechaI, FechaF, DdlTipoActivo.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
End If
|
||||
GvDatos.DataBind()
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " GV DATOS - ROW DATABOUND "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
' PARA LIGA
|
||||
Dim FechaI, FechaF As String
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/AF/CatCargasCombustible.aspx?GPO={DdlGrupo.SelectedValue}&AnioMes={e.Row.DBCampo("AnioMes")}&CveProveedor={e.Row.DBCampo("CveProveedor")}&CveSubProyecto={e.Row.DBCampo("CveSubProyecto")}&CveTipoAF={ e.Row.DBCampo("CveTipoAF")}&CveAF={e.Row.DBCampo("CveAF")}&FechaI={FechaI}&FechaF={FechaF}"
|
||||
|
||||
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ target='_blank' href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ target='_blank' href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
722
AF/ResguardoAF.aspx
Normal file
722
AF/ResguardoAF.aspx
Normal file
@@ -0,0 +1,722 @@
|
||||
<%@ Page Title="SIG | Resguardos AF" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ResguardoAF.aspx.vb" Inherits="AF_ResguardoAF" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Resguardo de Activos Fijos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%">
|
||||
|
||||
<ajax:TabPanel ID="TabR" runat="server" HeaderText="Resguardo">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">INFORMACIÓN DEL RESGUARDO</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row" style="height:38px !important">
|
||||
<label class="col-md-3" style="max-width: 120px;">Fecha:</label>
|
||||
<div class="col-md-4" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" style="padding:0px 10px !important" style="padding:0px 10px !important" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<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="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Proyecto:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyecto" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Responsable:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlResponsable" Width="230px" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacenOrigen" runat="server" ControlToValidate="DdlResponsable" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Responsable''</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>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Observaciones:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" runat="server" Width="230px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UPGVAF" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">ACTIVOS FIJOS</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:Literal runat="server" Text="Proyecto: "></asp:Literal>
|
||||
<asp:DropDownList ID="DdlSubProyectoF" AutoPostBack="true" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row" style="margin-right: 10px; margin-top: -18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAF.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVAF.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr class="Titulos">
|
||||
<th></th>
|
||||
<th style="text-align: center; width: 27%;">Codigo</th>
|
||||
<th style="text-align: center; width: 33%;">Activo Fijo</th>
|
||||
<th style="text-align: center; width: 35%;">Proyecto</th>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-height: 192px; overflow-y: scroll">
|
||||
<asp:GridView ID="GVAF" runat="server" DataKeyNames="CveActivoFijo" Style="table-layout: fixed" AutoGenerateColumns="False" ShowHeader="false" EmptyDataText="No se Encontró Activo Fijo Registrado" GridLines="none" ToolTip="Listado de Activos Fijos" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAF" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="27%" />
|
||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="33%">
|
||||
<ItemTemplate>
|
||||
<asp:Label CssClass="truncate" runat="server" ID="ltljeje" Text='<%# Eval("Descripcion")%>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:BoundField HeaderText="Activo Fijo" DataField="Descripcion" ItemStyle-Width="33%" />
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="left" ItemStyle-Width="35%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
<asp:Button Text="Resguardar" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" ID="BtnGuardar" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabTras" runat="server" HeaderText="Traslado">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPTraslado" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">TRASLADO DE ACTIVO FIJO</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Fecha:</label>
|
||||
<div class="col-md-4" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" style="padding:0px 10px !important" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaT" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardarT" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaT" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaT" runat="server" TargetControlID="TxtFechaT" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaT" TargetControlID="TxtFechaT" PopupButtonID="ImgFechaT" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaT" runat="server" ControlToValidate="TxtFechaT" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarT"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaT" runat="server" ControlToValidate="TxtFechaT" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarT"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaT" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaT" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFecha2T" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaT" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Proyecto:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyectoT" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyectoT" runat="server" ControlToValidate="DdlSubProyectoT" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarT"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESubProyectoT" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyectoT" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Responsable:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlResponsableT" Width="230px" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVResponsableT" runat="server" ControlToValidate="DdlResponsableT" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Responsable''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarT"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEResponsableT" runat="server" HighlightCssClass="vco" TargetControlID="RFVResponsableT" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3" style="max-width: 120px;">Observaciones:</label>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtObservacionesT" TextMode="MultiLine" Rows="2" runat="server" Width="230px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UPGVAFT" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">ACTIVOS FIJOS</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<asp:Literal runat="server" Text="Proyecto: "></asp:Literal><asp:DropDownList ID="DdlSubProyectoFT" AutoPostBack="true" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row" style="margin-right: 10px; margin-top: -18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GVAFT.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GVAFT.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr class="Titulos">
|
||||
<th></th>
|
||||
<th style="text-align: center; width: 27%;">Codigo</th>
|
||||
<th style="text-align: center; width: 33%;">Activo Fijo</th>
|
||||
<th style="text-align: center; width: 35%;">Proyecto</th>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-height: 192px; overflow-y: scroll; width: 100%;">
|
||||
<asp:GridView ID="GVAFT" DataKeyNames="CveActivoFijo" runat="server" AutoGenerateColumns="False" ShowHeader="false" EmptyDataText="No se Encontró Activo Fijo Registrado" GridLines="none" ToolTip="Listado de Activos Fijos" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAF" Text="" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="27%" />
|
||||
<asp:BoundField HeaderText="Activo Fijo" DataField="Descripcion" ItemStyle-Width="33%" />
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="left" ItemStyle-Width="35%" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
<asp:Button Text="Trasladar" CssClass="btn btn-primary" ValidationGroup="GrpGuardarT" ID="BtnTrasladar" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabTR" runat="server" HeaderText="Recepción Traslado">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaTraslado">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaTraslado" ClientIDMode="Static" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Personal:
|
||||
<asp:DropDownList ID="DdlPersonalRT" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaTraslados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Proyecto:
|
||||
<asp:DropDownList ID="DdlSubProyectoRT" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Folio:
|
||||
<asp:TextBox ID="TxtFolioT" Width="80px" CssClass="form-control input-sm" Style="display: inline !important;" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtFolioT" FilterType="Custom, Numbers" />
|
||||
</li>
|
||||
<li>AF:
|
||||
<asp:HyperLink href="javascript:AbrirVentana('/AF/PopUpBuscarAF.aspx?AFT=1');" CssClass="btn btn-circle btn-sm label-info" Text="<i class='icon-magnifier' style='color:white;'></i>" runat="server" ID="HLBuscarAF"></asp:HyperLink>
|
||||
<asp:HiddenField ID="HdnCveAFT" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" ID="UpTR" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-blue-steel"></i>
|
||||
<span class="caption-subject bold uppercase">RECEPCIÓN TRASLADO DE ACTIVO FIJO</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-3">Fecha:</label>
|
||||
<div class="col-md-4" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" style="padding:0px 10px !important" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaR" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardarRT" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LinkButton1" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TxtFechaR" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="TxtFechaR" PopupButtonID="LinkButton1" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaR" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="TxtFechaR" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRecibir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Proyecto:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyectoRTA" Width="150px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoRTA" runat="server" ControlToValidate="DdlSubProyectoRTA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardarRT"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyectoRTA" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Observaciones:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtObservacionesR" TextMode="MultiLine" Rows="2" runat="server" Width="300px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="row">
|
||||
<asp:UpdatePanel ID="UpGVTR" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-blue-steel"></i>
|
||||
<span class="caption-subject bold uppercase">TRASLADOS</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row" style="margin-right: 10px; margin-top: -18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda3" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvAFTR.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda3','{0}')", GvAFTR.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<table class="table table-striped Widthall">
|
||||
<tr class="Titulos">
|
||||
<th></th>
|
||||
<th style="text-align: center; width: 10%;">Folio</th>
|
||||
<th style="text-align: center; width: 10%;">Codigo</th>
|
||||
<th style="text-align: center; width: 35%;">Descripcion</th>
|
||||
<th style="text-align: center; width: 20%;">Serie</th>
|
||||
<th style="text-align: center; width: 20%;">Proyecto</th>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-height: 192px; overflow-y: scroll">
|
||||
<asp:GridView ID="GvAFTR" runat="server" DataKeyNames="CveActivoFijoResguardo, CveActivoFijo, CveSubProyecto" AutoGenerateColumns="False" ShowHeader="false" EmptyDataText="No se Encontró Activo Fijo Registrado" GridLines="none" ToolTip="Listado de Activos Fijos" CssClass="table table-striped table-hover Widthall">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAF" Text="" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Activo Fijo" DataField="Descripcion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="25%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="NoSerie" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="left" ItemStyle-Width="20%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="text-align: center;">
|
||||
<div class="col-md-12">
|
||||
<asp:Button Text="Recibír" CssClass="btn btn-primary" ValidationGroup="GrpGuardarRT" ID="BtnRecibiT" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabE" runat="server" HeaderText="Liberación">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltrosR">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" ClientIDMode="Static" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Personal:
|
||||
<asp:DropDownList ID="DdlPersonalR" runat="server" DataTextField="Nombre" DataValueField="CvePersonal" CssClass="form-control input-sm select2me" Style="width: 250px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Proyecto:
|
||||
<asp:DropDownList ID="DdlSubProyectoRL" Width="230px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Folio:
|
||||
<asp:TextBox ID="TxtFolioRL" Width="80px" CssClass="form-control input-sm" Style="display: inline !important;" runat="server"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtFolioRL" FilterType="Custom, Numbers" />
|
||||
</li>
|
||||
<li>AF:
|
||||
<asp:HyperLink href="javascript:AbrirVentana('/AF/PopUpBuscarAF.aspx?AFR=1');" CssClass="btn btn-circle btn-sm label-info" Text="<i class='icon-magnifier' style='color:white;'></i>" runat="server" ID="HLAFR"></asp:HyperLink>
|
||||
<asp:HiddenField ID="HdnAFR" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpRecepcion" UpdateMode="conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-6">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">liberación DE RESGUARDO</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<label class="col-md-3">Fecha:</label>
|
||||
<div class="col-md-4" style="padding-left: 5px;">
|
||||
<div class="input-group input-sm input-small date date-picker" style="padding:0px 10px !important" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaRecepcion" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpRecibir" Width="100px" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFechaRecepcion" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaRecepcion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaRecepcion" PopupButtonID="ImgFechaRecepcion" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaRecepcion" runat="server" ControlToValidate="TxtFechaRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaRecepcion" runat="server" ControlToValidate="TxtFechaRecepcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpRecibir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaRecepcion" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Proyecto:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlSubProyectoL" Width="150px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyectoL" runat="server" ControlToValidate="DdlSubProyectoL" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpRecibir"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCESubProyectoL" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubProyectoL" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3">Observaciones:</label>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtObservacionesRecepcion" TextMode="MultiLine" Rows="2" runat="server" Width="300px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="row">
|
||||
<asp:UpdatePanel ID="UpGVRecepcion" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Resguardos</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row" style="margin-right: 10px; margin-top: -18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda4" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvRecepcion.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda4','{0}')", GvRecepcion.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<table style="width: 100%" class="table table-striped">
|
||||
<tr class="Titulos">
|
||||
<th></th>
|
||||
<th style="text-align: center; width: 10%;">Folio</th>
|
||||
<th style="text-align: center; width: 10%;">Codigo</th>
|
||||
<th style="text-align: center; width: 35%;">Descripcion</th>
|
||||
<th style="text-align: center; width: 20%;">Serie</th>
|
||||
<th style="text-align: center; width: 20%;">Proyecto</th>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-height: 192px; overflow-y: scroll">
|
||||
<asp:GridView ID="GvRecepcion" Width="100%" runat="server" DataKeyNames="CveActivoFijoResguardo, CveActivoFijo, CveSubProyecto" AutoGenerateColumns="False" ShowHeader="false" EmptyDataText="No se Encontró Activo Fijo Registrado" GridLines="none" ToolTip="Listado de Activos Fijos" CssClass="table table-striped table-hover">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="chkAF" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Codigo" DataField="Codigo" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Activo Fijo" DataField="Descripcion" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="25%" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="NoSerie" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20%" />
|
||||
<asp:BoundField HeaderText="Proyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="left" ItemStyle-Width="20%" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div style="text-align: center;" class="col-md-12">
|
||||
<asp:Button ID="BtnRecibir" runat="server" Text="Liberar Activo Fijo" class="btn btn-primary" ValidationGroup="GrpRecibir" />
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAccionF">
|
||||
<ContentTemplate>
|
||||
<div id="DivArchivo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 700px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Agregar archivo</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UPupdateEstrucutran1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate ">Archivo:</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUpFormato" CssClass="ADSdropzone hidden" data-maxFile="1" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="btnAddArchivo" runat="server" CssClass="btn btn-primary" Text="Guardar" />
|
||||
<button class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
|
||||
function CargaActivoFijo(cve, tipo) {
|
||||
if (tipo == "2"){
|
||||
$get("HdnCveAFT").value = cve;
|
||||
$get('BtnCargaTraslado').click();
|
||||
}
|
||||
else if (tipo == "1")
|
||||
{
|
||||
$get("HdnAFR").value = cve;
|
||||
$get('BtnCargaAsignados').click();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
643
AF/ResguardoAF.aspx.vb
Normal file
643
AF/ResguardoAF.aspx.vb
Normal file
@@ -0,0 +1,643 @@
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
Partial Class AF_ResguardoAF
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES "
|
||||
Private Property ActivosFijos As List(Of Integer)
|
||||
Get
|
||||
Return CType(ViewState("ActivosFijos"), List(Of Integer))
|
||||
End Get
|
||||
Set(value As List(Of Integer))
|
||||
ViewState("ActivosFijos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveResguardoPadre As Integer
|
||||
Get
|
||||
Return ViewState("CveResguardoPadre").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveResguardoPadre") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property EsURL2 As Boolean
|
||||
Get
|
||||
Return CType(ViewState("EsURL2"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsURL2") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property EsLiberacion As Boolean
|
||||
Get
|
||||
Return CType(ViewState("EsLiberacion"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsLiberacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DTAF As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAF"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTAF") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub AF_TraspasoAF_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
InicializaValores()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " INICIALIZA VALORES "
|
||||
Private Sub InicializaValores()
|
||||
EsLiberacion = False
|
||||
CveResguardoPadre = -1
|
||||
CargaDTResguardos()
|
||||
'RESGUARDO
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
CargaAFResguardos()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyectoF.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoF.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoF.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "0"))
|
||||
DdlSubProyectoF.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlResponsable.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1", "NombreCompleto")
|
||||
DdlResponsable.DataBind()
|
||||
DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
'TRASPASO
|
||||
|
||||
TxtFechaT.Text = Now.ToShortDateString
|
||||
CargaAFResguardosTraslado()
|
||||
DdlSubProyectoT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoT.DataBind()
|
||||
DdlSubProyectoT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlResponsableT.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("CveEstatusPersonal = 1", "NombreCompleto")
|
||||
DdlResponsableT.DataBind()
|
||||
DdlResponsableT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoFT.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoFT.DataBind()
|
||||
DdlSubProyectoFT.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "0"))
|
||||
DdlSubProyectoFT.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
|
||||
|
||||
'RECEPCION
|
||||
|
||||
DdlSubProyectoRT.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoRT.DataBind()
|
||||
DdlSubProyectoRT.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "0"))
|
||||
DdlSubProyectoRT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoRTA.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoRTA.DataBind()
|
||||
DdlSubProyectoRTA.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
TxtFechaR.Text = Now.ToShortDateString
|
||||
|
||||
|
||||
'LIBERACION
|
||||
|
||||
DdlSubProyectoRL.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoRL.DataBind()
|
||||
DdlSubProyectoRL.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "0"))
|
||||
DdlSubProyectoRL.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlSubProyectoL.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectoL.DataBind()
|
||||
DdlSubProyectoL.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
TxtFechaRecepcion.Text = Now.ToShortDateString
|
||||
|
||||
|
||||
DdlPersonalR.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlPersonalR.DataBind()
|
||||
DdlPersonalR.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlPersonalRT.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("", "NombreCompleto")
|
||||
DdlPersonalRT.DataBind()
|
||||
DdlPersonalRT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDTResguardos()
|
||||
Dim AF As New ClsAF
|
||||
DTAF = New DataTable
|
||||
If AF.GetActivosFijosProyectos(UsuarioActual.CveEmpresa, -1, -1, 1, UsuarioActual.CveUsuario) Then
|
||||
DTAF = AF.DtResultados
|
||||
End If
|
||||
AF.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAFResguardos()
|
||||
GVAF.DataBind()
|
||||
GVAF.DataSource = DTAF.FiltraParametros("EstatusResguardo = 1")
|
||||
GVAF.DataBind()
|
||||
UPGVAF.Update()
|
||||
End Sub
|
||||
Private Sub CargaAFResguardosTraslado()
|
||||
GVAFT.DataBind()
|
||||
GVAFT.DataSource = DTAF.FiltraParametros("EstatusResguardo = 1")
|
||||
GVAFT.DataBind()
|
||||
UPGVAFT.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " RESGUARDAR "
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim TieneError = True
|
||||
|
||||
For Each Gvr As GridViewRow In GVAF.Rows
|
||||
If Gvr.FCCheckBox("chkAF").Checked Then
|
||||
TieneError = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If TieneError Then
|
||||
Alert("No hay ningun Activo Fijo para resguardar. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim objAF As New ClsAF
|
||||
objAF.IniciaTransacSQL()
|
||||
|
||||
Dim ErrorAF As Boolean = False
|
||||
ActivosFijos = New List(Of Integer)
|
||||
|
||||
|
||||
Dim CveResguardo = objAF.ActivoFijoResguardoGpo()
|
||||
|
||||
If CveResguardo > 0 Then
|
||||
For Each row As GridViewRow In GVAF.Rows
|
||||
If row.FCCheckBox("chkAF").Checked Then
|
||||
If objAF.ActivoFijoResguardoADD(TxtFecha.Text.ToDate, DdlResponsable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero, row.DataKey("CveActivoFijo").ToEntero, "AFR", 1, UsuarioActual.CveEmpresa, TxtObservaciones.Text, CveResguardo) Then
|
||||
If Not objAF.UpdateEstatusResguardo(3, UsuarioActual.CveEmpresa, row.DataKey("CveActivoFijo").ToEntero) Then 'Estatus resguardo 3 = Asignado
|
||||
ErrorAF = True
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorAF = True
|
||||
End If
|
||||
|
||||
Dim Folio = objAF.FolioResguardo
|
||||
|
||||
If ErrorAF Then
|
||||
objAF.RollBack()
|
||||
Alert("Ocurrió un error al guardar el Resguardo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
CveResguardoPadre = -1
|
||||
Else
|
||||
objAF.Commit()
|
||||
EsURL2 = False
|
||||
Dim Liga = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a> ", Encripta(String.Format("OP=AFR2&CVER={0}&TIPO=1", CveResguardo)))
|
||||
Alert($"Resguardo Guardado con el folio: <b>{Folio}</b> <br/><br/> {Liga}", TipoMensaje.MsgInformacion, "location.href=""javascript:$('#DivArchivo').modal()""")
|
||||
EsLiberacion = False
|
||||
CargaDTResguardos()
|
||||
LimpiaResguardo()
|
||||
LimpiaTraslado()
|
||||
LimpiaRecepcion()
|
||||
CveResguardoPadre = CveResguardo
|
||||
' RegistraScript("$('#DivArchivo').modal()")
|
||||
End If
|
||||
|
||||
objAF.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlSubProyectoF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyectoF.SelectedIndexChanged
|
||||
If DdlSubProyectoF.SelectedValue.Contiene({"-1", "0"}) Then
|
||||
CargaAFResguardos()
|
||||
Exit Sub
|
||||
End If
|
||||
GVAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($"EstatusResguardo = 1 AND CveSubProyecto ={DdlSubProyectoF.SelectedValue}")
|
||||
GVAF.DataBind()
|
||||
UPGVAF.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaResguardo()
|
||||
CargaAFResguardos()
|
||||
CargaAFResguardosTraslado()
|
||||
CargaTransitorios()
|
||||
DdlSubProyecto.SelectedValue = "-1"
|
||||
DdlResponsable.SelectedValue = "-1"
|
||||
DdlSubProyectoT.SelectedValue = "-1"
|
||||
DdlResponsableT.SelectedValue = "-1"
|
||||
DdlSubProyectoL.SelectedValue = "-1"
|
||||
TxtObservaciones.Text = ""
|
||||
TxtObservacionesR.Text = ""
|
||||
TxtObservacionesRecepcion.Text = ""
|
||||
TxtObservacionesT.Text = ""
|
||||
TxtFecha.Text = Now.ToShortDateString
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " TRASPASO "
|
||||
|
||||
Protected Sub DdlSubProyectoFT_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyectoFT.SelectedIndexChanged
|
||||
If DdlSubProyectoFT.SelectedValue.Contiene({"-1", "0"}) Then
|
||||
CargaAFResguardosTraslado()
|
||||
Exit Sub
|
||||
End If
|
||||
GVAFT.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($"EstatusResguardo = 1 AND CveSubProyecto ={DdlSubProyectoFT.SelectedValue}")
|
||||
GVAFT.DataBind()
|
||||
UPGVAFT.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnTrasladar_Click(sender As Object, e As EventArgs) Handles BtnTrasladar.Click
|
||||
Dim objAF As New ClsAF
|
||||
objAF.IniciaTransacSQL()
|
||||
|
||||
|
||||
Dim CveResguardo = objAF.ActivoFijoResguardoGpo()
|
||||
|
||||
Dim ErrorAF As Boolean = True
|
||||
|
||||
For Each Gvr As GridViewRow In GVAFT.Rows
|
||||
If Gvr.FCCheckBox("chkAF").Checked Then
|
||||
ErrorAF = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorAF Then
|
||||
Alert("No hay ningun Activo Fijo para traspasar. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
For Each row As GridViewRow In GVAFT.Rows
|
||||
If row.FCCheckBox("chkAF").Checked Then
|
||||
If objAF.ActivoFijoResguardoADD(TxtFechaT.Text.ToDate, DdlResponsableT.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlSubProyectoT.SelectedValue.ToEntero, row.DataKey("CveActivoFijo").ToEntero, "AFT", 2, UsuarioActual.CveEmpresa, TxtObservacionesT.Text, CveResguardo) Then 'TIPO RESGUARDO TRASLADO
|
||||
If Not objAF.UpdateEstatusResguardo(2, UsuarioActual.CveEmpresa, row.DataKey("CveActivoFijo").ToEntero) Then 'Estatus resguardo 2 = EN TRASLADO
|
||||
ErrorAF = True
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim Folio = objAF.FolioResguardo
|
||||
|
||||
If ErrorAF Then
|
||||
objAF.RollBack()
|
||||
Alert("Ocurrió un error al guardar el traslado de resguardo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
CveResguardoPadre = -1
|
||||
Else
|
||||
objAF.Commit()
|
||||
EsURL2 = False
|
||||
Dim Liga = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a> ", Encripta(String.Format("OP=AFR2&CVER={0}&TIPO=2", CveResguardo)))
|
||||
Alert($"Traslado Guardado con el folio: <b>{Folio}</b> <br/><br/> {Liga}", TipoMensaje.MsgInformacion, "location.href=""javascript:$('#DivArchivo').modal()""")
|
||||
EsLiberacion = False
|
||||
' RegistraScript("$('#DivArchivo').modal()")
|
||||
CveResguardoPadre = CveResguardo
|
||||
CargaDTResguardos()
|
||||
LimpiaTraslado()
|
||||
LimpiaRT()
|
||||
LimpiaResguardo()
|
||||
End If
|
||||
objAF.Dispose()
|
||||
End Sub
|
||||
Private Sub LimpiaTraslado()
|
||||
CargaAFResguardos()
|
||||
CargaAFResguardosTraslado()
|
||||
DdlSubProyectoT.SelectedValue = "-1"
|
||||
DdlResponsableT.SelectedValue = "-1"
|
||||
TxtObservacionesT.Text = ""
|
||||
TxtFechaT.Text = Now.ToShortDateString
|
||||
UPTraslado.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " RECEPCION TRASLADO "
|
||||
|
||||
Protected Sub BtnCargaTraslado_Click(sender As Object, e As EventArgs) Handles BtnCargaTraslado.Click
|
||||
If DdlPersonalRT.SelectedValue = "-1" AndAlso DdlSubProyectoRT.SelectedValue = "-1" AndAlso TxtFolioT.Text.Equals(String.Empty) AndAlso HdnCveAFT.Value = "-1" Then
|
||||
Alert("Por favor, seleccione al menos un filtro", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
CargaTransitorios()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTransitorios()
|
||||
|
||||
|
||||
GvAFTR.DataBind()
|
||||
Dim objAF As New ClsAF
|
||||
' CveSubProyecto:=DdlSubProyectoRL.SelectedValue.ToEntero, Folio:=If((TxtFolioRL.Text.Equals("")), -1, TxtFolioRL.Text.ToEntero), CveEmpresa:=UsuarioActual.CveEmpresa
|
||||
If objAF.GetActivosFijosResguardos(HdnCveAFT.Value.ToEntero, -1, DdlPersonalRT.SelectedValue.ToEntero, -1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyectoRT.SelectedValue.ToEntero, Folio:=If((TxtFolioT.Text.Equals("")), -1, TxtFolioT.Text.ToEntero)) Then
|
||||
GvAFTR.DataSource = objAF.DtResultados.FiltraParametros("Tipo = 2 AND FechaFin is NULL")
|
||||
GvAFTR.DataBind()
|
||||
End If
|
||||
HdnCveAFT.Value = "-1"
|
||||
UpGVTR.Update()
|
||||
objAF.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecibiT_Click(sender As Object, e As EventArgs) Handles BtnRecibiT.Click
|
||||
|
||||
Dim objAF As New ClsAF
|
||||
objAF.IniciaTransacSQL()
|
||||
Dim ErrorAF = True
|
||||
|
||||
For Each Gvr As GridViewRow In GvAFTR.Rows
|
||||
If Gvr.FCCheckBox("chkAF").Checked Then
|
||||
ErrorAF = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorAF Then
|
||||
Alert("No hay ningun traslado para recibir. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveResguardo = objAF.ActivoFijoResguardoGpo()
|
||||
|
||||
For Each row As GridViewRow In GvAFTR.Rows
|
||||
If row.FCCheckBox("chkAF").Checked Then
|
||||
If objAF.UpdateActivosFijosResguardos(TxtFechaR.Text, TxtObservacionesR.Text, "-1", row.DataKey("CveActivoFijoResguardo").ToString.ToEntero, row.DataKey("CveActivoFijo").ToString.ToEntero, CveSubProyecto:=DdlSubProyectoRTA.SelectedValue.ToEntero, CveResguardo2:=CveResguardo) Then
|
||||
If Not objAF.UpdateEstatusResguardo(1, UsuarioActual.CveEmpresa, row.DataKey("CveActivoFijo").ToString.ToEntero, row.DataKey("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorAF Then
|
||||
objAF.RollBack()
|
||||
Alert("Ocurrió un error al guardar la liberación de resguardo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
CveResguardoPadre = -1
|
||||
Else
|
||||
objAF.Commit()
|
||||
EsURL2 = True
|
||||
Dim Liga = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a> ", Encripta(String.Format("OP=AFR2&CVER={0}&TIPO=3", CveResguardo)))
|
||||
Alert($"La recepcion traslado del activo fijo se guardó correctamente<br/><br/> {Liga}", TipoMensaje.MsgInformacion, "location.href=""javascript:$('#DivArchivo').modal()""")
|
||||
CargaDTResguardos()
|
||||
EsLiberacion = False
|
||||
LimpiaRT()
|
||||
LimpiaResguardo()
|
||||
LimpiaTraslado()
|
||||
CveResguardoPadre = CveResguardo
|
||||
End If
|
||||
objAF.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub LimpiaRT()
|
||||
GvAFTR.DataBind()
|
||||
TxtObservacionesR.Text = ""
|
||||
TxtFechaR.Text = Now.ToShortDateString
|
||||
DdlPersonalRT.SelectedValue = "-1"
|
||||
TxtFolioT.Text = ""
|
||||
DdlSubProyectoRT.SelectedValue = "-1"
|
||||
CargaTransitorios()
|
||||
UpFiltros.Update()
|
||||
UpTR.Update()
|
||||
UpGVTR.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " LIBERAR "
|
||||
Protected Sub BtnCargaAsignados_Click1(sender As Object, e As EventArgs) Handles BtnCargaAsignados.Click
|
||||
If DdlPersonalR.SelectedValue = "-1" AndAlso DdlSubProyectoRL.SelectedValue = "-1" AndAlso TxtFolioRL.Text.Equals(String.Empty) AndAlso HdnAFR.Value = "-1" Then
|
||||
Alert("Por favor, seleccione al menos un filtro", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
CargaAsignados()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAsignados()
|
||||
GvRecepcion.DataBind()
|
||||
Dim objAF As New ClsAF
|
||||
|
||||
If objAF.GetActivosFijosResguardos(HdnAFR.Value.ToEntero, -1, DdlPersonalR.SelectedValue.ToEntero, -1, CveSubProyecto:=DdlSubProyectoRL.SelectedValue.ToEntero, Folio:=If((TxtFolioRL.Text.Equals("")), -1, TxtFolioRL.Text.ToEntero), CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
GvRecepcion.DataSource = objAF.DtResultados.FiltraParametros("Tipo = 1 AND FechaFin is NULL")
|
||||
End If
|
||||
HdnAFR.Value = "-1"
|
||||
objAF.Dispose()
|
||||
GvRecepcion.DataBind()
|
||||
UpGVRecepcion.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnRecibir_Click(sender As Object, e As EventArgs) Handles BtnRecibir.Click
|
||||
|
||||
Dim objAF As New ClsAF
|
||||
objAF.IniciaTransacSQL()
|
||||
Dim ErrorAF = True
|
||||
|
||||
For Each Gvr As GridViewRow In GvRecepcion.Rows
|
||||
If Gvr.FCCheckBox("chkAF").Checked Then
|
||||
ErrorAF = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorAF Then
|
||||
Alert("No hay ningun Activo Fijo para liberar. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveResguardo = objAF.ActivoFijoResguardoGpo()
|
||||
|
||||
For Each row As GridViewRow In GvRecepcion.Rows
|
||||
If row.FCCheckBox("chkAF").Checked Then
|
||||
If objAF.UpdateActivosFijosResguardos(TxtFechaR.Text, TxtObservacionesR.Text, "-1", row.DataKey("CveActivoFijoResguardo").ToString.ToEntero, row.DataKey("CveActivoFijo").ToString.ToEntero, CveResguardo2:=CveResguardo, CveSubProyecto:=DdlSubProyectoL.SelectedValue.ToEntero) Then
|
||||
If Not objAF.UpdateEstatusResguardo(1, UsuarioActual.CveEmpresa, row.DataKey("CveActivoFijo").ToEntero,) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorAF Then
|
||||
objAF.RollBack()
|
||||
Alert("Ocurrió un error al guardar la recepción de resguardo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
CveResguardoPadre = -1
|
||||
Else
|
||||
objAF.Commit()
|
||||
EsURL2 = True
|
||||
Dim Liga = String.Format("<a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a> ", Encripta(String.Format("OP=AFR2&CVER={0}&TIPO=4", CveResguardo)))
|
||||
Alert($"La liberación del resguardo se guardó correctamente<br/><br/> {Liga}", TipoMensaje.MsgInformacion, "location.href=""javascript:$('#DivArchivo').modal()""")
|
||||
EsLiberacion = False
|
||||
CargaDTResguardos()
|
||||
LimpiaRecepcion()
|
||||
LimpiaResguardo()
|
||||
LimpiaTraslado()
|
||||
CveResguardoPadre = CveResguardo
|
||||
End If
|
||||
objAF.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaRecepcion()
|
||||
GvRecepcion.DataBind()
|
||||
TxtObservacionesRecepcion.Text = ""
|
||||
TxtFechaRecepcion.Text = Now.ToShortDateString
|
||||
DdlPersonalR.SelectedValue = "-1"
|
||||
DdlSubProyectoRL.SelectedValue = "-1"
|
||||
TxtFolioRL.Text = ""
|
||||
UpFiltrosR.Update()
|
||||
UpRecepcion.Update()
|
||||
UpGVRecepcion.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " ARCHIVO "
|
||||
|
||||
Protected Sub btnAddArchivo_Click(sender As Object, e As EventArgs) Handles btnAddArchivo.Click
|
||||
Dim FileExtension As String = "-1"
|
||||
Dim filesgral As List(Of Archivo) = TxtUpFormato.getfiles().Archivos
|
||||
Dim filemove As String = ""
|
||||
|
||||
|
||||
Dim objAF As New ClsAF
|
||||
objAF.IniciaTransacSQL()
|
||||
Dim HuboError As Boolean = False
|
||||
|
||||
If filesgral.Count > 0 Then
|
||||
|
||||
For Each fileItem As Archivo In filesgral
|
||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||
filemove = fileItem.filename
|
||||
Next
|
||||
|
||||
'SE HIZO UN CASO ESPECIAL PARA LA LIBERACION (SUBIDA DE ARCHIVOS DESDE EL GV).
|
||||
If EsLiberacion Then
|
||||
If objAF.UpdateActivosFijosResguardosURL($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then
|
||||
If filemove <> "" Then
|
||||
If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
|
||||
File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
Else
|
||||
If EsURL2 Then
|
||||
If objAF.UpdateActivosFijosResguardosURLGpo("-1", $"AFT{CveResguardoPadre}.{FileExtension}", CveResguardoPadre) Then
|
||||
If filemove <> "" Then
|
||||
If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
|
||||
File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFT{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If objAF.UpdateActivosFijosResguardosURLGpo($"AFR{CveResguardoPadre}.{FileExtension}", "-1", CveResguardoPadre) Then
|
||||
If filemove <> "" Then
|
||||
If File.Exists(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension)) Then
|
||||
File.Delete(String.Format("{2}Empresas\{0}\AF\Resguardos\AFR{1}.{3}", UsuarioActual.CveEmpresa, CveResguardoPadre, AppDomain.CurrentDomain.BaseDirectory, FileExtension))
|
||||
End If
|
||||
If filemove.FilesMove(String.Format("AFR{0}", CveResguardoPadre), String.Format("Empresas\{0}\AF\Resguardos", UsuarioActual.CveEmpresa)) Then
|
||||
HuboError = False
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
HuboError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If HuboError Then
|
||||
objAF.RollBack()
|
||||
Alert("Ocurrió un error al guardar el archivo.", TipoMensaje.MsgError)
|
||||
Else
|
||||
objAF.Commit()
|
||||
Alert("El archivo se guardó correctamente", TipoMensaje.MsgInformacion)
|
||||
TxtUpFormato.Text = "[]"
|
||||
RegistraScript("$('#DivArchivo').modal('hide');")
|
||||
End If
|
||||
|
||||
objAF.Dispose()
|
||||
|
||||
CargaAsignados()
|
||||
End Sub
|
||||
|
||||
Public Function FormatearNombreArchivo(nombreArchivoOriginal As String) As String
|
||||
Dim nombreArchivoFormateado As String
|
||||
nombreArchivoFormateado = nombreArchivoOriginal.Replace(" ", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("'", "")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace(Chr(34), "")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("$", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("#", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("%", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("!", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("&", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("?", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("¿", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("¡", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("*", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("~", "_")
|
||||
nombreArchivoFormateado = nombreArchivoFormateado.Replace("^", "_")
|
||||
Return nombreArchivoFormateado
|
||||
End Function
|
||||
|
||||
Protected Sub ImgArchivo_Click(sender As Object, e As ImageClickEventArgs)
|
||||
CveResguardoPadre = CType(sender, ImageButton).CommandArgument.ToEntero
|
||||
EsLiberacion = True
|
||||
EsURL2 = False
|
||||
RegistraScript("$('#DivArchivo').modal()")
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
516
AF/ValesCombustible.aspx
Normal file
516
AF/ValesCombustible.aspx
Normal file
@@ -0,0 +1,516 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ValesCombustible.aspx.vb" Inherits="AF_ValesCombustible" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Registro de Vales de Combustible
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabRegistroVale" runat="server" HeaderText="Registro">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpParametros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light smmallpadding bordered ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos de Vale</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Folio:</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFolio" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingrese uno uno." InitialValue=" " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFolio" runat="server" HighlightCssClass="VCO" TargetControlID="RFVFolio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<%--<label id="LblFolio" runat="server"></label>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Tipo Vale:</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:RadioButton ID="ChkExterno" runat="server" Text="Externo" AutoPostBack="true"/>
|
||||
<asp:RadioButton ID="ChkInterno" runat="server" Text="Interno" AutoPostBack="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivAlmacen" runat="server" class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Almacén:</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" Width="350px" DataValueField="CveAlmacen" DataTextField="Almacen" CssClass="select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" ControlToValidate="DdlAlmacen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacen" runat="server" HighlightCssClass="VCO" TargetControlID="RFVAlmacen" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Fecha:</span>
|
||||
</div>
|
||||
<div class="col-md-8" >
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaVale" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ClientIDMode="Static"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<button runat="server" id="imgCalendario" class="btn default" type="button">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</button>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaC" runat="server" TargetControlID="TxtFechaVale" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaVale" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaC" runat="server" ControlToValidate="TxtFechaVale" Display="None" ErrorMessage="El campo <b>''Fecha Factura''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaC" runat="server" ControlToValidate="TxtFechaVale" Display="None" ErrorMessage="El campo <b>''Fecha Factura''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVFC" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECVFC" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaC" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivProveedor" class="row" runat="server">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Proveedor:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlProveedores" runat="server" Width="350px" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Activo Fijo:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlActivoFijo" runat="server" Width="350px" DataValueField="CveActivoFijo" DataTextField="CodigoDescripcion" CssClass="select2me" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVActivoFijo" runat="server" ControlToValidate="DdlActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Acivo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOActivoFijo" runat="server" HighlightCssClass="VCO" TargetControlID="RFVActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Odómetro:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:TextBox ID="TxtOdometroActual" runat="server" MaxLength="12" Width="80px" TextMode="Number"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVOdometro" runat="server" ControlToValidate="TxtOdometroActual" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Odometro''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOOdometro" runat="server" HighlightCssClass="VCO" TargetControlID="RFVOdometro" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Combustible:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlCombustible" runat="server" Width="350px" DataValueField="CveCombustible" DataTextField="Combustible" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCombustible" runat="server" ControlToValidate="DdlCombustible" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Combustible''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCombustible" runat="server" HighlightCssClass="VCO" TargetControlID="RFVCombustible" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Litros:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:TextBox ID="TxtLitros" runat="server" MaxLength="12" Width="80px" TextMode="Number"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVLitros" runat="server" ControlToValidate="TxtLitros" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Litros''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOLitros" runat="server" HighlightCssClass="VCO" TargetControlID="RFVLitros" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Personal:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlRHPersonal" runat="server" Width="350px" DataValueField="CvePersonal" DataTextField="NombreCompleto" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
<%-- <asp:RequiredFieldValidator ID="RFVPersonal" runat="server" ControlToValidate="DdlRHPersonal" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Personal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VOCPersonal" runat="server" HighlightCssClass="VCO" TargetControlID="RFVPersonal" Width="300px"></ajax:ValidatorCalloutExtender>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Nombre quien Recibe:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:TextBox ID="TxtNombreRecibe" runat="server" Width="350px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DivProyecto" runat="server">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<span class="linewhitsize comprasdfleft">Proyecto:</span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" Width="350px" DataValueField="CveProyecto" DataTextField="Proyecto" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCE" runat="server" HighlightCssClass="VCO" TargetControlID="RFVProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="margin-top:2px">
|
||||
<asp:Label ID="LtlSubProyecto" runat="server" Text="SubProyecto" class="linewhitsize comprasdfleft"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="350px" DataValueField="CveSubProyecto" DataTextField="SubProyecto" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOSubProyecto" runat="server" HighlightCssClass="VCO" TargetControlID="RFVSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Observaciones: </span>
|
||||
</div>
|
||||
<div class="col-md-8" style="margin-top:4px">
|
||||
<asp:TextBox ID="TxtObservciones" runat="server" Rows="3" TextMode="MultiLine" Width="280px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:UpdatePanel ID="UpConsumo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Ultima Recarga:</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft"">Fecha:</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblFecha" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Litros: </span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblLitrosAF" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Combustible: </span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblCombustible" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Odometro: </span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LblOdometro" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Personal: </span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:Label ID="LbPersonal" runat="server"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Acciones</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:Button ID="BtnGuardar" CssClass="btn btn-primary " runat="server" Text="Registrar Vale" ValidationGroup="GrpGuardar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabBuscar" runat="server" HeaderText="Consultar" Visible="true" Enabled="true">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12" >
|
||||
<asp:UpdatePanel ID="UpBuscar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Consultar</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<span>#Folio: </span>
|
||||
<div class=" form-md-line-input" ">
|
||||
<asp:TextBox ID="TxtBuscar" ClientIDMode="Static" runat="server" CssClass="form-control input-sm " MaxLength="11"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span>Proveedor:</span>
|
||||
<asp:DropDownList ID="DdlBuscarProveedor" runat="server" DataValueField="CveProveedor" Width="100%" DataTextField="RazonSocial" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span>Personal:</span>
|
||||
<asp:DropDownList ID="DdlBuscarPersonal" runat="server" DataValueField="CvePersonal" Width="100%" DataTextField="NombreCompleto" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<span>Activo Fijo:</span>
|
||||
<asp:DropDownList ID="DdlBuscarActivo" runat="server" Width="100%" DataValueField="CveActivoFijo" DataTextField="Descripcion" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<asp:Button ID="BtnBuscar" runat="server" Cssclass="btn btn-primary" Text="Buscar"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<asp:GridView ID="GVBuscar" runat="server" Width="100%" CssClass="table table-striped table-hover" data-height="400px" DataKeyNames="CveVale, CveCompra, CveProveedor"
|
||||
GridLines="None" EmptyDataText="No se encontraron Registros con el filtro actual" AutoGenerateColumns="false" >
|
||||
<columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Proveedor
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlProveedor" runat="server" Text='<%# Eval("RazonSocial") %>'></asp:Literal>
|
||||
<asp:DropDownList ID="DdlBuscarP" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="select2me"></asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Folio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Personal
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPersonal" runat="server" Text='<%# String.Concat(Eval("NombreCompleto"), ", ", Eval("Recibe")) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Activo Fijo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlActivoFijo" runat="server" Text='<%# Eval("Descripcion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Recibo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtRecibo" runat="server" width="50px" Text='<%# Eval("Recibo") %>' ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Importe
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" width="50px" Text='<%# Eval("Importe") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Cantidad
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" width="50px" Text='<%# Eval("Litros") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md-4" style="margin-top:5px">
|
||||
<asp:Button ID="BtnActualizar" CssClass="btn btn-primary" runat="server" Text="Actualizar" ValidationGroup="GrpBuscar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<%--<div class="row">
|
||||
<div class="col-md-4">
|
||||
<asp:UpdatePanel ID="UpBuscarProveedor" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Acciones</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span class="linewhitsize comprasdfleft">Proveedor:</span>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdProveedorVinculacion" runat="server" Width="100%" AutoPostBack="true" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClass="select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVProveedorV" runat="server" ControlToValidate="DdProveedorVinculacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proveedores''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAplicar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCO" runat="server" HighlightCssClass="VCO" TargetControlID="RFVProveedorV" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="margin-top:5px">
|
||||
<asp:GridView ID="GvValesCombustible" runat="server" CssClass="table Widthall table-nohover" DataKeyNames="CveVale,CveProveedor, Importe, Recibo, Litros" GridLines="None" AutoGenerateColumns="false" >
|
||||
<columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Folio
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Fecha
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Cantidad
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlLitros" runat="server" Text='<%# Eval("Litros") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:Button ID="BtnAplicar" CssClass="btn btn-primary " runat="server" Text="Aplicar" ValidationGroup="GrpAplicar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
448
AF/ValesCombustible.aspx.vb
Normal file
448
AF/ValesCombustible.aspx.vb
Normal file
@@ -0,0 +1,448 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
|
||||
|
||||
Partial Class AF_ValesCombustible
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private ReadOnly Property EstablecioFolio As Boolean
|
||||
Get
|
||||
Return CBool(ViewState("EstablecioFolio"))
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
Private Sub AF_ValesCombustible_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
|
||||
CargarCombos()
|
||||
CargaFolios()
|
||||
|
||||
TxtFechaVale.Text = DateTime.Now.ToShortDateString
|
||||
BtnActualizar.Visible = False
|
||||
'BtnAplicar.Visible = False
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A C O M B O S & L I M P I A D A T O S"
|
||||
Private Sub CargarCombos()
|
||||
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedores.DataBind()
|
||||
DdlProveedores.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
|
||||
DdlActivoFijo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlActivoFijo.DataBind()
|
||||
DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlRHPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlRHPersonal.DataBind()
|
||||
DdlRHPersonal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
If UsuarioActual.Empresa.GralSoloProyecto Then
|
||||
|
||||
LtlSubProyecto.Text = "Proyecto"
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DivProyecto.Visible = False
|
||||
'DdlProyecto.Items(0).Text = ""
|
||||
Else
|
||||
DivProyecto.Visible = True
|
||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
|
||||
DdlProyecto.DataBind()
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
DdlCombustible.DataSource = GlobalDTCombustibles(UsuarioActual.CveEmpresa)
|
||||
DdlCombustible.DataBind()
|
||||
DdlCombustible.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
'DdProveedorVinculacion.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
'DdProveedorVinculacion.DataBind()
|
||||
'DdProveedorVinculacion.Items.Insert(0, New ListItem("Seleccione un Proveedor", "-1"))
|
||||
|
||||
DdlBuscarProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlBuscarProveedor.DataBind()
|
||||
DdlBuscarProveedor.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlBuscarPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlBuscarPersonal.DataBind()
|
||||
DdlBuscarPersonal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlBuscarActivo.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlBuscarActivo.DataBind()
|
||||
DdlBuscarActivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.DataBind()
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
End Sub
|
||||
Private Sub CargaFolios()
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
Dim TipoOC As String = "VaG"
|
||||
|
||||
|
||||
If ObjFolios.GetFolios(If(TipoOC = "VAG", "vag", TipoOC), UsuarioActual.CveEmpresa) Then
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros("Estado = 'Activo'")
|
||||
'Verificar primero en la sucursal del usuario
|
||||
If DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows.Count > 0 Then
|
||||
ViewState("CveFolio") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("CveFolio").ToString.ToEntero
|
||||
ViewState("FolioActual") = DT.FiltraParametros("CveSubProyecto = " + UsuarioActual.CveSubProyecto.ToString).Rows(0)("FActual").ToString
|
||||
TxtFolio.Text = DT.Rows(0)("FActual").ToString
|
||||
ElseIf DT.Rows.Count > 0 Then
|
||||
ViewState("CveFolio") = DT.Rows(0)("CveFolio").ToString.ToEntero
|
||||
ViewState("FolioActual") = DT.Rows(0)("FActual").ToString
|
||||
TxtFolio.Text = DT.Rows(0)("FActual").ToString
|
||||
Else
|
||||
Alert("No tiene registrados Folios en esta sucursal.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
DT.Dispose()
|
||||
End If
|
||||
ObjFolios.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarDatos()
|
||||
DdlProveedores.SelectedIndex = -1
|
||||
DdlActivoFijo.SelectedIndex = -1
|
||||
TxtOdometroActual.Text = ""
|
||||
DdlCombustible.SelectedIndex = -1
|
||||
TxtLitros.Text = ""
|
||||
DdlRHPersonal.SelectedIndex = -1
|
||||
DdlSubProyecto.SelectedIndex = -1
|
||||
DdlProyecto.SelectedIndex = -1
|
||||
DdlAlmacen.SelectedIndex = -1
|
||||
ChkExterno.Checked = False
|
||||
ChkInterno.Checked = False
|
||||
TxtObservciones.Text = ""
|
||||
LblFecha.Text = ""
|
||||
LblLitrosAF.Text = ""
|
||||
LblCombustible.Text = ""
|
||||
LblOdometro.Text = ""
|
||||
LbPersonal.Text = ""
|
||||
TxtNombreRecibe.Text = ""
|
||||
UpParametros.Update()
|
||||
UpConsumo.Update()
|
||||
CargaFolios()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "DDL CHANGED & CHK CHANGED & TXT CHANGUED"
|
||||
Private Sub DdlActivoFijo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlActivoFijo.SelectedIndexChanged
|
||||
|
||||
Dim ObjValesCombustible As New ClsAF
|
||||
If ObjValesCombustible.GetValesCombustible(-1, -1, -1, -1, DdlActivoFijo.SelectedValue.ToEntero, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
Dim dtAF As DataTable = ObjValesCombustible.DtResultados.FiltraParametros("", Orderby:="CveVale DESC")
|
||||
If dtAF.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = dtAF.Rows(0)
|
||||
LblFecha.Text = dr("Fecha").ToString
|
||||
LblLitrosAF.Text = dr("Litros").ToString
|
||||
LblCombustible.Text = dr("Combustible").ToString
|
||||
LblOdometro.Text = dr("Odometro").ToString
|
||||
|
||||
If dr("CvePersonal").ToString.ToEntero > 0 Then
|
||||
LbPersonal.Text = String.Format("{0}, {1}", dr("NombreCompleto").ToString, dr("Recibe").ToString)
|
||||
Else
|
||||
LbPersonal.Text = dr("NombreCompleto").ToString
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
LblFecha.Text = ""
|
||||
LblLitrosAF.Text = ""
|
||||
LblCombustible.Text = ""
|
||||
LblOdometro.Text = ""
|
||||
LbPersonal.Text = ""
|
||||
UpConsumo.Update()
|
||||
End If
|
||||
End If
|
||||
ObjValesCombustible.Dispose()
|
||||
End Sub
|
||||
|
||||
'Private Sub DdProveedorVinculacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdProveedorVinculacion.SelectedIndexChanged
|
||||
' Dim ObjValesCombustible As New ClsAF
|
||||
' If ObjValesCombustible.GetValesCombustible(0, -1, -1, DdProveedorVinculacion.SelectedValue.ToEntero, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
' GvValesCombustible.DataSource = ObjValesCombustible.DtResultados
|
||||
' BtnAplicar.Visible = True
|
||||
' Else
|
||||
' GvValesCombustible.DataSource = Nothing
|
||||
' BtnAplicar.Visible = False
|
||||
' End If
|
||||
' ObjValesCombustible.Dispose()
|
||||
' GvValesCombustible.DataBind()
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub BtnAplicar_Click(sender As Object, e As EventArgs) Handles BtnAplicar.Click
|
||||
' Dim ObjValesCombustible As New ClsAF
|
||||
' Dim CveCompra As Integer = 2
|
||||
' For Each gvr As GridViewRow In GvValesCombustible.Rows
|
||||
' If gvr.RowType = DataControlRowType.DataRow Then
|
||||
' If gvr.FCCheckBox("Chk").Checked Then
|
||||
' ObjValesCombustible.UpdateValeCombustible(gvr.DataKey("CveVale").ToEntero, CveCompra, gvr.DataKey("CveProveedor").ToEntero, gvr.DataKey("Litros").ToEntero, gvr.DataKey("Recibo").ToEntero, gvr.DataKey("Importe").ToEntero, UsuarioActual.CveEmpresa)
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' Alert("Se Aplico con exito")
|
||||
' ObjValesCombustible.Dispose()
|
||||
'End Sub
|
||||
|
||||
Private Sub TxtFolio_TextChanged(sender As Object, e As EventArgs) Handles TxtFolio.TextChanged
|
||||
ViewState("EstablecioFolio") = True
|
||||
End Sub
|
||||
|
||||
Private Sub ChkInterno_CheckedChanged(sender As Object, e As EventArgs) Handles ChkInterno.CheckedChanged
|
||||
'Valida Si es interno o externo
|
||||
If ChkInterno.Checked = True Then
|
||||
DivProveedor.Visible = False
|
||||
DivAlmacen.Visible = True
|
||||
ChkExterno.Checked = False
|
||||
Else
|
||||
DivProveedor.Visible = True
|
||||
DivAlmacen.Visible = False
|
||||
ChkExterno.Checked = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ChkExterno_CheckedChanged(sender As Object, e As EventArgs) Handles ChkExterno.CheckedChanged
|
||||
'Valida Si es interno o externo
|
||||
If ChkExterno.Checked = True Then
|
||||
DivProveedor.Visible = True
|
||||
DivAlmacen.Visible = False
|
||||
ChkInterno.Checked = False
|
||||
Else
|
||||
ChkInterno.Checked = True
|
||||
DivProveedor.Visible = False
|
||||
DivAlmacen.Visible = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "ROW DATA BOUND"
|
||||
Private Sub GVBuscar_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVBuscar.RowDataBound
|
||||
For Each gvr As GridViewRow In GVBuscar.Rows
|
||||
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
If gvr.FCLiteral("LtlProveedor").Text.Equals("") Then
|
||||
gvr.FCLiteral("LtlProveedor").Visible = False
|
||||
gvr.FCDropDownList("DdlBuscarP").DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
gvr.FCDropDownList("DdlBuscarP").DataBind()
|
||||
gvr.FCDropDownList("DdlBuscarP").Items.Insert(0, New ListItem("Sin Asignar", "-1"))
|
||||
Else
|
||||
gvr.FCDropDownList("DdlBuscarP").Visible = False
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "BTN GUARDAR, ACTUALIZAR, BUSCAR, ETC...."
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjVales As New ClsAF
|
||||
Dim ObjInventario As New ClsInventarios(ObjVales.IniciaTransacSQL())
|
||||
|
||||
|
||||
Dim CveVale As Integer
|
||||
Dim Folio As Integer
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
|
||||
Dim CapacidadTotal As Integer = 40
|
||||
Dim Rendimiento As Integer = 10
|
||||
Dim ProximaRecarga As Integer = LblOdometro.Text.ToEntero + (LblLitrosAF.Text.ToEntero * Rendimiento)
|
||||
Dim OdometroDif As Integer = TxtOdometroActual.Text.ToEntero - LblOdometro.Text.ToEntero
|
||||
Dim Porcentaje As Double = (OdometroDif / Rendimiento) * 0.15
|
||||
Dim CveMovimientoSalida = -1
|
||||
Dim FolioSalida = -1
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim TextoError = ""
|
||||
|
||||
Dim Row = GlobalDTCombustibles(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCombustible = {0}", DdlCombustible.SelectedValue.ToEntero))
|
||||
Dim CvePS = Row("CvePS").ToString.ToEntero
|
||||
Dim CveUM = Row("CveUM").ToString.ToEntero
|
||||
|
||||
|
||||
'TipoVale 1 = Externo
|
||||
'TipoVale 2 = Interno
|
||||
|
||||
''codigo temporal, que desactiva la validacion del odometro
|
||||
If UsuarioActual.CveEmpresa = 13 Then ProximaRecarga = TxtOdometroActual.Text.ToEntero
|
||||
|
||||
'Si edito Folio
|
||||
Dim FolioUsuario = If(EstablecioFolio, TxtFolio.Text.Trim.ToEntero, -1)
|
||||
|
||||
|
||||
'Si el odometro actual es menor a la proxima recarga
|
||||
If TxtOdometroActual.Text.ToEntero < ProximaRecarga Then
|
||||
If TxtOdometroActual.Text.ToEntero > LblOdometro.Text.ToEntero Then
|
||||
If TxtLitros.Text.ToEntero <= ((OdometroDif / Rendimiento) + Porcentaje) Then
|
||||
|
||||
'Si TipoVale es 1 = Externo
|
||||
If ChkExterno.Checked = True Then
|
||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Folio = ObjVales.FolioVale
|
||||
|
||||
|
||||
If CveVale < 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
ElseIf ChkInterno.Checked = True Then
|
||||
|
||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Folio = ObjVales.FolioVale
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFechaVale.Text.Trim.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtLitros.Text.Trim.ToEntero, CveUM, CvePS, -1, DdlActivoFijo.SelectedValue.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe Seleccionar un Tipo de Vale", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
Alert("No se puede registrar una cantidad de litros mayor a " + ((OdometroDif / Rendimiento) + Porcentaje).ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Alert("El odómetro debe ser mayor a " + LblOdometro.Text, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
'Si el odometro es mayor a la proxima recarga
|
||||
Else
|
||||
'Si TipoVale es 1 = Externo
|
||||
If ChkExterno.Checked = True Then
|
||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToEntero, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Folio = ObjVales.FolioVale
|
||||
|
||||
If CveVale < 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'Si TipoVale es 2 = Interno
|
||||
ElseIf ChkInterno.Checked = True Then
|
||||
CveVale = ObjVales.AddValesCombustible(FolioUsuario, 0, DdlProveedores.SelectedValue.ToEntero, DdlActivoFijo.SelectedValue.ToEntero, DdlRHPersonal.SelectedValue.ToEntero, TxtFechaVale.Text.ToDate, TxtNombreRecibe.Text, DdlSubProyecto.SelectedValue.ToEntero, TxtObservciones.Text, TxtOdometroActual.Text.ToEntero, DdlCombustible.SelectedValue.ToEntero, TxtLitros.Text.ToDouble, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Folio = ObjVales.FolioVale
|
||||
|
||||
'AGREGAMOS LA SALIDA
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFechaVale.Text.Trim.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtLitros.Text.Trim.ToEntero, CveUM, CvePS, -1, DdlActivoFijo.SelectedValue.ToEntero) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos"
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Debe Seleccionar un Tipo de Vale", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
ObjVales.Commit()
|
||||
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", Folio)
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Vale</a> ", Encripta(String.Format("OP=VAL&CveVale={0}", CveVale)))
|
||||
If ChkInterno.Checked = True Then
|
||||
Msg.AppendFormat("<br/><br/>Folio de Salida: <b><a href = ""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" class=""texto"" target=""_blank"" >{1}</a></b>", CveMovimientoSalida, FolioSalida)
|
||||
End If
|
||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjVales.RollBack()
|
||||
Alert(TextoError, TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
ObjVales.Dispose()
|
||||
|
||||
LimpiarDatos()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||
|
||||
Dim ObjValesCombustible As New ClsAF
|
||||
For Each gvr As GridViewRow In GVBuscar.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim CveProveedor = If(gvr.FCDropDownList("DdlBuscarP").Visible, gvr.FCDropDownList("DdlBuscarP").SelectedValue.ToEntero, gvr.FCLiteral("LtlProveedor").Text.ToEntero)
|
||||
ObjValesCombustible.UpdateValeCombustible(gvr.DataKey("CveVale").ToEntero, gvr.DataKey("CveCompra").ToEntero, CveProveedor, gvr.FCTextBox("TxtNombreRecibe").Text, gvr.FCTextBox("TxtCantidad").Text.ToDouble, gvr.FCTextBox("TxtRecibo").Text.ToEntero, gvr.FCTextBox("TxtImporte").Text.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Alert("Se Actualizo con exito")
|
||||
ActualizarM()
|
||||
Else
|
||||
Alert("Seleccione una opcion")
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
ObjValesCombustible.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
||||
Dim ObjValesCombustible As New ClsAF
|
||||
|
||||
If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
||||
If ObjValesCombustible.DtResultados.Rows.Count > 0 Then
|
||||
BtnActualizar.Visible = True
|
||||
End If
|
||||
Else
|
||||
GVBuscar.DataSource = Nothing
|
||||
BtnActualizar.Visible = False
|
||||
End If
|
||||
ObjValesCombustible.Dispose()
|
||||
GVBuscar.DataBind()
|
||||
UpBuscar.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub ActualizarM()
|
||||
Dim ObjValesCombustible As New ClsAF
|
||||
|
||||
If ObjValesCombustible.GetValesCombustible(-1, -1, If(TxtBuscar.Text.Equals(""), -1, TxtBuscar.Text.ToEntero), DdlBuscarProveedor.SelectedValue.ToEntero, DdlBuscarActivo.SelectedValue.ToEntero, -1, -1, -1, -1, DdlBuscarPersonal.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
GVBuscar.DataSource = ObjValesCombustible.DtResultados
|
||||
Else
|
||||
GVBuscar.DataSource = Nothing
|
||||
End If
|
||||
ObjValesCombustible.Dispose()
|
||||
GVBuscar.DataBind()
|
||||
UpBuscar.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user