Nuevo Módulo de recolecciones
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
|
||||
Reference in New Issue
Block a user