Gastos de Trayectos
This commit is contained in:
@@ -5033,7 +5033,7 @@ Public Class ClsGPS
|
||||
#End Region
|
||||
|
||||
#Region "G A S T O S"
|
||||
Public Function AddGasto(Cantidad As Decimal, Precio As Decimal, Descripcion As String, Observaciones As String, Fecha As DateTime, TipoGasto As Integer, CveCliente As Integer, Optional CveDispositvo As Integer = -1, Optional CveTrayecto As Integer = -1) As Boolean
|
||||
Public Function AddGasto(Cantidad As Decimal, Precio As Decimal, Descripcion As String, Observaciones As String, Fecha As DateTime, TipoGasto As Integer, CveUsuario As Integer, CveCliente As Integer, Optional CveDispositivo As Integer = -1, Optional CveTrayecto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_GastosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5045,6 +5045,7 @@ Public Class ClsGPS
|
||||
.Add("@TipoGasto", SqlDbType.TinyInt).Value = TipoGasto
|
||||
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||
.Add("@CveTrayecto", SqlDbType.Int).Value = CveTrayecto
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
End With
|
||||
Try
|
||||
@@ -5055,9 +5056,9 @@ Public Class ClsGPS
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetGastos(CveGPSGasto As Integer, CveCliente As Integer, Optional CveDispositvo As Integer = -1, Optional CveTrayecto As Integer = -1) As Boolean
|
||||
Public Function GetGastos(CveGPSGasto As Integer, CveCliente As Integer, Optional CveDispositivo As Integer = -1, Optional CveTrayecto As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_RutasGet")
|
||||
DataAdapter("PA_GPS_GastosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveGPSGasto", SqlDbType.Int).Value = CveGPSGasto
|
||||
.Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo
|
||||
@@ -5072,7 +5073,7 @@ Public Class ClsGPS
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateGasto(CveGPSGasto As Integer, Cantidad As Decimal, Precio As Decimal, Descripcion As String, Observaciones As String, Fecha As DateTime) As Boolean
|
||||
Public Function UpdateGasto(CveGPSGasto As Integer, Cantidad As Decimal, Precio As Decimal, Descripcion As String, Observaciones As String, Fecha As DateTime, CveUsuarioModifico As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_GPS_GastosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5082,6 +5083,7 @@ Public Class ClsGPS
|
||||
.Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
149
GPS/RepGastos.aspx
Normal file
149
GPS/RepGastos.aspx
Normal file
@@ -0,0 +1,149 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepGastos.aspx.vb" Inherits="GPS_RepGastos" %>
|
||||
|
||||
<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 Gastos de Trayectos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar Gasto</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="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" ValidationGroup="GrpGuardar" Text="Consultar" class="btn btn-primary" />
|
||||
</div>
|
||||
<div class="titlefiltros caption" style="margin-top: -8px;">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>Trayecto:
|
||||
<asp:DropDownList AppendDataBoundItems="true" ID="DdlTrayectoFiltro" runat="server" Width="200px" DataTextField="Trayecto" DataValueField="CveTrayecto" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Value="-1" Text="Todos"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Fecha Inicio:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator4" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</li>
|
||||
<li>Fecha Fin:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator5" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveGPSGasto,Cantidad,Precio,Descripcion,Observaciones,Fecha"
|
||||
EmptyDataText="No se encontraron gastos" ToolTip="Listado de Gastos"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Trayecto" HeaderText="Trayecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="UsuarioIngreso" HeaderText="Usuario Ingresó" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="UsuarioModifico" HeaderText="Usuario Modificó" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditar_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la marca?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="ltlMotititulo" Text="Modelo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="DivTrayecto" runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTrayecto" CssClass="form-control marginFixRow select2me" runat="server" AppendDataBoundItems="true" DataTextField="Trayecto" DataValueField="CveTrayecto">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTrayecto" runat="server" ControlToValidate="DdlTrayecto" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Trayecto''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTrayecto.ClientID.ToString()%>">Trayecto:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFCCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFCCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVModelo" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOModelo" runat="server" HighlightCssClass="vco" TargetControlID="RFVModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObs" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtObs.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row v-center">
|
||||
<label class="col-md-12" style="color: gray">Fecha:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<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 seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
139
GPS/RepGastos.aspx.vb
Normal file
139
GPS/RepGastos.aspx.vb
Normal file
@@ -0,0 +1,139 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class GPS_RepGastos
|
||||
Inherits ClsPaginas
|
||||
#Region "PROPIEDADES"
|
||||
Private Property CveGPSGasto() As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveGPSGasto")), -1, CInt(ViewState("CveGPSGasto")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("CveGPSGasto") = Value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Modalidad() As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Modalidad")), "", (ViewState("Modalidad").ToString))
|
||||
End Get
|
||||
Set
|
||||
ViewState("Modalidad") = Value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
|
||||
txtFechaI.Text = $"01/{DateTime.Now.ToString("MM")}/{DateTime.Now.Year} 00:00"
|
||||
txtFechaF.Text = $"{DateTime.Now.ToString("dd/MM/yyyy")} 23:59"
|
||||
|
||||
Dim ObjGPS As New ClsGPS()
|
||||
If ObjGPS.GetTrayectos(-1, -1, UsuarioActual.CveCliente) Then
|
||||
DdlTrayecto.DataSource = ObjGPS.DtResultados
|
||||
DdlTrayectoFiltro.DataSource = ObjGPS.DtResultados
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
|
||||
DdlTrayecto.DataBind()
|
||||
DdlTrayectoFiltro.DataBind()
|
||||
|
||||
UPFiltros.Update()
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjGral As New ClsGPS
|
||||
If ObjGral.GetGastos(-1, UsuarioActual.CveCliente, CveTrayecto:=DdlTrayectoFiltro.SelectedValue.ToEntero()) Then
|
||||
GvDatos.DataSource = ObjGral.DtResultados
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "BOTONES"
|
||||
|
||||
Protected Sub LnkEditar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
DivTrayecto.Visible = False
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
|
||||
CveGPSGasto = gvRow.DataKey("CveGPSGasto").ToEntero()
|
||||
TxtCantidad.Text = gvRow.DataKey("Cantidad")
|
||||
TxtPrecio.Text = gvRow.DataKey("Precio")
|
||||
TxtDescripcion.Text = gvRow.DataKey("Descripcion")
|
||||
TxtObs.Text = gvRow.DataKey("Observaciones")
|
||||
TxtFecha.Text = gvRow.DataKey("Fecha").ToDateTime().ToString("dd/MM/yyyy hh:mm:ss")
|
||||
|
||||
Modalidad = "U"
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
ltlMotititulo.Text = "Actualizar Gasto"
|
||||
RegistraScript("$('#DModal').modal('show')")
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim ObjPS As New ClsGPS
|
||||
Dim CveGasto = gvRow.DataKey("CveGPSGasto").ToEntero
|
||||
If ObjPS.RemoveGasto(CveGasto) Then
|
||||
Alert("El gasto se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
DivTrayecto.Visible = True
|
||||
Modalidad = "A"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
ltlMotititulo.Text = "Agregar Gasto"
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DModal').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjPS As New ClsGPS
|
||||
If Modalidad = "A" Then
|
||||
If ObjPS.AddGasto(TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(),
|
||||
2, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, CveTrayecto:=DdlTrayecto.SelectedValue.ToEntero()) Then
|
||||
RegistraScript("$('#DModal').modal('hide')")
|
||||
Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
ElseIf Modalidad = "U" Then
|
||||
If ObjPS.UpdateGasto(CveGPSGasto, TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(), UsuarioActual.CveUsuario) Then
|
||||
RegistraScript("$('#DModal').modal('hide')")
|
||||
Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "LIMPIAR"
|
||||
Protected Sub LimpiaModal()
|
||||
TxtCantidad.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtDescripcion.Text = ""
|
||||
TxtObs.Text = ""
|
||||
TxtFecha.Text = ""
|
||||
DdlTrayecto.SelectedValueExist("-1")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -425,7 +425,7 @@
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div style="max-height: 392px; overflow-y: scroll">
|
||||
<asp:GridView ID="GvCombustible" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" >
|
||||
<asp:GridView ID="GvCombustible" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Estatus" ItemStyle-Width="12.5%" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="EstatusSiguiente" ItemStyle-Width="12.5%" HeaderText="Estatus Siguiente" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -446,6 +446,47 @@
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel runat="server" HeaderText="Gastos">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-money font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Gastos</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">
|
||||
<div style="max-height: 392px; overflow-y: scroll">
|
||||
<asp:GridView ID="GvGastos" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" OnRowDataBound="GvGastos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="15%" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="UsuarioIngreso" HeaderText="Usuario Ingresó" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="UsuarioModifico" HeaderText="Usuario Modificó" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Left" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -98,6 +98,10 @@ Partial Class GPS_TrayectoDetalle
|
||||
|
||||
GvCombustible.DataSource = ObjGPS.DtSetResultados.Tables(4)
|
||||
GvCombustible.DataBind()
|
||||
|
||||
GvGastos.DataSource = ObjGPS.DtSetResultados.Tables(5)
|
||||
GvGastos.DataBind()
|
||||
|
||||
End If
|
||||
End If
|
||||
Dim count = 0
|
||||
@@ -211,4 +215,11 @@ Partial Class GPS_TrayectoDetalle
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
End Sub
|
||||
Protected Sub GvGastos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If String.IsNullOrEmpty(e.Row.DBCampo("CveGPSGasto")) Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user