Promociones Franquicias
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Class="table-group-action-input form-control input-inline input-sm select2me" Width="70%">
|
||||
<asp:ListItem Selected="True" Text="No Aplicadas" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Aplicadas" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="5"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,10 +121,12 @@
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvSolicitudes.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvSolicitudes" runat="server" GridLines="None" DataKeyNames="CveOrdenCompra,Folio, RazonSocial, ImporteSol, FolioMov, Importe, Nombre, CveEvento"
|
||||
<asp:GridView ID="GvSolicitudes" runat="server" GridLines="None" DataKeyNames="CveOrdenCompra,Folio, RazonSocial, ImporteSol, FolioMov, Importe, Nombre, CveEvento,CveEventoEstatus"
|
||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" data-footer="0" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False"
|
||||
OnRowDataBound="GvSolicitudes_RowDataBound"
|
||||
EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
<asp:CheckBox ID="ChkAll" runat="server"/>
|
||||
@@ -132,40 +135,53 @@
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--1--%>
|
||||
<asp:TemplateField HeaderText="Ord. Compra" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNumFolio" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveOrdenCompra", "/OC/OC.aspx?OC={0}")%>' Text='<%# Eval("Folio") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--2--%>
|
||||
<asp:BoundField DataField="RazonSocial" HeaderText="Proveedor" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--3--%>
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--4--%>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--5--%>
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Usuario Solicitó" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<%--6--%>
|
||||
<asp:BoundField DataField="ImporteSol" HeaderText="Importe Solicitud" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Right" Visible ="true" />
|
||||
|
||||
<%--7--%>
|
||||
<asp:TemplateField HeaderText="Folio Mov. Banc." ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNumFolioMov" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>' Text='<%# Eval("FolioMov") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--8--%>
|
||||
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="10%" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" CssClass="Texto" Text='<%# Eval("Importe", "${0:N2}") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--9--%>
|
||||
<asp:TemplateField HeaderText="Moneda" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" CssClass="Texto" Text='<%# Eval("Abreviatura") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--10--%>
|
||||
<asp:TemplateField HeaderText="Pagar Anticipo" ItemStyle-Width="20%" Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplNum" runat="server" CssClass="Texto" Target="_blank" NavigateUrl='<%# Eval("CveOrdenCompra", "/Bancos/IE.aspx?Opcion=EGSSINFACT&CveOC={0}") %>' ToolTip="Pagar Anticipo"><i class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--11--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cancelar" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelar" runat="server" AlternateText="Eliminar" Visible="false" CausesValidation="False" CommandName="Delete" OnClick="LnkCancelar_Click"
|
||||
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>
|
||||
|
||||
@@ -14,6 +14,10 @@ using iTextSharp.text;
|
||||
using iTextSharp.text.pdf;
|
||||
using System.IO;
|
||||
using Ionic.Zip;
|
||||
using StackExchange.Redis;
|
||||
using static Stimulsoft.Report.Export.DeflaterHuffman;
|
||||
|
||||
|
||||
public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
@@ -286,4 +290,64 @@ public partial class OC_RepSolicitudesAnticipo : ClsPaginas
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void LnkCancelar_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
bool errorProceso = false;
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
int CveEvento = GvRow.DataKey("CveEvento").ToEntero();
|
||||
int CveOrdenCompra = GvRow.DataKey("CveOrdenCompra").ToEntero();
|
||||
|
||||
string ImporteSol = GvRow.DataKey("ImporteSol") ;
|
||||
|
||||
ClsOIEventos objGenral = new ClsOIEventos();
|
||||
ClsOIEventos objEventos = new ClsOIEventos(objGenral.IniciaTransacSQL());
|
||||
|
||||
|
||||
if (objEventos.UpdateEstatusEvento(5,-1, CveEvento,UsuarioActual.CveUsuario))
|
||||
{
|
||||
if (!objGenral.AddEventoBitacora($"Se cancela solicitud de anticipo con importe {ImporteSol}","",UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,CveOC:CveOrdenCompra)){
|
||||
errorProceso = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorProceso = true;
|
||||
}
|
||||
|
||||
|
||||
if (!errorProceso)
|
||||
{
|
||||
objGenral.Commit();
|
||||
Alert("Solicitud de anticipo cancelado correctamente.");
|
||||
}
|
||||
else
|
||||
{
|
||||
objGenral.RollBack();
|
||||
}
|
||||
|
||||
objGenral.Dispose();
|
||||
|
||||
if (!errorProceso)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void GvSolicitudes_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if(e.Row.DataKey("CveEventoEstatus").ToEntero() == 1)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||
}else if (e.Row.DataKey("CveEventoEstatus").ToEntero() == 5)
|
||||
{
|
||||
e.Row.FCHyperLink("HplNum").Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user