- cambios en función de cambios estatus/comprobante
This commit is contained in:
@@ -194,8 +194,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
bool errorCargaComprobante = false;
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
FileInfo fiNuevo;
|
||||
|
||||
@@ -247,12 +246,10 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
fiNuevo = new FileInfo(RutaArchivoTemp);
|
||||
|
||||
if (fiNuevo.Exists)
|
||||
if (fiNuevo.Exists)
|
||||
{
|
||||
try
|
||||
|
||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
||||
{
|
||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
||||
{
|
||||
File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
||||
@@ -264,7 +261,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
}
|
||||
|
||||
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
@@ -279,23 +276,22 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
}
|
||||
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
{
|
||||
CargaDatos();
|
||||
Anexo.Text = "[]";
|
||||
Anexo.Text = "[]";
|
||||
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
||||
Alert("Comprobante actualizado correctamente.");
|
||||
}
|
||||
UpAddComprobancte.Update();
|
||||
}
|
||||
|
||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||
|
||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||
|
||||
bool errorCambioEstatus = false;
|
||||
bool errorCambioEstatus = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
@@ -321,12 +317,9 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
else if(TipoLinea == 2)
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
{
|
||||
GridView gvTemp = GvLAPO;
|
||||
gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
|
||||
gvTemp.Columns[8].Visible = false;
|
||||
gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||
}
|
||||
}
|
||||
@@ -336,7 +329,6 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
@@ -355,7 +347,8 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
LnkCargarComprobante.Visible = false;
|
||||
LnkDescargaComprobante.Visible = false;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user