Promociones Franquicias
This commit is contained in:
@@ -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