Cambios ExpDetalle

This commit is contained in:
Luis Carlos Quijada
2025-07-04 16:40:21 -06:00
parent 635f757742
commit a6694558fc
2 changed files with 181 additions and 149 deletions

View File

@@ -1,23 +1,22 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ExpDetalle.aspx.cs" Inherits="Export_ExpDetalle" %> <%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ExpDetalle.aspx.cs" Inherits="Export_ExpDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Exportación: <asp:Label runat="server" ID="LblExp"></asp:Label>
<asp:Label runat="server" Text="Exportación" ID="LblExp"></asp:Label>
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li id="liImprimir" runat="server"> <li id="liImprimir" runat="server">
<asp:LinkButton ID="LBImprimir" runat="server" OnClick="LBImprimir_Click"><i style="font-weight:bold" class="fa fa-file-pdf-o"></i> Exportar PDF</asp:LinkButton> <asp:LinkButton ID="LBImprimir" runat="server" OnClick="LBImprimir_Click"><i style="font-weight:bold" class="fa fa-file-pdf-o"></i> Exportar PDF</asp:LinkButton>
</li> </li>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="whitoutcol" style="width: 100%;"> <div class="whitoutcol" style="width: 100%;">
<div class="portlet light xspadding bordered" style="width: 100%; padding-left: 7px"> <div class="portlet light xspadding bordered" style="width: 100%; padding-left: 7px">
<asp:UpdatePanel ID="UpFactura" runat="server"> <asp:UpdatePanel ID="UpFactura" runat="server">
@@ -41,7 +40,7 @@
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoExp" runat="server" ControlToValidate="DdlTipoExp" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Exportación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoExp" runat="server" ControlToValidate="DdlTipoExp" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Exportación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoExp" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoExp" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCETipoExp" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoExp" Width="350px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlTipoExp.ClientID.ToString()%>">Tipo Exportación:</label> <label id="LblTipoExp" runat="server" for="<%= DdlTipoExp.ClientID.ToString()%>">Tipo Exportación:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright" style="width: 180px; margin-bottom: 5px;"> <div class="form-group form-md-line-input input-iconright" style="width: 180px; margin-bottom: 5px;">
<asp:DropDownList ID="DdlExpEstatus" runat="server" CssClass="select2me form-control"> <asp:DropDownList ID="DdlExpEstatus" runat="server" CssClass="select2me form-control">
@@ -613,7 +612,7 @@
<ContentTemplate> <ContentTemplate>
<asp:UpdatePanel ID="UpPartidas" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpPartidas" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:Button runat="server" ID="BtnAgregarPartida" OnClick="BtnAgregarPartida_Click" Text="Agregar Partida" CssClass="btn btn-primary" style="margin-top: 5px;" /> <asp:Button runat="server" ID="BtnAgregarPartida" OnClick="BtnAgregarPartida_Click" Text="Agregar Partida" CssClass="btn btn-primary" Style="margin-top: 5px;" />
<br /> <br />
<br /> <br />
<asp:GridView ID="GVPartidas" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacionDetalle" OnRowCommand="GVPartidas_RowCommand" ShowFooter="true" OnRowDataBound="GVPartidas_RowDataBound" Width="100%" EmptyDataText="No se encontraron Partidas" ToolTip="Partidas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> <asp:GridView ID="GVPartidas" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacionDetalle" OnRowCommand="GVPartidas_RowCommand" ShowFooter="true" OnRowDataBound="GVPartidas_RowDataBound" Width="100%" EmptyDataText="No se encontraron Partidas" ToolTip="Partidas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
@@ -638,14 +637,19 @@
<asp:Label ID="lblUM" runat="server" Text='<%# Eval("UnidadMedida")%>'> </asp:Label> <asp:Label ID="lblUM" runat="server" Text='<%# Eval("UnidadMedida")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Valor Total USD" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Valor Total USD" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.####}")%>'> </asp:Label> <asp:Label ID="lblPrecio" runat="server" Text='<%# Eval("Precio", "{0:N2}")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Valor Total MXP" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Valor Total MXP" ItemStyle-HorizontalAlign="Right">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblValorTotalMXP" runat="server" Text='<%# Eval("ValorTotalMXP", "{0:#,###.####}")%>'> </asp:Label> <asp:Label ID="lblValorTotalMXP" runat="server" Text='<%# Eval("ValorTotalMXP", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tasa IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblTasaIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Total de Empaque" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Total de Empaque" ItemStyle-HorizontalAlign="Left">
@@ -679,14 +683,31 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px"> <asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="160px">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditarPartida" CommandName="EditarPartida" CommandArgument='<%# Eval("CveExportacionDetalle") %>' CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton> <asp:LinkButton
</ItemTemplate> data-toggle="tooltip"
</asp:TemplateField> title="Editar"
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px"> ID="LnkEditarPartida"
<ItemTemplate> CommandName="EditarPartida"
<asp:LinkButton ID="LnkEliminarPartida" runat="server" CommandName="EliminarPartida" CommandArgument='<%# Eval("CveExportacionDetalle") %>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Partida?" data-btn-ok-label="Sí" /> CommandArgument='<%# Eval("CveExportacionDetalle") %>'
CssClass="btn btn-circle btn-sm green"
runat="server"
Text="<i class='fa fa-pencil'></i>">
</asp:LinkButton>
&nbsp;
<asp:LinkButton
ID="LnkEliminarPartida"
runat="server"
CommandName="EliminarPartida"
CommandArgument='<%# Eval("CveExportacionDetalle") %>'
CssClass="btn btn-circle btn-sm red"
Text="<i class='icon-trash'></i>"
data-toggle="confirmation"
data-popout="true"
data-original-title="¿Está seguro que desea eliminar la Partida?"
data-btn-ok-label="Sí">
</asp:LinkButton>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
@@ -819,6 +840,6 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -54,6 +54,17 @@ public partial class Export_ExpDetalle : ClsPaginas
EsImportacion = true; EsImportacion = true;
} }
LblTipoExp.InnerText = EsImportacion ? "Tipo Importación:" : "Tipo Exportación:";
if (EsImportacion)
{
LblExp.Text = "Importaciones";
}
else
{
LblExp.Text = "Exportación";
}
CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1; CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1;
InicializarValores(); InicializarValores();
CargaDatos(); CargaDatos();