--merge ClsPaginas
This commit is contained in:
277
Acumuladores/RepRecolecciones.aspx
Normal file
277
Acumuladores/RepRecolecciones.aspx
Normal file
@@ -0,0 +1,277 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepRecolecciones.aspx.vb" Inherits="Acumuladores_RepRecolecciones" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Recolecciones
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarTiposUso" data-toggle="tooltip" data-placement="left" title="Agregar Tipo de Uso" Text="<i class='fa fa-plus'></i> Agregar Uso"></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="UpGral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" Visible="true" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-sm-1">
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<asp:DropDownList runat="server" ID="DdlSubProyecto" CssClass="select2me" Width="100%" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 90px;">Fecha Inicial:</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: 120px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="80px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<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="ImgCalendarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<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="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 " style="width: 80px;">Fecha Final:</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: 120px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="80px" 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>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="TxtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<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="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row">
|
||||
<div class="Widthall" style="text-align: right!important; margin-top: 0px!important; margin-bottom: 2px!important">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvR.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvR.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:5px">
|
||||
<asp:UpdatePanel ID="UPGv" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvR" runat="server" AutoGenerateColumns="False" OnRowDataBound="gvR_RowDataBound"
|
||||
DataKeyNames="CveEntregaAlmacen,Orden,CveDireccionOrigen,CveSubProyecto,Estatus,CveTimbre,CveCliente,FolioReferencia,Referencia"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
data-sort="true"
|
||||
data-freezerows="1"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="80px" HeaderStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFecha" runat="server" Text='<%# Eval("FechaEntrega", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="SerieFolio" DataField="Serie Folio" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<asp:TemplateField HeaderText="Fecha Límite" ItemStyle-Width="80px" HeaderStyle-Width="80px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFechaEntrega" runat="server" Text='<%# Eval("FechaLimite", "{0:dd/MM/yyyy}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Centro" ItemStyle-Width="10%" HeaderStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblCC" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="5%" HeaderStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblFolio" runat="server" Text='<%# Eval("FolioReferencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 150px;">
|
||||
<asp:Literal ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sucursal" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblContacto" runat="server" Text='<%# Eval("Contacto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Referencia" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblRef" runat="server" Text='<%# Eval("Referencia") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dirección" >
|
||||
<ItemTemplate>
|
||||
<div class="truncate" style="width: 150px;">
|
||||
<asp:Literal ID="LblDir" runat="server" Text='<%# Eval("Direccion") %>'></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplR" runat="server" visible="false" AlternateText="Registrar" ToolTip="Registrar entrada" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-location-arrow'></i>" />
|
||||
<asp:LinkButton ID="LnkGvDatosRecoleccionEditar" runat="server" Visible="false" OnClick="LnkGvDatosRecoleccionEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CausesValidation="False" CssClass="btn btn-circle btn-xs blue" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div id="DivModalRecoleccion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalRecoleccion" 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="H3" runat="server">
|
||||
<asp:Literal runat="server" ID="LtlModalRecoleccionTitulo">Agregar Recolección</asp:Literal>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class=" col-md-12">
|
||||
<asp:Literal runat="server" ID="LblProductosCargados">P</asp:Literal>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class=" col-md-2">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" style="max-width: 85px">
|
||||
<asp:TextBox ID="TxtModalRecoleccionCantidad" Width="50px" MaxLength="7" runat="server" TabIndex="1" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtModalRecoleccionCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<ajax:FilteredTextBoxExtender ID="FETxtModalRecoleccionCantidad" runat="server" TargetControlID="TxtModalRecoleccionCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator runat="server" ID="RfvTxtModalRecoleccionCantidad" ControlToValidate="TxtModalRecoleccionCantidad" ValidationGroup="GrpModalRecoleccionGuardaPS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario por favor introdúzcalo." Display="Dynamic" Text="*"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CevRfvTxtModalRecoleccionCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtModalRecoleccionCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtModalRecoleccionCantidad" runat="server" ControlToValidate="TxtModalRecoleccionCantidad" Display="None" Type="Double" MinimumValue="0.001" MaximumValue="2147483647" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor introdúzcalo." ValidationGroup="GrpModalRecoleccionGuardaPS"></asp:RangeValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtModalRecoleccionCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-md-2">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlModalRecoleccionUnidad" runat="server" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" CssClass="form-control input-sm select2me" Style="width: 85px !important;"></asp:DropDownList>
|
||||
<label for="<%= TxtModalRecoleccionCantidad.ClientID.ToString()%>">Unidad:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalRecoleccionUnidad" runat="server" ControlToValidate="DdlModalRecoleccionUnidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalRecoleccionGuardaPS"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlModalRecoleccionUnidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalRecoleccionUnidad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" col-md-7">
|
||||
<div class="psagregar">
|
||||
<div class="comboxes">
|
||||
<label for="<%= DdlProducto2.ClientID.ToString()%>" style="font-size: 13px; color: #888888; opacity: 1; margin-bottom: 0px;">Producto:</label>
|
||||
<asp:DropDownList runat="server" ID="DdlProducto2" Width="100%" AutoPostBack ="true"
|
||||
CssStyle="width: 100%;" IncluyeTodos="false" CssClass ="form-control select2me" TabIndex="2"
|
||||
DataTextField="PSCodigo" DataValueField="CvePS" OnSelectedIndexChanged ="DdlProducto_ValueChanged" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="text-align: right!important; padding-top: 15px; padding-left: 0px;">
|
||||
<asp:LinkButton ID="LnkModalAgregarPS" runat="server" CssClass="btn btn-primary smallplus" ValidationGroup="GrpModalRecoleccionGuardaPS"
|
||||
OnClick="LnkModalAgregarPS_Click"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvModalPSRecoleccion" DataKeyNames="CveEntregaAlmacenDetalle,CodigoPS,CvePS,CveUnidadMedida,Cantidad" runat="server"
|
||||
ShowHeader="true" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="Widthall table table-striped table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="86px" HeaderStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="Abreviatura" ItemStyle-Width="86px" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="500px" />
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkModalGvModalPSRecoleccionEliminar" runat="server" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el producto?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="160px" HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnModalRecoleccionGuardar" runat="server" CssClass="btn btn-primary" Text="Agregar Recolección" ValidationGroup="GrpModalRecoleccionGuardar" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content9" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
|
||||
212
Acumuladores/RepRecolecciones.aspx.vb
Normal file
212
Acumuladores/RepRecolecciones.aspx.vb
Normal file
@@ -0,0 +1,212 @@
|
||||
Imports System.Data
|
||||
Imports CrystalDecisions.Shared.Json
|
||||
Imports Extensiones
|
||||
|
||||
|
||||
Partial Class Acumuladores_RepRecolecciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property CveEntregaAlmacen As Integer
|
||||
Get
|
||||
If Not ViewState("CveEntregaAlmacen") Is Nothing Then
|
||||
Return ViewState("CveEntregaAlmacen").ToString.ToEntero
|
||||
Else
|
||||
Return -1
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEntregaAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTRecoleccion As DataTable
|
||||
Get
|
||||
If ViewState("DTRecoleccion") Is Nothing Then
|
||||
ViewState("DTRecoleccion") = InitDTRecoleccion()
|
||||
End If
|
||||
Return CType(ViewState("DTRecoleccion"), DataTable)
|
||||
End Get
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DTRecoleccion") = CType(value, DataTable)
|
||||
End Set
|
||||
End Property
|
||||
Private Property Actualizar As Boolean
|
||||
Get
|
||||
If Not ViewState("Actualizar") Is Nothing Then
|
||||
Return DirectCast(ViewState("Actualizar"), Boolean)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Actualizar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaCombos()
|
||||
CargaPS()
|
||||
TxtFechaI.Text = NowADS().AddDays(-1).ToShortDateString
|
||||
TxtFechaF.Text = NowADS().AddDays(3).ToShortDateString
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjGeneral As New ClsGenerales
|
||||
|
||||
If (ObjGeneral.GetInvEntregaAlmacenRuta(-1, Now.AddMonths(-1), Now.AddMonths(1), UsuarioActual.CveEmpresa, 2, -1)) Then
|
||||
GvR.DataSource = ObjGeneral.DtResultados
|
||||
End If
|
||||
|
||||
ObjGeneral.Dispose()
|
||||
|
||||
UPGv.DataBind()
|
||||
UpGral.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub gvR_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim LnkEditar As LinkButton = e.Row.FCLinkButton("LnkGvDatosRecoleccionEditar")
|
||||
|
||||
If e.Row.DataKey("Estatus") = "0" OrElse e.Row.DataKey("Estatus") = "" Then
|
||||
LnkEditar.Visible = True
|
||||
End If
|
||||
|
||||
' If e.Row.DataKey("Estatus") = "1" Then
|
||||
e.Row.FCHyperLink("HplR").Visible = True
|
||||
e.Row.FCHyperLink("HplR").NavigateUrl = "/Inventarios/EntradasSalidas.aspx?CveEntregaAlmacen=" & e.Row.DBCampo("CveEntregaAlmacen")
|
||||
'End If
|
||||
|
||||
If e.Row.DataKey("CveTimbre") <> "" Then
|
||||
e.Row.FCCheckBox("Chk").Visible = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvDatosRecoleccionEditar_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim LnkEliminar As LinkButton = CType(sender, LinkButton)
|
||||
Dim GvRow As GridViewRow = CType(LnkEliminar.NamingContainer, GridViewRow)
|
||||
CveEntregaAlmacen = GvRow.DataKey("CveEntregaAlmacen").ToEntero()
|
||||
Dim CveDireccionOrigen As Integer = GvRow.DataKey("CveDireccionOrigen").ToEntero()
|
||||
|
||||
|
||||
CargaDatosRecoleccionDetallePS()
|
||||
LtlModalRecoleccionTitulo.Text = "Definición de tamaños"
|
||||
BtnModalRecoleccionGuardar.Text = "Guardar"
|
||||
UpModalRecoleccion.Update()
|
||||
RegistraScript("$('#DivModalRecoleccion').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProducto_ValueChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
ElProductoChange()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ElProductoChange()
|
||||
DdlModalRecoleccionUnidad.Items.Clear()
|
||||
DdlModalRecoleccionUnidad.DataSource = GlobalDTProductosServiciosEquivalencias(DdlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa)
|
||||
DdlModalRecoleccionUnidad.DataBind()
|
||||
UpModalRecoleccion.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatosRecoleccionDetallePS()
|
||||
|
||||
Dim ObjGenerales As New ClsGenerales()
|
||||
Dim Str As New StringBuilder
|
||||
Str.Append("Productos Definidos <br/>")
|
||||
If ObjGenerales.GetEntregaAlmacenRutaDetalle(CveEntregaAlmacen) Then
|
||||
For Each dr As DataRow In ObjGenerales.DtResultados.Rows
|
||||
Str.AppendFormat(" {0} - {1}<br/>", dr("Cantidad"), dr("CodigoPS"))
|
||||
Next
|
||||
LblProductosCargados.Text = Str.ToString
|
||||
End If
|
||||
|
||||
ObjGenerales.Dispose()
|
||||
|
||||
GvModalPSRecoleccion.DataSource = DTRecoleccion
|
||||
GvModalPSRecoleccion.DataBind()
|
||||
UpModalRecoleccion.Update()
|
||||
End Sub
|
||||
Private Function InitDTRecoleccion() As DataTable
|
||||
Dim DT As DataTable = New DataTable()
|
||||
DT.Columns.Add("CveEntregaAlmacenDetalle", System.Type.[GetType]("System.Int32"))
|
||||
DT.Columns.Add("CveEntregaAlmacen", System.Type.[GetType]("System.Int32"))
|
||||
DT.Columns.Add("CvePS", System.Type.[GetType]("System.Int32"))
|
||||
DT.Columns.Add("Cantidad", System.Type.[GetType]("System.Double"))
|
||||
DT.Columns.Add("CveUnidadMedida", System.Type.[GetType]("System.Int32"))
|
||||
DT.Columns.Add("CveUsuario", System.Type.[GetType]("System.Int32"))
|
||||
DT.Columns.Add("FechaIng", System.Type.[GetType]("System.DateTime"))
|
||||
DT.Columns.Add("CodigoPS", System.Type.[GetType]("System.String"))
|
||||
DT.Columns.Add("Abreviatura", System.Type.[GetType]("System.String"))
|
||||
Return DT
|
||||
End Function
|
||||
|
||||
Private Sub CargaPS()
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
Dim lista As New List(Of String)
|
||||
Dim Filtro As String = ""
|
||||
|
||||
For Each drow As DataRow In GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).Rows
|
||||
|
||||
If drow("CvePSCargo").ToString.ToEntero > 0 Then
|
||||
lista.Add(drow("CvePSCargo").ToString)
|
||||
End If
|
||||
Next
|
||||
|
||||
If lista.Count > 0 Then
|
||||
|
||||
Filtro = "CvePS in(" & String.Join(",", lista) & ")"
|
||||
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros(Filtro)
|
||||
DdlProducto2.DataBind()
|
||||
DdlProducto2.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
ObjAcum.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkModalAgregarPS_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
|
||||
Dim dRow As DataRow = DTRecoleccion.NewRow()
|
||||
dRow("CveEntregaAlmacenDetalle") = -1
|
||||
dRow("CveEntregaAlmacen") = CveEntregaAlmacen
|
||||
dRow("CvePS") = DdlProducto2.SelectedValue.ToEntero()
|
||||
dRow("Cantidad") = TxtModalRecoleccionCantidad.Text.ToEntero()
|
||||
dRow("CveUnidadMedida") = DdlModalRecoleccionUnidad.SelectedValue.ToEntero()
|
||||
dRow("CveUsuario") = UsuarioActual.CveUsuario
|
||||
dRow("FechaIng") = NowADS()
|
||||
dRow("CodigoPS") = DdlProducto2.SelectedItem.Text
|
||||
dRow("Abreviatura") = DdlModalRecoleccionUnidad.SelectedItem.Text
|
||||
DTRecoleccion.Rows.Add(dRow)
|
||||
|
||||
|
||||
LimpiarControlesPS()
|
||||
CargaDatosRecoleccionDetallePS()
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarControlesPS()
|
||||
TxtModalRecoleccionCantidad.Text = ""
|
||||
DdlModalRecoleccionUnidad.Items.Clear()
|
||||
'DdlProducto2.txtText.Value = ""
|
||||
'DdlProducto2.txtValue.Value = ""
|
||||
UpModalRecoleccion.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -4,6 +4,7 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Profact.TimbraCFDI40
|
||||
|
||||
Public Class ClsContratos
|
||||
Implements IDisposable
|
||||
@@ -158,7 +159,7 @@ Public Class ClsContratos
|
||||
Public Property PorGarantia As Double
|
||||
Public Property CveContratosEstatus As Integer
|
||||
Public Property Estatus As Integer
|
||||
'Public Property EstatusContrato As Integer
|
||||
Public Property EstatusContrato As Integer
|
||||
Public Property Archivo As String
|
||||
Public Property Geom As String
|
||||
Public Property FechaIng As DateTime
|
||||
@@ -270,7 +271,7 @@ Public Class ClsContratos
|
||||
Me.PorAnticipo = Data.Rows(0)("PorAnticipo").ToString.ToDouble
|
||||
Me.PorAmortizacionAnticipo = Data.Rows(0)("PorAmortizacionAnticipo").ToString.ToDouble
|
||||
Me.PorGarantia = Data.Rows(0)("PorGarantia").ToString.ToDouble
|
||||
'Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero
|
||||
Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero
|
||||
Me.Archivo = Data.Rows(0)("Archivo").ToString
|
||||
Me.Geom = Data.Rows(0)("Geom").ToString
|
||||
Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
|
||||
@@ -406,7 +407,7 @@ Public Class ClsContratos
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1) As Boolean
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional EstatusContrato As Integer = -1, Optional CveAF As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosUpdate")
|
||||
@@ -463,6 +464,8 @@ Public Class ClsContratos
|
||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -556,7 +559,7 @@ Public Class ClsContratos
|
||||
|
||||
Public Function GetContratosEstatus(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusGET")
|
||||
DataAdapter("PA_Con_ContratosEstatusGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
@@ -571,6 +574,95 @@ Public Class ClsContratos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddContratoEstatus(ContratoEstatus As String, TipoEstatus As Integer, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus
|
||||
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateContratoEstatus(CveContratoEstatus As Integer, ContratoEstatus As String, TipoEstatus As Integer, Estatus As Boolean, BackgroundColor As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus
|
||||
.Add("@ContratoEstatus", SqlDbType.VarChar).Value = ContratoEstatus
|
||||
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar al Catálogo de Contratos Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveContratoEstatus(CveContratoEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Con_ContratosEstatusRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContratoEstatus", SqlDbType.Int).Value = CveContratoEstatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el contrato Estatus.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateContratoAF(CveContrato As Integer, CveAF As Integer, CveChofer As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratoAFUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveContrato", SqlDbType.Int).Value = CveContrato
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("Número: 2601;") Then
|
||||
Alert("Ya existe un contrato con el mismo número de contrato registrado: " & NumeroContrato & ".", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ Public Class ClsOS
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean
|
||||
Public Function UpdateOrdenesServiciosFinaliza(CveOS As Integer, CveOSDetalle As Integer, CvePS As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1, Optional Observaciones As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServiciosFinalizaUpdate")
|
||||
@@ -805,6 +805,7 @@ Public Class ClsOS
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||
|
||||
End With
|
||||
|
||||
|
||||
@@ -1639,6 +1639,33 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTCaracteristicasOpciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#Region "C R M "
|
||||
Public Shared Property GlobalDTCRMTipoProceso(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}"
|
||||
'sino existe, recarga los datos
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Dim cRMService As New ADSNetLibrary.SIGAPI.Services.CRM.CRMService(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim tipoProceso As New ADSNetLibrary.SIGAPI.Models.CRM.Request.RequestTipoProceso(CveEmpresa)
|
||||
' Dim ObjTipoProceso As List(Of ADSNetLibrary.SIGAPI.Models.ResponseModel(Of ADSNetLibrary.SIGAPI.Models.CRM.Request.ResponseTipoProceso)) = cRMService.GetTipoProcesoCRM(tipoProceso)
|
||||
Dim ObjTipoProceso As ADSNetLibrary.SIGAPI.Models.ResponseModel(Of List(Of ADSNetLibrary.SIGAPI.Models.CRM.Response.ResponseTipoProceso))
|
||||
ObjTipoProceso = cRMService.GetTipoProcesoCRM(tipoProceso)
|
||||
|
||||
If ObjTipoProceso.Result.Count > 0 Then
|
||||
HttpContext.Current.Application(AppNombre) = ObjTipoProceso.Result.QueryToDataTable(True)
|
||||
End If
|
||||
|
||||
End If
|
||||
GlobalDTCRMTipoProceso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTCRMTipoProceso-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable
|
||||
' Get
|
||||
' If CveEmpresa <> -1 Then
|
||||
@@ -2365,6 +2392,28 @@ Public Class ClsPaginas
|
||||
Application("GlobalDTContratosSecciones") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Property GlobalDTContratosEstatus(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}"
|
||||
If HttpContext.Current.Application(AppNombre) Is Nothing Then
|
||||
Using ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosEstatus(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjContratos.DtResultados
|
||||
End Using
|
||||
End If
|
||||
'Dim StrSQL As New StringBuilder
|
||||
'StrSQL.Append(" 1 = 1 ")
|
||||
'If CveContrato >= 0 Then StrSQL.AppendFormat(" AND CveContrato = {0} ", CveContrato)
|
||||
'If CveSubProyecto >= 0 Then StrSQL.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto)
|
||||
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), "", "", DataViewRowState.CurrentRows)
|
||||
GlobalDTContratosEstatus = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = $"GlobalDTContratosEstatus-{CveEmpresa}"
|
||||
HttpContext.Current.Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
Public Shared Property GlobalDTContratos(CveEmpresa As Integer, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = $"GlobalDTContratos-{CveEmpresa}"
|
||||
@@ -6001,8 +6050,8 @@ Public Class ClsPaginas
|
||||
namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
|
||||
namespaces.AddNamespace("cartaporte30", "http://www.sat.gob.mx/CartaPorte30")
|
||||
|
||||
Dim Nodos30 = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
|
||||
Dim Nodos20 = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
|
||||
Dim Nodos30 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
|
||||
Dim Nodos20 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
|
||||
|
||||
If Nodos30 IsNot Nothing Then
|
||||
VersionCCP = "3.0"
|
||||
@@ -7253,12 +7302,12 @@ Public Class ClsPaginas
|
||||
End If
|
||||
|
||||
If NombreArchivo = "FacturaUSA" Then
|
||||
Dim DtBaseTotales = Vta.DtDeduccion.Clone()
|
||||
Dim DtBaseTotales As DataTable = Vta.DtDeduccion.Clone()
|
||||
|
||||
If Vta.DtDeduccion IsNot Nothing Then
|
||||
Dim RowTotal_USA = DtBaseTotales.NewRow()
|
||||
Dim RowPAYMENTS_USA = DtBaseTotales.NewRow()
|
||||
Dim RowBALANCE_USA = DtBaseTotales.NewRow()
|
||||
Dim RowTotal_USA As DataRow = DtBaseTotales.NewRow()
|
||||
Dim RowPAYMENTS_USA As DataRow = DtBaseTotales.NewRow()
|
||||
Dim RowBALANCE_USA As DataRow = DtBaseTotales.NewRow()
|
||||
|
||||
Dim TOTAL_USA As Decimal = 0
|
||||
Dim PAYMENTS_USA As Decimal = 0
|
||||
@@ -10100,6 +10149,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contratos/CatRefrendos.aspx".ToUpper(), 644)
|
||||
PaginaDict.Add("/Contratos/RepContratosFianzas.aspx".ToUpper(), 646)
|
||||
PaginaDict.Add("/Contratos/RepPedidosDevolucionesXContrato.aspx".ToUpper(), 705)
|
||||
PaginaDict.Add("/Contratos/CatContratosEstatus.aspx".ToUpper(), 173)
|
||||
#End Region
|
||||
#Region "CrM"
|
||||
PaginaDict.Add("/CRM/CatTipoProceso.aspx".ToUpper(), 1301)
|
||||
@@ -10756,15 +10806,17 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
|
||||
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)
|
||||
PaginaDict.Add("/Acumuladores/RepAcumuladoresVigencia.aspx".ToUpper(), 174)
|
||||
PaginaDict.Add("/Acumuladores/RepRecolecciones.aspx".ToUpper(), 563)
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Transportes"
|
||||
PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601)
|
||||
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
|
||||
PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604)
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
|
||||
|
||||
@@ -246,6 +246,9 @@ Public Class ClsSisUsuarios
|
||||
Dim autoip As String = Data.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
||||
Retorno.AutorizadoxIP = (autoip = "1" OrElse autoip = "TRUE")
|
||||
|
||||
' Esto es parta el punto de venta
|
||||
Retorno.CveSucursal = Data.Rows(0)("CveSubProyecto").ToString().ToEntero
|
||||
|
||||
''Toma la primer letra de cada nombre
|
||||
'Dim sbr As New StringBuilder
|
||||
'For Each St As String In Retorno.Nombre.Split(" "c)
|
||||
|
||||
@@ -333,6 +333,68 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddDestino(Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_DestinosAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestino", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@Destino", SqlDbType.VarChar).Value = Destino
|
||||
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional)
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestino").Value.ToString)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateDestino(CveDestino As Integer, Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_DestinosUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@Destino", SqlDbType.VarChar).Value = Destino
|
||||
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional)
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveDestino(CveDestino As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Trans_DestinosRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Rutas"
|
||||
@@ -351,15 +413,73 @@ Public Class ClsTransportes
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_RutasAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_RutasUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveRuta(CveRuta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Trans_RutasRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Tarifas"
|
||||
#Region "Importes"
|
||||
Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_DestinosTarifasGet")
|
||||
@@ -376,6 +496,63 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddDestinosTarifas(CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_DestinosTarifasAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero
|
||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero
|
||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero
|
||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestinoTarifa").Value.ToString)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_DestinosTarifasUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero
|
||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero
|
||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero
|
||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveDestinosTarifas(CveDestinoTarifa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Trans_DestinosTarifasRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -115,7 +115,12 @@ Public Class wsSIG
|
||||
Retorno.CveEmpresa = ttDato.CveEmpresa
|
||||
'Retorno.Empresa = ttDato.NombreEmpresa
|
||||
Retorno.CveVendedor = ttDato.CveVendedor
|
||||
Retorno.CveSucursal = CveSubProyecto
|
||||
|
||||
If CveSubProyecto > 0 Then
|
||||
Retorno.CveSucursal = CveSubProyecto
|
||||
Else
|
||||
Retorno.CveSucursal = ttDato.CveSucursal
|
||||
End If
|
||||
'Retorno.Contraseña = ttDato.Contraseña
|
||||
'Retorno.IMEI = IMEI
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
FI = context.Request("start").ToDate
|
||||
|
||||
FF = context.Request("end").ToDate
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF) Then
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, context:=context) Then
|
||||
'Convierte el objeto de Eventos en JSON
|
||||
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
||||
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
||||
@@ -280,7 +280,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
'AGREGAMOS CUANDO NO ES RECURRENTE
|
||||
Dim tFecha As DateTime = DateAdd(DateInterval.Month, -6, ClsPaginas.NowADS())
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||
If dr("FechaFinal").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
|
||||
If dr("FechaFin").ToString.ToDateTime > tFecha Or dr("FechaInicio").ToString.ToDateTime > tFecha Then
|
||||
events.Add(cevent)
|
||||
End If
|
||||
Else
|
||||
@@ -442,7 +442,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Dim DT_EstatusOS As New DataTable
|
||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||
Dim ErrorEventos As Boolean = False
|
||||
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
|
||||
Dim tipoVista As String = context.Request("tipoVista")
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
@@ -458,19 +457,31 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
For Each dr As DataRow In ObjContratos.DtResultados.Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
|
||||
Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero
|
||||
|
||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||
cevent.title = dr("DescripcionContrato").ToString
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default
|
||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||
cevent.allDay = False
|
||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero
|
||||
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
|
||||
cevent.Dolares = dr("Importe").ToString.ToDecimal
|
||||
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
|
||||
Select Case estatus
|
||||
Case 1
|
||||
cevent.backgroundColor = "#00A56A"
|
||||
Case 2
|
||||
cevent.backgroundColor = "#2B4FD6"
|
||||
Case 3
|
||||
cevent.backgroundColor = "#EE602E"
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
If Not cevent.recurrenciatipo > 0 Then
|
||||
|
||||
@@ -554,24 +565,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.allDay = False
|
||||
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
|
||||
'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
|
||||
'cevent.cveagendatipo = dr("CveAgendaTipo").ToString
|
||||
'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
|
||||
'cevent.backgroundColor = dr("BackGroundColor").ToString
|
||||
|
||||
'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
|
||||
'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
|
||||
'cevent.diassemana = dr("DiasSemana").ToString
|
||||
'cevent.dia = dr("Dia").ToString.ToEntero
|
||||
'cevent.mes = dr("Mes").ToString.ToEntero
|
||||
'cevent.recurrenciafin = dr("RecurrenciaFin").ToString
|
||||
'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
|
||||
'cevent.Prospecto = dr("Prospecto").ToString
|
||||
|
||||
'11/05/2018 - Evento Gasto Recurrente
|
||||
|
||||
|
||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<asp:LinkButton ID="LnkExportaGv" Visible="false" runat="server">Imprimir Desglose</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HyperLink2" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivAgregarPS" runat="server"><i class='fa fa-plus'></i> Agregar PS</asp:HyperLink>
|
||||
<asp:HyperLink ID="HplNuevoPS" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#DivAgregarPS" runat="server"><i class='fa fa-plus'></i> Agregar PS</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddOtrosGastos" OnClick="LnkAddOtrosGastos_Click" Visible="false" runat="server"><i class="fa fa-plus-circle"></i> Agregar Otros Gastos</asp:LinkButton>
|
||||
|
||||
@@ -1176,6 +1176,7 @@ Partial Class Compras_Compras
|
||||
ModalidadUMAlias = -1
|
||||
CvePrePoliza = -1
|
||||
TabActivosFijos.Enabled = UsuarioActual.Empresa.UsaAF
|
||||
'HplNuevoPS.Visible = Not UsuarioActual.TienePermisoProceso(122)
|
||||
|
||||
TieneOC = False
|
||||
CveMoneda = -1
|
||||
|
||||
@@ -1254,9 +1254,10 @@ Partial Class PopUpVerFactura
|
||||
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
|
||||
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
|
||||
|
||||
Dim Consola As String = If(UrlParametros("CVEMOVIMIENTO") IsNot Nothing, UrlParametros("CVEMOVIMIENTO").ToString.Trim, "")
|
||||
|
||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
|
||||
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio)
|
||||
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio, Consola:=Consola)
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -2420,7 +2421,7 @@ Partial Class PopUpVerFactura
|
||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||
|
||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False,
|
||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1, Optional Consola As String = "")
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
@@ -2656,7 +2657,7 @@ Partial Class PopUpVerFactura
|
||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
|
||||
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
|
||||
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo,
|
||||
Ruta:=Ruta, Supervisor:=Supervisor)
|
||||
Ruta:=Ruta, Supervisor:=Supervisor, Consola:=Consola)
|
||||
|
||||
End Sub
|
||||
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
||||
@@ -2675,7 +2676,7 @@ Partial Class PopUpVerFactura
|
||||
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
|
||||
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "",
|
||||
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing)
|
||||
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Consola As String = "-1")
|
||||
|
||||
|
||||
Select Case CveConcepto
|
||||
@@ -3347,6 +3348,8 @@ Partial Class PopUpVerFactura
|
||||
RutaFormato = "{0}Formatos\TrasladoUsado.rdlc"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString
|
||||
'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString
|
||||
params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString
|
||||
@@ -3377,6 +3380,19 @@ Partial Class PopUpVerFactura
|
||||
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
|
||||
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
|
||||
|
||||
If CveCliente = 819998 Then
|
||||
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
||||
|
||||
If Consola <> "-1" And Consola.Trim.Length > 0 Then
|
||||
RutaFormato = "{0}Formatos\Consola.rdlc"
|
||||
params.Add(New ReportParameter("Consola", Consola))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
|
||||
|
||||
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
|
||||
@@ -3409,9 +3425,6 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
|
||||
If CveCliente = 819998 Then
|
||||
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveContrato > 0 Then
|
||||
|
||||
@@ -152,6 +152,10 @@ Partial Class RegPoliza
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 OrElse UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Response.Redirect("/Contabilidad2/RegPrePolizaS.aspx")
|
||||
End If
|
||||
|
||||
ViewState("Orden0") = ""
|
||||
ViewState("Orden1") = ""
|
||||
CvePrePoliza = -1
|
||||
@@ -1612,7 +1616,7 @@ Partial Class RegPoliza
|
||||
Private Sub SiguienteFolio()
|
||||
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim NumPoliza = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd"))
|
||||
Dim NumPoliza As Integer = ObjConta.GetNumeroPoliza(DdlTipoPoliza.SelectedValue.ToEntero, TxtFechaPoliza.Text.ToDate.ToString("yyyy-MM-dd"))
|
||||
|
||||
If NumPoliza > 0 Then
|
||||
TxtNumeroPoliza.Text = NumPoliza.ToString
|
||||
@@ -1709,7 +1713,7 @@ Partial Class RegPoliza
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
Dim dt As New DataTable
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim n As Integer = 0
|
||||
Try
|
||||
Select Case Tipo
|
||||
@@ -1771,7 +1775,7 @@ Partial Class RegPoliza
|
||||
|
||||
Dim Referencia As String = Row("Referencia").ToString
|
||||
Dim Cuenta As String = Row("Código Cuenta").ToString + " - " + Row("Nombre Cuenta").ToString
|
||||
Dim Cuenta2 = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una
|
||||
Dim Cuenta2 As String = AgregaComilla(Cuenta) 'Agregar otra comilla simple adicional cuando contenga una
|
||||
|
||||
Dim CveCuenta As String = ""
|
||||
If DTCuentas.FiltroPrimero("CtaCodigo = '" & Cuenta2 & "'") IsNot Nothing Then
|
||||
@@ -1779,7 +1783,7 @@ Partial Class RegPoliza
|
||||
End If
|
||||
|
||||
Dim SegNeg As String = Row("SegNeg").ToString
|
||||
Dim SegNeg2 = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una
|
||||
Dim SegNeg2 As String = AgregaComilla(SegNeg) 'Agregar otra comilla simple adicional cuando contenga una
|
||||
|
||||
Dim IdSegNeg As String = ""
|
||||
If DTSegmentosNegocio.FiltroPrimero("Nombre = '" & SegNeg2 & "'") IsNot Nothing Then
|
||||
@@ -1842,9 +1846,9 @@ Partial Class RegPoliza
|
||||
|
||||
Private Function AgregaComilla(str As String) As String
|
||||
If str.Contains("'") Then
|
||||
Dim arr = Split(str, "'")
|
||||
Dim arr As String() = Split(str, "'")
|
||||
str = ""
|
||||
For i = 0 To arr.Length() - 1
|
||||
For i As Integer = 0 To arr.Length() - 1
|
||||
If i = arr.Length - 1 Then
|
||||
str += arr(i)
|
||||
Else
|
||||
|
||||
245
Contratos/CatContratosEstatus.aspx
Normal file
245
Contratos/CatContratosEstatus.aspx
Normal file
@@ -0,0 +1,245 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatContratosEstatus.aspx.vb" Inherits=" Contratos_CatContratosEstatus" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.columnaUsuarios {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.sinlink td a {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
color: black;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.white a {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.btn-verde {
|
||||
color: #32c5d2;
|
||||
background-color: #fff;
|
||||
border-color: #32c5d2;
|
||||
}
|
||||
|
||||
.btn-verde .fa-plus {
|
||||
color: #32c5d2 !important;
|
||||
}
|
||||
|
||||
.btn-verde:hover {
|
||||
color: #fff;
|
||||
background-color: #32c5d2;
|
||||
border-color: #32c5d2;
|
||||
}
|
||||
|
||||
.btn-verde:hover .fa-plus {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Estado de Orden de Servicio
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnAgregarEstatus" runat="server" data-toggle="tooltip" data-placement="left" title="Agregar Estado de Orden de Servicio" Text="<i class='fa fa-plus'></i> Agregar Estatus"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<div class="row" style="margin-right: 10px; " align="right">
|
||||
<input type="text" id="TxtBusquedaEstatus" 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>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveEstatus" Value="-1" />
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveContratoEstatus,ContratoEstatus,TipoEstatusTexto, Estatus, TipoEstatus, BackgroundColor" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Estatus">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="ContratoEstatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estado" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoEstatusTexto" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="Edit_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<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" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<%--POPUP AGREGAR--%>
|
||||
<div id="divAddEstatus" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddEstatus" class="modal-content" 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">Estatus</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyEstatus" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEstatusOS" runat="server" CssClass="form-control" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusOS" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEstatusOS" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Impuesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEstatusOS.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoEstatus" runat="server" CssClass="form-control select2me js-Impuesto-programmatic" Width="100%">
|
||||
<asp:ListItem Value="1" Text="Inicial"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Asignación"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Proceso"></asp:ListItem>
|
||||
<asp:ListItem Value="4" Text="Terminada"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Cancelada"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoEstatus.ClientID.ToString()%>">Tipo Estatus:</label>
|
||||
</div>
|
||||
<br />
|
||||
<div runat="server" id="divChkEstatus" class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtBackgroundColor" runat="server" CssClass="form-control" CausesValidation="true" ClientIDMode="Static" MaxLength="6" Width="100px"></asp:TextBox>
|
||||
<label for="<%= TxtBackgroundColor.ClientID.ToString()%>">Color:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnAgregarEstatusCon" runat="server" class="btn btn-success" Text="Agregar" />
|
||||
<%--<asp:LinkButton ID="BtnAgregarEstatusOS" 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:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
<link type="text/css" href="../Scripts/jquery.simple-color-picker.css" rel="stylesheet" />
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../Scripts/jquery.simple-color-picker.js"></script>
|
||||
|
||||
|
||||
|
||||
bootstrap-colorpicker.min.css
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAddImpuestoLocal').modal();
|
||||
}
|
||||
|
||||
function OrdenarGV() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 270;
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
function SetObjects(Clasificacion) {
|
||||
debugger;
|
||||
//document.getElementById(TxtEstatusOS).value = Clasificacion;
|
||||
}
|
||||
|
||||
function SetValue(Hidden, Value) {
|
||||
document.getElementById(Hidden).value = Value;
|
||||
}
|
||||
|
||||
function LimpiaModal() {
|
||||
$('#<%= TxtEstatusOS.ClientID %>').val('');
|
||||
$('#<%= ChkEstatus.ClientID %>').prop("checked", false);
|
||||
|
||||
var $example = $(".js-Impuesto-programmatic").select2();
|
||||
$example.val('1').trigger("change");
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
145
Contratos/CatContratosEstatus.aspx.vb
Normal file
145
Contratos/CatContratosEstatus.aspx.vb
Normal file
@@ -0,0 +1,145 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contratos_CatContratosEstatus
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
|
||||
Private Property CveContratoEstatus As Integer
|
||||
Get
|
||||
Return ViewState("CveContratoEstatus").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContratoEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Modalidad As String
|
||||
Get
|
||||
Return ViewState("Modalidad").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Modalidad") = 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
|
||||
CargaDatos()
|
||||
CveContratoEstatus = -1
|
||||
End If
|
||||
RegistraScript(" $('#TxtBackgroundColor').simpleColorPicker();")
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
Using objEstatus As New ClsContratos
|
||||
If objEstatus.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = objEstatus.DtResultados
|
||||
End If
|
||||
End Using
|
||||
GvDatos.DataBind()
|
||||
OrdenaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click
|
||||
|
||||
TxtEstatusOS.Text = ""
|
||||
TxtBackgroundColor.Text = ""
|
||||
BtnAgregarEstatusCon.Text = "Agregar"
|
||||
divChkEstatus.Visible = False
|
||||
UpBodyEstatus.Update()
|
||||
UpFooter.Update()
|
||||
RegistraScript("$('#divAddEstatus').modal();LimpiaModal()")
|
||||
Modalidad = "I"
|
||||
End Sub
|
||||
Protected Sub BtnAgregarEstatusCon_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatusCon.Click
|
||||
Dim ObjEstatus As New ClsContratos
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If Modalidad = "I" Then
|
||||
If ObjEstatus.AddContratoEstatus(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, TxtBackgroundColor.Text.Replace("#", ""), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Estatus agregado")
|
||||
GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing
|
||||
End If
|
||||
Else
|
||||
If CveContratoEstatus <> -1 Then
|
||||
If Not ObjEstatus.UpdateContratoEstatus(CveContratoEstatus, TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, ChkEstatus.Checked, TxtBackgroundColor.Text.Replace("#", ""), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
If Not TieneError Then
|
||||
GvDatos.EditIndex = -1
|
||||
Alert("Estatus actualizado")
|
||||
GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing
|
||||
Else
|
||||
Alert("Ocurrio un error al actualizar los datos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
ObjEstatus.Dispose()
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddEstatus"))
|
||||
UpDatos.Update()
|
||||
|
||||
'Response.Redirect(HttpContext.Current.Request.Url.ToString(), True)
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
DdlTipoEstatus.SelectedValueExist(GvRow.DataKey("TipoEstatus"))
|
||||
TxtEstatusOS.Text = GvRow.DataKey("ContratoEstatus")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString = "True", True, False)
|
||||
CveContratoEstatus = GvRow.DataKey("CveContratoEstatus").ToEntero
|
||||
TxtBackgroundColor.Text = "#" & GvRow.DataKey("BackgroundColor")
|
||||
BtnAgregarEstatusCon.Text = "Actualizar"
|
||||
divChkEstatus.Visible = True
|
||||
UpBodyEstatus.Update()
|
||||
UpAddEstatus.Update()
|
||||
Modalidad = "A"
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "divAddEstatus"))
|
||||
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
|
||||
' Dim URL As String = String.Format("javascript:LimpiaModal();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}');ShowDivRegistro();return false;", e.Row.DBCampo("CveContratoEstatus").ToEntero, e.Row.DBCampo("ContratoEstatus"))
|
||||
' 'GeneroLigas
|
||||
' Dim Liga As String = String.Format("<a class=""LinkBlanco"" href=""{0}"">", URL)
|
||||
' e.Row.VerticalAlign = VerticalAlign.Middle
|
||||
' e.Row.FCLinkButton("ImgE").OnClientClick = URL
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
Dim ObjEstatus As New ClsContratos
|
||||
Dim CveContratoEstatus As Integer = GvDatos.Rows(e.RowIndex).DataKey("CveContratoEstatus").ToEntero
|
||||
|
||||
If ObjEstatus.RemoveContratoEstatus(CveContratoEstatus, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.EditIndex = -1
|
||||
GlobalDTContratosEstatus(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("El Estatus de contrato se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjEstatus.Dispose()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub OrdenaDatos()
|
||||
If (GvDatos.Rows.Count > 0) Then
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
3073
Empresas/186/Formatos/Consola.rdlc
Normal file
3073
Empresas/186/Formatos/Consola.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,10 @@
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PS">
|
||||
<DataField>PS</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<DataField>Codigo</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="PS">
|
||||
<DataField>PS</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -754,7 +758,7 @@
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Fields!Codigo.Value</Value>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
@@ -776,6 +780,7 @@
|
||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
|
||||
@@ -62,6 +62,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplImprimirConsola" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Consola</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
|
||||
</li>
|
||||
@@ -673,7 +676,7 @@
|
||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
<EditItemTemplate>
|
||||
|
||||
@@ -507,10 +507,55 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'ImgFecha.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
ValidaUsaConsola()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Property Consola As String
|
||||
Get
|
||||
If ViewState("Consola") Is Nothing Then
|
||||
ViewState("Consola") = ""
|
||||
End If
|
||||
Return ViewState("Consola").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Consola") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Function ValidaUsaConsola() As Boolean
|
||||
Consola = ""
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
For Each gvRow As GridViewRow In GvM.Rows
|
||||
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
|
||||
Consola = "ARS600"
|
||||
Respuesta = True
|
||||
HplImprimirConsola.Visible = True
|
||||
Exit For
|
||||
End If
|
||||
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
|
||||
Consola = "ARS800"
|
||||
Respuesta = True
|
||||
HplImprimirConsola.Visible = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Respuesta Then
|
||||
HplImprimirConsola.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
Private Function PermiteGuardar() As Boolean
|
||||
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
||||
@@ -909,9 +954,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
HplImprimirResumen.Visible = True
|
||||
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
|
||||
|
||||
|
||||
CveCompra = Mov.CveCompra
|
||||
CveConcepto = Mov.CveConcepto
|
||||
|
||||
|
||||
|
||||
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
||||
HplDescargaXml.Visible = True
|
||||
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"))))
|
||||
@@ -1195,7 +1243,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlAlmacen.Items.Clear()
|
||||
DdlAlmacen.DataBind()
|
||||
Dim dttA As DataTable = Nothing
|
||||
dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,22,27)")
|
||||
dttA = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (4)") '("CveTipoAlmacen IN (1,22,27)")
|
||||
|
||||
DdlAlmacen.DataSource = dttA
|
||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Explicit On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Web.Management
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -1847,10 +1848,13 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Private Sub GuardaVenta()
|
||||
|
||||
|
||||
'' INICIA: VALIDACIONES
|
||||
|
||||
'Valida el estatus de la Venta, si es = 5 O DevolucionVenta = 2, NO SE SURTE!
|
||||
ValidaUsaConsola()
|
||||
|
||||
|
||||
|
||||
'' INICIA: VALIDACIONES
|
||||
|
||||
'Valida el estatus de la Venta, si es = 5 O DevolucionVenta = 2, NO SE SURTE!
|
||||
Dim ObjVentaInv As New ClsInventarios
|
||||
If ObjVentaInv.GetEstatusVentaPorSurtir(CveVentaSurtir) Then
|
||||
TipoEstatus = ObjVentaInv.TipoEstatus
|
||||
@@ -3112,6 +3116,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Msg.AppendFormat("Movimiento {2}: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimiento, Folio, If(TipoMovimiento = 1, "Salida", "Entrada"))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
If Consola.Trim.Length > 0 Then
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Consola</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||
End If
|
||||
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
@@ -3160,8 +3167,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'SI NO ES GARANTIA MANDA A RECIBIR AL USADO
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto.Contiene("Rem", "Ped") AndAlso CveMovimientoGarantia <= 0 Then
|
||||
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
|
||||
Limpia()
|
||||
@@ -4408,6 +4417,47 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Return Cancelar
|
||||
|
||||
End Function
|
||||
|
||||
Property Consola As String
|
||||
Get
|
||||
If ViewState("Consola") Is Nothing Then
|
||||
ViewState("Consola") = ""
|
||||
End If
|
||||
Return ViewState("Consola").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Consola") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Function ValidaUsaConsola() As Boolean
|
||||
Consola = ""
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
For Each gvRow As GridViewRow In GvDatos.Rows
|
||||
|
||||
If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
|
||||
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
|
||||
Consola = "ARS600"
|
||||
Respuesta = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
|
||||
Consola = "ARS800"
|
||||
Respuesta = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -65,13 +65,16 @@ Partial Class RepNotasSinAlmacen
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If Not IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
CargaPermisos()
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaPermisos()
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||
@@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen
|
||||
GvVentas.Columns(8).Visible = True
|
||||
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
||||
|
||||
GvVentas.Columns(4).Visible = False
|
||||
GvCompras.Columns(4).Visible = False
|
||||
|
||||
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
|
||||
'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||
'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120)
|
||||
|
||||
@@ -200,10 +200,15 @@
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataNavigateUrlFields="CveOS" />
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" />
|
||||
|
||||
<asp:BoundField DataField="Medico" HeaderText="Médico" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
<asp:BoundField DataField="Procedimiento" HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>
|
||||
|
||||
@@ -40,16 +40,13 @@ Partial Class OS_Asignaciones
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
GvNA_ConfiguraColumnas()
|
||||
CargaEstatusOS()
|
||||
'CargaUsuarios()
|
||||
CargaClientes()
|
||||
CargaSubProyecto()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
GvNA.Columns(2).HeaderText = "Hospital"
|
||||
GvNA.Columns(7).HeaderText = "Fecha Cirugía"
|
||||
GvNA.Columns(8).HeaderText = "Hora Cirugía"
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(171) Then
|
||||
CargaOrdenesServiciosAsignadasXPersona()
|
||||
@@ -75,6 +72,9 @@ Partial Class OS_Asignaciones
|
||||
End If
|
||||
ObjEstatusPermisos.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript("
|
||||
@@ -90,6 +90,26 @@ Partial Class OS_Asignaciones
|
||||
")
|
||||
End Sub
|
||||
|
||||
Private Sub GvNA_ConfiguraColumnas()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
GvNA.Columns(3).Visible = False
|
||||
GvNA.Columns(4).Visible = False
|
||||
GvNA.Columns(5).Visible = False
|
||||
GvNA.Columns(6).Visible = False
|
||||
|
||||
GvNA.Columns(7).Visible = True
|
||||
GvNA.Columns(8).Visible = True
|
||||
|
||||
|
||||
GvNA.Columns(2).HeaderText = "Hospital"
|
||||
GvNA.Columns(9).HeaderText = "Fecha Cirugía"
|
||||
GvNA.Columns(10).HeaderText = "Hora Cirugía"
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A S "
|
||||
Private Sub CargaSubProyecto()
|
||||
DdlSubProyecto.Items.Clear()
|
||||
@@ -184,7 +204,7 @@ Partial Class OS_Asignaciones
|
||||
Dim TecnicosResultado As New DataTable
|
||||
|
||||
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
|
||||
TecnicosSubProyectos = ObjOS.DtResultados
|
||||
TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ")
|
||||
End If
|
||||
|
||||
If DtOSSubProyectos IsNot Nothing Then
|
||||
|
||||
@@ -1308,13 +1308,19 @@
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtFolioRemisionModal">
|
||||
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFolioRemisionModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFolioRemisionModal"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
||||
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" >
|
||||
<asp:TextBox ID="TxtObservacionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="250"></asp:TextBox>
|
||||
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -3298,11 +3298,7 @@ Partial Class OS_OrdenesServicios
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
If ProcesoOK Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
Dim Contabilizable As Boolean = False
|
||||
Dim Concepto As String = "Material utilizado"
|
||||
@@ -3328,11 +3324,16 @@ Partial Class OS_OrdenesServicios
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
If Not ObjOS.UpdateOrdenesServiciosFinaliza(CveOS, -1, -1, UsuarioActual.CveEmpresa, Observaciones:=TxtObservacionModal.Text.Trim) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkPersonalizar" OnClick="LnkPersonalizar_Click" runat="server" Visible="false"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -174,21 +178,26 @@
|
||||
<asp:BoundField HeaderText="Hospital" DataField="Nombre" />
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoVenta" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" />
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" />
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusOrdenServicio" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="Técnico" DataField="NombreUsuario" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusOrdenServicio" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Paciente" DataField="Paciente" />
|
||||
<asp:BoundField HeaderText="Técnico" DataField="NombreUsuario" />
|
||||
<%--9--%>
|
||||
<asp:BoundField HeaderText="Paciente" DataField="Paciente" />
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="Episodio" DataField="IdentificadorCliente" />
|
||||
<%--11--%>
|
||||
<asp:HyperLinkField HeaderText="Pedido" DataTextField="SerieFolioPedido" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaPedido" Target="_blank" />
|
||||
<%--12--%>
|
||||
<asp:HyperLinkField HeaderText="Remisión" DataTextField="SerieFolioRemision" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVentaRemision" Target="_blank" />
|
||||
<%--13--%>
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" visible="false" />
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
@@ -196,6 +205,45 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content SucursalCobranza-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" Checked="false" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<%--<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>--%>
|
||||
<asp:Button ID="BtnPersonalizar" ClientIDMode="Static" runat="server" Text="Personalizar" class="btn btn-success" OnClick="BtnPersonalizar_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -98,10 +98,14 @@ Partial Class OS_RepOSMedicas
|
||||
Dim FechaI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.ToDate)
|
||||
Dim FechaF As Date = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.ToDate)
|
||||
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
LnkPersonalizar.Visible = False
|
||||
|
||||
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjOS.DtResultados
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
LnkPersonalizar.Visible = True
|
||||
End If
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
@@ -163,4 +167,27 @@ Partial Class OS_RepOSMedicas
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' ChkGuardarPersonalizacion.Checked = False
|
||||
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
|
||||
Personaliza()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(13).Visible = ChkObservaciones.Checked
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -33,11 +33,6 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
{
|
||||
background-color: #45b6af;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nodisponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
@@ -74,8 +69,9 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||
<ContentTemplate>
|
||||
<%-- Datos de cliente y su viaje --%>
|
||||
<div class="col-md-8">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
@@ -158,6 +154,7 @@
|
||||
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
@@ -174,6 +171,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -181,8 +179,8 @@
|
||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
@@ -196,10 +194,8 @@
|
||||
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
|
||||
<br />
|
||||
@@ -209,14 +205,10 @@
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%-- Asientos --%>
|
||||
<div class="col-md-4">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<table>
|
||||
@@ -468,10 +460,8 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -119,11 +119,11 @@ Partial Class Boletos
|
||||
ViewState("Importe") = ImporteR
|
||||
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||
BtnGuardar.Visible = True
|
||||
upPanel.Visible = True
|
||||
UpPanel.Visible = True
|
||||
Else
|
||||
TxtCosto.Text = ""
|
||||
BtnGuardar.Visible = False
|
||||
upPanel.Visible = False
|
||||
UpPanel.Visible = False
|
||||
ViewState("Importe") = 0
|
||||
End If
|
||||
End If
|
||||
@@ -156,9 +156,7 @@ Partial Class Boletos
|
||||
|
||||
Try
|
||||
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If retorno > 1 Then
|
||||
If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then
|
||||
Alert("Boleto generado correctamente")
|
||||
ObjTransporte.Commit()
|
||||
DdlPartida.SelectedValue = ""
|
||||
@@ -168,13 +166,14 @@ Partial Class Boletos
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
AsientoSeleccionado = ""
|
||||
upPanel.Update()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjTransporte.RollBack()
|
||||
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
|
||||
Finally
|
||||
ObjTransporte.Dispose()
|
||||
CargaDatos()
|
||||
UpPanel.Update()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
404
Transportes/CatRutas.aspx
Normal file
404
Transportes/CatRutas.aspx
Normal file
@@ -0,0 +1,404 @@
|
||||
<%@ Page Language="VB" Title="Transportes V&A - Rutas" AutoEventWireup="false"
|
||||
MasterPageFile="~/Site.master" CodeFile="CatRutas.aspx.vb"
|
||||
Inherits="CatRutas" EnableEventValidation="true" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Rutas y Destinos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.spaced {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpPanel" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlGeneral" runat="server">
|
||||
<%--Calendario Tab--%>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<%--Rutas Tab--%>
|
||||
<ajax:TabPanel ID="TabRutas" runat="server" HeaderText="Rutas">
|
||||
<ContentTemplate>
|
||||
<div class="spaced">
|
||||
<div>
|
||||
<asp:LinkButton ID="BtnAgregarRuta" runat="server" AlternateText="Agregar"
|
||||
CssClass="btn bsuccesscle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
||||
ToolTip="Agregar" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRutas.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRutas.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<asp:GridView ID="GvRutas" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveRuta, Ruta, Estatus, CveUsuario, FechaIng, CveEmpresa">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="No. Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("CveRuta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditarRuta" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminarRuta" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveRuta" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%--Destinos Tab--%>
|
||||
<ajax:TabPanel ID="TabDestinos" runat="server" HeaderText="Destinos">
|
||||
<ContentTemplate>
|
||||
<div class="spaced">
|
||||
<div>
|
||||
<asp:LinkButton ID="BtnAgregarDestino" runat="server" AlternateText="Agregar"
|
||||
CssClass="btn btn-success btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
||||
ToolTip="Agregar" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDestinos.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDestinos.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDestinos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveDestino, Destino, EsNacional, Estatus, CveUsuario, FechaIng, CveEmpresa">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="No. Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveDestino" runat="server" Text='<%# Eval("CveDestino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Nacional">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEsNacional" runat="server" Text='<%# If(Eval("EsNacional").ToString = "True", "Sí", "No") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditarDestino" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminarDestino" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveDestino" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%--Importes Tab--%>
|
||||
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Importes">
|
||||
<ContentTemplate>
|
||||
<div class="spaced">
|
||||
<div>
|
||||
<asp:LinkButton ID="BtnAgregarImporte" runat="server" AlternateText="Agregar"
|
||||
CssClass="btn btn-success btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
||||
ToolTip="Agregar" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvImportes.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvImportes.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvImportes" runat="server" AutoGenerateColumns="false" EmptyDataText="No
|
||||
se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveDestinoTarifa, CveRuta, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Salida">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="No. Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveDestinoTarifa" runat="server" Text='<%# Eval("CveDestinoTarifa")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("Ruta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Salida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Salida")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditarImporte" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminarImporte" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveImporte" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="Modal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<asp:Label runat="server" ID="ModalLabel"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<%-- Ruta --%>
|
||||
<asp:Panel runat="server" ID="PnRuta" Visible="False">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Nombre de la ruta</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtRuta" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRuta" runat="server" ControlToValidate="TxtRuta"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ruta''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERuta" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVRuta" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlRutaEstatus" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="99.9%">
|
||||
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="False"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRutaEstatus" runat="server" ControlToValidate="DdlRutaEstatus"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERutaEstatus" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVRutaEstatus" Width="400px" BehaviorID="_content_VCERutaEstatus">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<%-- Destino --%>
|
||||
<asp:Panel ID="PnDestino" runat="server" Visible="false">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Nombre del Destino</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDestino" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="TxtDestino"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Destino''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDestino" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDestino" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Nacional:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEsNacional" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="99.9%">
|
||||
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Sí" Value="True"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="False"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEsNacional" runat="server" ControlToValidate="DdlEsNacional"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nacional''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEsNacional" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVEsNacional" Width="400px" BehaviorID="_content_VCEEsNacional">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlDestinoEstatus" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="99.9%">
|
||||
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="False"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDestinoEstatus" runat="server" ControlToValidate="DdlDestinoEstatus"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDestinoEstatus" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDestinoEstatus" Width="400px" BehaviorID="_content_VCEDestinoEstatus">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
<%-- Importes --%>
|
||||
<asp:Panel ID="PnImporte" runat="server" Visible="false">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Ruta:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ruta''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERutas" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVRutas" Width="400px" BehaviorID="_content_VCERutas">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Partida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlOrigen" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="99.9%" DataTextField="Destino"
|
||||
DataValueField="CveDestino">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVOrigen" runat="server" ControlToValidate="DdlOrigen"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEOrigen" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVOrigen" Width="400px" BehaviorID="_content_VCEOrigen">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Destino:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlFinal" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="99.9%" DataTextField="Destino"
|
||||
DataValueField="CveDestino">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVFinal" runat="server" ControlToValidate="DdlFinal"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Origen''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFinal" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVFinal" Width="400px" BehaviorID="_content_VCEFinal">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Importe</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox type="number" ID="TxtImporte" runat="server" MaxLength="7" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="VCOImporte"
|
||||
TargetControlID="RFVDestino" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAddRuta" OnClick="AddRuta" runat="server" CssClass="btn btn-primary"
|
||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||
<asp:Button ID="BtnAddDestino" OnClick="AddDestino" runat="server" CssClass="btn btn-primary"
|
||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||
<asp:Button ID="BtnAddImporte" OnClick="AddImporte" runat="server" CssClass="btn btn-primary"
|
||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
291
Transportes/CatRutas.aspx.vb
Normal file
291
Transportes/CatRutas.aspx.vb
Normal file
@@ -0,0 +1,291 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class CatRutas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property Cve As Integer
|
||||
Get
|
||||
Return ViewState("Cve").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Cve") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
ViewState("Cve") = 0
|
||||
InicializarCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Lista Rutas'
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
GvRutas.DataSource = ObjRutas.DtResultados
|
||||
GvRutas.DataBind()
|
||||
End If
|
||||
End If
|
||||
'Lista Destinos'
|
||||
If ObjRutas.GetDestinos() Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
GvDestinos.DataSource = ObjRutas.DtResultados
|
||||
GvDestinos.DataBind()
|
||||
End If
|
||||
End If
|
||||
'Lista Importes'
|
||||
If ObjRutas.GetDestinosTarifas(-1, -1) Then
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
GvImportes.DataSource = ObjRutas.DtResultados
|
||||
GvImportes.DataBind()
|
||||
End If
|
||||
End If
|
||||
|
||||
UpPanel.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub InicializarCombos()
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
|
||||
If ObjDestinos.GetDestinos() Then
|
||||
|
||||
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlOrigen.DataSource = ObjDestinos.DtResultados
|
||||
DdlOrigen.DataBind()
|
||||
DdlOrigen.Items.Insert(0, New ListItem("Seleccione Partida", ""))
|
||||
|
||||
DdlFinal.DataSource = ObjDestinos.DtResultados
|
||||
DdlFinal.DataBind()
|
||||
DdlFinal.Items.Insert(0, New ListItem("Seleccione Destino", ""))
|
||||
End If
|
||||
End If
|
||||
ObjDestinos.Dispose()
|
||||
|
||||
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
DdlRutas.DataBind()
|
||||
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub MostrarModal(sender As Object, e As EventArgs)
|
||||
TxtRuta.Text = ""
|
||||
DdlRutaEstatus.SelectedValue = ""
|
||||
TxtDestino.Text = ""
|
||||
DdlEsNacional.SelectedValue = ""
|
||||
DdlDestinoEstatus.SelectedValue = ""
|
||||
DdlOrigen.SelectedValue = ""
|
||||
DdlFinal.SelectedValue = ""
|
||||
TxtImporte.Text = ""
|
||||
BtnAddRuta.Visible = False
|
||||
BtnAddDestino.Visible = False
|
||||
BtnAddImporte.Visible = False
|
||||
PnRuta.Visible = False
|
||||
PnDestino.Visible = False
|
||||
PnImporte.Visible = False
|
||||
Dim id As String = DirectCast(sender, LinkButton).ID
|
||||
|
||||
If id.Contains("Editar") Then
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Select Case id
|
||||
Case "BtnEditarRuta"
|
||||
ModalLabel.Text = "Editar Ruta"
|
||||
PnRuta.Visible = True
|
||||
TxtRuta.Text = GvRow.DataKey("Ruta")
|
||||
DdlRutaEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||
BtnAddRuta.Visible = True
|
||||
BtnAddRuta.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveRuta").ToEntero
|
||||
|
||||
|
||||
Case "BtnEditarDestino"
|
||||
ModalLabel.Text = "Editar Destino"
|
||||
TxtDestino.Text = GvRow.DataKey("Destino")
|
||||
DdlEsNacional.SelectedValue = GvRow.DataKey("EsNacional")
|
||||
DdlDestinoEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||
PnDestino.Visible = True
|
||||
BtnAddDestino.Visible = True
|
||||
BtnAddDestino.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero
|
||||
|
||||
|
||||
Case "BtnEditarImporte"
|
||||
ModalLabel.Text = "Editar Importe"
|
||||
DdlRutas.SelectedValue = GvRow.DataKey("CveRuta")
|
||||
DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen")
|
||||
DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal")
|
||||
TxtImporte.Text = GvRow.DataKey("Importe")
|
||||
PnImporte.Visible = True
|
||||
BtnAddImporte.Visible = True
|
||||
BtnAddImporte.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero
|
||||
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
If id.Contains("Agregar") Then
|
||||
Select Case id
|
||||
Case "BtnAgregarRuta"
|
||||
ModalLabel.Text = "Agregar Ruta"
|
||||
PnRuta.Visible = True
|
||||
BtnAddRuta.Visible = True
|
||||
BtnAddRuta.Text = "Guardar"
|
||||
Case "BtnAgregarDestino"
|
||||
ModalLabel.Text = "Agregar Destino"
|
||||
PnDestino.Visible = True
|
||||
BtnAddDestino.Visible = True
|
||||
BtnAddDestino.Text = "Guardar"
|
||||
Case "BtnAgregarImporte"
|
||||
ModalLabel.Text = "Agregar Importe"
|
||||
PnImporte.Visible = True
|
||||
BtnAddImporte.Visible = True
|
||||
BtnAddImporte.Text = "Guardar"
|
||||
|
||||
End Select
|
||||
End If
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "Modal"))
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Rutas"
|
||||
Protected Sub AddRuta(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjRuta As New ClsTransportes
|
||||
ObjRuta.IniciaTransacSQL()
|
||||
Try
|
||||
If BtnAddRuta.Text = "Guardar" Then
|
||||
If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||
ObjRuta.Commit()
|
||||
Alert("Ruta Agregada Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If BtnAddRuta.Text = "Editar" Then
|
||||
If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ObjRuta.Commit()
|
||||
Alert("Ruta Actualizada Correctamente.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjRuta.RollBack()
|
||||
Finally
|
||||
CargaDatos()
|
||||
ObjRuta.Dispose()
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub RemoveRuta(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjRuta As New ClsTransportes
|
||||
|
||||
If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
||||
Alert("Ruta eliminada correctamente")
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
ObjRuta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Destinos"
|
||||
Protected Sub AddDestino(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjDestino As New ClsTransportes
|
||||
ObjDestino.IniciaTransacSQL()
|
||||
Try
|
||||
If BtnAddDestino.Text = "Guardar" Then
|
||||
If ObjDestino.AddDestino(TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||
ObjDestino.Commit()
|
||||
Alert("Destino agregado correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If BtnAddDestino.Text = "Editar" Then
|
||||
If ObjDestino.UpdateDestino(Cve, TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ObjDestino.Commit()
|
||||
Alert("Destino actualizado correctamente.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjDestino.RollBack()
|
||||
Finally
|
||||
CargaDatos()
|
||||
ObjDestino.Dispose()
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub RemoveDestino(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjDestino As New ClsTransportes
|
||||
|
||||
If ObjDestino.RemoveDestino(GvRow.DataKey("CveDestino").ToEntero) Then
|
||||
Alert("Destino eliminado correctamente")
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
ObjDestino.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Importes"
|
||||
Protected Sub AddImporte(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjImporte As New ClsTransportes
|
||||
ObjImporte.IniciaTransacSQL()
|
||||
Try
|
||||
If BtnAddImporte.Text = "Guardar" Then
|
||||
If ObjImporte.AddDestinosTarifas(DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) > 1 Then
|
||||
ObjImporte.Commit()
|
||||
Alert("Importe agregado correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If BtnAddImporte.Text = "Editar" Then
|
||||
If ObjImporte.UpdateDestinosTarifas(Cve, DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) Then
|
||||
ObjImporte.Commit()
|
||||
Alert("Importe actualizado correctamente.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjImporte.RollBack()
|
||||
Finally
|
||||
CargaDatos()
|
||||
ObjImporte.Dispose()
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub RemoveImporte(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjImporte As New ClsTransportes
|
||||
|
||||
If ObjImporte.RemoveDestinosTarifas(GvRow.DataKey("CveDestinoTarifa").ToEntero) Then
|
||||
Alert("Importe eliminada correctamente")
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
ObjImporte.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -3,7 +3,7 @@
|
||||
Inherits="ListadoBoletos" EnableEventValidation="true" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Listado de Boletos
|
||||
Listado de Boletos - <asp:Label ID="LblViaje" runat="server" Text=""></asp:Label>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
@@ -19,96 +19,90 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvBoletos.ClientID) %>"
|
||||
class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label ID="Prueba" runat="server" Text=""></asp:Label>
|
||||
<asp:UpdatePanel ID="UPPD" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:n}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<asp:GridView ID="GvBoletos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningún boleto registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViajePasajero,Asiento,Nombre, Visa,Celular,Sexo,Estatus,Partida,Destino, Importe,FechaIng, Agencia, TelefonoAgencia">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Asiento">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsiento" runat="server" Text='<%# Eval("Asiento") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Nombre">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Visa">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVisa" runat="server" Text='<%# Eval("Visa") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Celular">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCelular" runat="server" Text='<%# Eval("Celular") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sexo">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSexo" runat="server" Text='<%# If(Eval("Sexo").ToString = "True", "Masculino", "Femenino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Cancelado") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:n}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ToolTip="Editar" />
|
||||
<asp:LinkButton ID="BtnCancelar" runat="server" AlternateText="Activar"
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-cancel'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("Estatus").ToString = "True", "Cancelar Boleto", "Reactivar") %>'
|
||||
data-btn-ok-label="si" OnClick="BtnCancelar_Click" />
|
||||
<asp:LinkButton ID="BtnImprimir" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||
OnClick="ImprimirBoleto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -6,7 +6,6 @@ Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
|
||||
Partial Class ListadoBoletos
|
||||
Inherits ClsPaginas
|
||||
Private Property CveViaje As Integer
|
||||
@@ -32,8 +31,7 @@ Partial Class ListadoBoletos
|
||||
End If
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
Ruta = IfNull(Request("Ruta"), "").ToString
|
||||
|
||||
Prueba.Text = Ruta
|
||||
LblViaje.Text = Ruta
|
||||
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
CodeFile="RepContratos.aspx.vb"
|
||||
Inherits="ListadoContratos" %>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Listado de Contratos
|
||||
</asp:Content>
|
||||
|
||||
@@ -30,76 +30,189 @@
|
||||
.boton {
|
||||
background: red;
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-bottom:1rem;
|
||||
}
|
||||
|
||||
.consulta_campo {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.consulta_campo label {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||
</Triggers>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer ">
|
||||
<Columns>
|
||||
<div class="consulta_campo">
|
||||
<label>Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusConsulta" runat="server" ControlToValidate="DdlEstatusConsulta"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEstatusConsulta" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVEstatusConsulta" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Contrato">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" 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>
|
||||
</div>
|
||||
<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="GrpConsulta"></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="GrpConsulta"></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 class="consulta_campo">
|
||||
<label>Fecha Final:</label>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" 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>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF"
|
||||
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
|
||||
</ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="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="GrpConsulta"></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="GrpConsulta"></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>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary" OnClick="Consultar"
|
||||
ValidationGroup="GrpConsulta" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, EstatusContrato, CveAF">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripcion">
|
||||
<asp:TemplateField HeaderText="Viaje">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lugar Salida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
@@ -110,207 +223,212 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("EstatusContrato").ToString = "1", "Vigente", If(Eval("EstatusContrato").ToString = "2", "Terminado", "Cancelado")) %>'
|
||||
CssClass='<%# If(Eval("EstatusContrato").ToString = "1", "text-success", If(Eval("EstatusContrato").ToString = "2", "text-info", "text-danger")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
||||
data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
|
||||
<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 Contrato</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row my-1">
|
||||
<div class="col-md-4">
|
||||
<label>Cliente</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></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''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="LbEstatus" runat="server" class="col-md-4" Visible="false">Estatus:</asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Visible="false" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Guardar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
|
||||
<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 Contrato</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row" >
|
||||
<div class="col-md-4">
|
||||
<label>Cliente</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></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''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" visible="false">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlAF" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
DataValueField="CveAF" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Guardar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
@@ -22,25 +23,15 @@ Partial Class ListadoContratos
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Activos Fijos'
|
||||
'Dim ObjAF As New ClsAF()
|
||||
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
' If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
' DdlAF.DataSource = ObjAF.DtResultados
|
||||
' DdlAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
' End If
|
||||
'End If
|
||||
'ObjAF.Dispose()
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
@@ -48,25 +39,35 @@ Partial Class ListadoContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional Cliente As String = "", Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
||||
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
||||
|
||||
'DdlClientes.SelectedText = Cliente
|
||||
TxtDescripcion.Text = Descripcion
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
TxtFechaSalida.Text = FechaSalida
|
||||
TxtFechaRegreso.Text = FechaRegreso
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
DdlAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = Cliente
|
||||
DdlTipoAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlChofer.SelectedValue = Chofer
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtDolares.Text = Dolares
|
||||
TxtPesos.Text = Pesos
|
||||
TxtAnticipo.Text = Anticipo
|
||||
BtnGuardar.Text = Boton
|
||||
Dim EstatusContrato As String
|
||||
If EstatusContrato <> "" Then
|
||||
LbEstatus.Visible = True
|
||||
DdlEstatusContrato.Visible = True
|
||||
DdlEstatusContrato.SelectedValue = EstatusContrato
|
||||
End If
|
||||
'DdlEstatusContrato.Text = EstatusContrato
|
||||
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
@@ -83,62 +84,52 @@ Partial Class ListadoContratos
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
|
||||
Dim CveEstatusInicial As Integer = 10
|
||||
Dim CveContratoHijo As Integer = -1
|
||||
Dim CveContratoTipo As Integer = 2
|
||||
Dim retorno As Boolean = False
|
||||
Dim CveEstatusInicial As Integer = 10
|
||||
Dim CveContratoHijo As Integer = -1
|
||||
Dim CveContratoTipo As Integer = 2
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
|
||||
End If
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
|
||||
If CveContratoHijo > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
CveEstatusInicial = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
CveContratoHijo = ObjContratos.AddContratos("", TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=CveEstatusInicial, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
|
||||
If CveContratoHijo > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero)
|
||||
|
||||
If retorno Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
TxtFechaRegreso.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTransporte.SelectedValue = ""
|
||||
DdlChofer.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
TxtFechaRegreso.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
DdlChofer.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
|
||||
MostrarModal(
|
||||
Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"))
|
||||
Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), CveCliente:=GvRow.DataKey("CveCliente").ToEntero, Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"))
|
||||
End Sub
|
||||
Protected Sub RemoveContrato(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
@@ -155,4 +146,34 @@ Partial Class ListadoContratos
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientesConsulta.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||
|
||||
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
GvContratos.DataBind()
|
||||
End Using
|
||||
End Using
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -10,92 +10,248 @@
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.consulta_campo {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.consulta_campo label {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.miGrid {
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.miGrid thead {
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
Calendario de contratos
|
||||
Calendario de Viajes
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:Panel ID="PnlGeneral" runat="server">
|
||||
<%--Calendario Tab--%>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
<%--Calendario Tab--%>
|
||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||
|
||||
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="portlet light calendar ">
|
||||
<div class="tipo_vista">
|
||||
<div>
|
||||
<h4 class="bold ribbon-color-success">Tipo de Vista</h4>
|
||||
</div>
|
||||
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True">
|
||||
<asp:ListItem Text="Duración" Value="duracion" Selected="True" />
|
||||
<asp:ListItem Text="Fecha de Inicio" Value="fecha" />
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<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" style="height: 32px;">
|
||||
<label class="col-md-1">Tipo Vista: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="Duración" Value="duracion" Selected="True" />
|
||||
<asp:ListItem Text="Fecha de Salida" Value="fecha" />
|
||||
</asp:RadioButtonList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="portlet light calendar ">
|
||||
<div class="tipo_vista">
|
||||
<div>
|
||||
<h4 class="bold ribbon-color-success"> </h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div id="calendar">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%--Contratos Tab--%>
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
|
||||
<Columns>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%--Contratos Tab--%>
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<asp:TemplateField HeaderText="No. Contrato">
|
||||
<div class="consulta_campo">
|
||||
<label>Estatus:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVEstatusConsulta" runat="server" ControlToValidate="DdlEstatusConsulta"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEEstatusConsulta" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVEstatusConsulta" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" 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>
|
||||
</div>
|
||||
<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="GrpConsulta"></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="GrpConsulta"></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 class="consulta_campo">
|
||||
<label>Fecha Final:</label>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" 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>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF"
|
||||
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
|
||||
</ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="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="GrpConsulta"></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="GrpConsulta"></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>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar"
|
||||
ValidationGroup="GrpConsulta" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
||||
GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, EstatusContrato, CveAF">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Descripcion">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy HH:mm}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Viaje">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ubicación">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Chofer">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAF" runat="server" Text='<%# Eval("AF") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
@@ -106,181 +262,227 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("EstatusContrato").ToString = "1", "Vigente", If(Eval("EstatusContrato").ToString = "2", "Terminado", "Cancelado")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" CssClass="miGrid"
|
||||
OnClick="UpdateModal" Text="Editar" />
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
<div id="ModalActualizar" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-dialog">
|
||||
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
|
||||
runat="server">
|
||||
<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">Actualizar Contrato</h4>
|
||||
<div class="modal-dialog rowpadding">
|
||||
<div class="modal-content">
|
||||
|
||||
<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">Editar Contrato</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row my-1">
|
||||
<div class="col-md-4">
|
||||
<label>Cliente</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></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''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>Cliente</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Servicio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></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''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVDescripcion" Width="100%" BehaviorID="_content_VCEDescripcion">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4 bold">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVUbicacion" Width="100%" BehaviorID="_content_VCEUbicacion">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%" BehaviorID="_content_VCETxtFechaSalida">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%" BehaviorID="_content_VCETxtFechaRegreso">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrAF" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataValueField="CveActivoFijo"
|
||||
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTransporte" Width="400px" BehaviorID="_content_VCETransporte">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrChofer" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%" BehaviorID="_content_VCEObservaciones">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" runat="server" type="decimal"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnActualizar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Editar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<div class="input-group input-sm input-small date date-picker">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
type="datetime-local"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
|
||||
DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline "
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoAF" runat="server" ControlToValidate="DdlTipoAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTipoAF" Width="400px" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row margin-bottom-5" id="DivAF" runat="server">
|
||||
<label class="col-md-4 bold">
|
||||
<asp:Label runat="server" Text="Unidad:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||
DataTextField="CodigoDescripcion" Class="table-group-action-input form-control input-inline "
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAF" runat="server" ControlToValidate="DdlAF"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVAF" Width="400px" >
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVObservaciones" Width="100%">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="LbEstatus" runat="server" class="col-md-4" Visible="false">Estatus:</asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Visible="false" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
|
||||
Text="Editar"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -324,7 +526,7 @@
|
||||
$('#<%=TxtFechaSalida.ClientID.ToString%>').val(event.start._i);
|
||||
$('#<%=TxtFechaRegreso.ClientID.ToString%>').val(event.end._i);
|
||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||
$('#<%=DdlTransporte.ClientID%>').val(event.CveActivoFijo);
|
||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
||||
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data.SqlClient
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
@@ -11,6 +12,7 @@ Partial Class RepContratosCalendario
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
InicializaCalendar()
|
||||
CargaDatos()
|
||||
|
||||
@@ -28,57 +30,109 @@ Partial Class RepContratosCalendario
|
||||
|
||||
End Sub
|
||||
Private Sub InicializaCalendar()
|
||||
'Lista Activos Fijos'
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DdlTransporte.DataSource = ObjAF.DtResultados
|
||||
DdlTransporte.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
End If
|
||||
End If
|
||||
DdlTransporte.DataBind()
|
||||
ObjAF.Dispose()
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||
|
||||
RegistraScript("InitCalendar();")
|
||||
DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True
|
||||
End Sub
|
||||
|
||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
Private Sub CargaCombos()
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlTipoAF.DataBind()
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlAF.DataBind()
|
||||
DdlAF.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlTipoAF.DataBind()
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim estatusContrato As String = DataBinder.Eval(e.Row.DataItem, "EstatusContrato").ToString()
|
||||
|
||||
If DdlClientes.SelectedValue = "" Then
|
||||
Select Case estatusContrato
|
||||
Case "1"
|
||||
e.Row.BackColor = Drawing.Color.FromArgb(0, 165, 106)
|
||||
Case "2"
|
||||
e.Row.BackColor = Drawing.Color.FromArgb(43, 79, 214)
|
||||
Case "3"
|
||||
e.Row.BackColor = Drawing.Color.FromArgb(238, 96, 46)
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
If DdlClientesConsulta.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||
|
||||
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial, RH.NombreCompleto AS NombreCompleto FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente LEFT JOIN RH_Personal RH with(nolock) ON C.CveChofer = RH.CvePersonal WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
GvContratos.DataBind()
|
||||
End Using
|
||||
End Using
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
|
||||
'If DdlClientes.SelectedValue = "" Then
|
||||
' Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
Try
|
||||
If ObjContratos.UpdateContratos(CveContrato.Value.ToEntero, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero) Then
|
||||
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al actualizar el contrato", TipoMensaje.MsgError)
|
||||
If ObjContratos.UpdateContratoAF(CveContrato.Value.ToEntero, DdlAF.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
TxtObservaciones.Text = GvRow.DataKey("Observaciones")
|
||||
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
TxtFechaSalida.Text = GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron factura canceladas pendientes"
|
||||
DataKeyNames="FolioFiscal,RFC,Total"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn " data-sort="true" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="25%" />
|
||||
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
@@ -8517,7 +8517,13 @@
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:N4}") %>' Style="text-align: right!important" Width="80px" Enabled="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%>
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -36425,12 +36425,13 @@ Partial Class Ventas
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2, Cantidad, CodigoPS) Then
|
||||
Alert("No hay existencia.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -36509,7 +36510,7 @@ Partial Class Ventas
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
@@ -36573,6 +36574,37 @@ Partial Class Ventas
|
||||
GvProductosProcedimiento.DataBind()
|
||||
DVGvProductosProcedimiento.Visible = True
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
If RBLTipoVenta.SelectedValue = "2" Then
|
||||
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
'SUGIERE PRECIO
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
Dim tPrecioSugerido As Decimal = 0
|
||||
tPrecioSugerido = PU
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePS, CveClasificacion)
|
||||
|
||||
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
||||
|
||||
If ObjPrecioSugerido.CvePrecioLista > 0 AndAlso DivPrecioLista.Visible Then
|
||||
DdlPrecioLista.SelectedValueExist(ObjPrecioSugerido.CvePrecioLista)
|
||||
End If
|
||||
|
||||
If PrecioSugerido <= 0 Then PrecioSugerido = tPrecioSugerido
|
||||
|
||||
GvRow.FCTextBox("TxtPrecio").Text = PrecioSugerido.ToString("#,###.####")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -439,8 +439,30 @@ Public Class WS_PuntoVenta
|
||||
|
||||
objProyecto.Dispose()
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
||||
Dim objProyecto As New ClsSubProyectos
|
||||
Dim Respuesta As New RespuestaWS
|
||||
|
||||
If objProyecto.GetSubProyectos(CveEmpresa) Then
|
||||
Respuesta.Datos = objProyecto.DtResultados
|
||||
|
||||
Respuesta.Datos.Columns(2).ColumnName = "CveSucursal"
|
||||
Respuesta.Datos.Columns(3).ColumnName = "Sucursal"
|
||||
Respuesta.Datos.TableName = "Resultados"
|
||||
Respuesta.HuboError = False
|
||||
Else
|
||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||
End If
|
||||
|
||||
objProyecto.Dispose()
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
||||
Dim objClientes As New ClsClientes
|
||||
@@ -546,14 +568,15 @@ Public Class WS_PuntoVenta
|
||||
|
||||
#Region "ProductosServicios"
|
||||
<WebMethod()>
|
||||
Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSubProyecto As Integer) As RespuestaWS
|
||||
Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSucursal As Integer) As RespuestaWS
|
||||
Dim objPS As New ClsProductosServicios
|
||||
Dim Respuesta As New RespuestaWS
|
||||
|
||||
If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS, CveSubProyecto:=CveSubProyecto, pAplicaParaVenta:=1, pEstado:=1) Then
|
||||
If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS:=PS, CveSubProyecto:=CveSucursal, pAplicaParaVenta:=1, pEstado:=1) Then
|
||||
Respuesta.Datos = objPS.DtResultados
|
||||
Respuesta.Datos.TableName = "Resultados"
|
||||
Respuesta.HuboError = False
|
||||
Respuesta.HuboError = False
|
||||
GuardaLog($"CvePS: {CvePS}, CveClasificacion: {CveClasificacion}, CveEmpresa: {CveEmpresa}, Codigo: {Codigo}, PS: {PS}, CveSubProyecto: {CveSucursal}, pAplicaParaVenta: {1}, pEstado: {1}")
|
||||
Else
|
||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||
End If
|
||||
@@ -847,17 +870,35 @@ Public Class WS_PuntoVenta
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
|
||||
|
||||
If objVentas.DtResultados.Rows.Count = 0 Then
|
||||
If objVentas.DtResultados.Rows.Count = 0 Then
|
||||
|
||||
If objVenta.CveEmpresa = 1 Then
|
||||
If objVenta.CveSubProyecto <= 0 Then
|
||||
objVenta.CveSubProyecto = 10430
|
||||
End If
|
||||
|
||||
If objVenta.FolioFact.ToString.Contiene("", "-1", "0") Then
|
||||
objVenta.FolioFact = getFolio("Rem", objVenta.CveEmpresa, objVenta.CveSubProyecto).ToEntero
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
|
||||
objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR,
|
||||
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
|
||||
objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion,
|
||||
objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, If(objVenta.FechaEjecucion < MinFecha, Now, objVenta.FechaEjecucion),
|
||||
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
|
||||
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then
|
||||
objVenta.CveVenta = objVentas.CveVenta
|
||||
'Ingresar los detalles
|
||||
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza,
|
||||
objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto, Vigencia:=Now) Then
|
||||
objVenta.CveVenta = objVentas.CveVenta
|
||||
'Ingresar los detalles
|
||||
|
||||
If objVenta.CveEmpresa = 1 Then
|
||||
GuardaLog($"objVenta.Detalle {objVenta.Detalle.Count}")
|
||||
End If
|
||||
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
|
||||
If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1) Then
|
||||
If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1, IEPS:=0) Then
|
||||
'Ingresar las caracteristicas del detalle de la venta
|
||||
For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas
|
||||
If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then
|
||||
@@ -954,50 +995,57 @@ Public Class WS_PuntoVenta
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
' For Each Row As DataRow In DT.Rows
|
||||
ImporteMov = objVenta.SubTotal
|
||||
Dim CveClasificacion_04 As Integer = -1
|
||||
If ImporteMov <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
|
||||
ErrorMovtosVentas = True
|
||||
End If
|
||||
End If
|
||||
' Next
|
||||
|
||||
'Se agregan los DSV DESCUENTOS
|
||||
ImporteMov = objVenta.Descuento
|
||||
If ImporteMov <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosDSV = True
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
'Se agregan las CxC
|
||||
ImporteMov = objVenta.Total - TotalPagado
|
||||
If ImporteMov <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si hubo un pago agregarlo
|
||||
ImporteMov = TotalPagado
|
||||
If ImporteMov <> 0 Then
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
ErrorMovtosCxC = True
|
||||
End If
|
||||
End If
|
||||
'Se agregan el Traslado de IVA
|
||||
ImporteMov = objVenta.IVA
|
||||
If ImporteMov <> 0 Then
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
If objVenta.SubTotal > 0 Then
|
||||
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
ErrorMovtosTrasladoIVA = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' FIXME OIC
|
||||
'Dim CveClasificacion_04 As Integer = -1
|
||||
'If ImporteMov <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
|
||||
' ErrorMovtosVentas = True
|
||||
' End If
|
||||
'End If
|
||||
'' Next
|
||||
|
||||
''Se agregan los DSV DESCUENTOS
|
||||
'ImporteMov = objVenta.Descuento
|
||||
'If ImporteMov <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosDSV = True
|
||||
' End If
|
||||
'End If
|
||||
''End If
|
||||
|
||||
''Se agregan las CxC
|
||||
'ImporteMov = objVenta.Total - TotalPagado
|
||||
'If ImporteMov <> 0 Then
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosCxC = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
''Si hubo un pago agregarlo
|
||||
'ImporteMov = TotalPagado
|
||||
'If ImporteMov <> 0 Then
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||
' ErrorMovtosCxC = True
|
||||
' End If
|
||||
'End If
|
||||
''Se agregan el Traslado de IVA
|
||||
'ImporteMov = objVenta.IVA
|
||||
'If ImporteMov <> 0 Then
|
||||
' Dim PorcentajeImpuesto As Decimal = 0
|
||||
' If objVenta.SubTotal > 0 Then
|
||||
' PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
||||
' End If
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
' ErrorMovtosTrasladoIVA = True
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta
|
||||
Return CveVentas
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Function getFolio(TipoDoctoConsulta As String, CveEmpresa As Integer, CvesubProyecto As Integer) As String
|
||||
Dim Respuesta As String = "-1"
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If ObjFolios.GetFolios(TipoDoctoConsulta, CveEmpresa) Then
|
||||
GuardaLog($" GetFolios ok {ObjFolios.DtResultados.Rows.Count} . CvesubProyecto = {CvesubProyecto} .")
|
||||
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", CvesubProyecto))
|
||||
If DT.Rows.Count > 0 Then
|
||||
|
||||
Respuesta = DT.Rows(0)("FActual").ToString()
|
||||
|
||||
|
||||
|
||||
End If
|
||||
DT.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
ObjFolios.Dispose()
|
||||
|
||||
GuardaLog($" Folio Rem {Respuesta} .")
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user