This commit is contained in:
@@ -10,11 +10,13 @@ using System.Xml;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using ADSistemaLibrary.SatXml;
|
||||
using ADSistemaLibrary.SatXml;
|
||||
|
||||
//using ADS_CFDI_SAT;
|
||||
|
||||
public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
{
|
||||
#region "Propiedades"
|
||||
const string rqFechaInicio = "FechaInicio";
|
||||
const string rqFechaFin = "FechaFin";
|
||||
const string rqRegistroEn = "RegistroEn";
|
||||
@@ -59,10 +61,44 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
set { ViewState["RegistroEn"] = value; }
|
||||
}
|
||||
private StringBuilder strErrores;
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string path;
|
||||
if (Request["op"] != null && Request["op"].ToString().Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (System.IO.File.Exists((path = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), Extensiones.ModExtensiones.Decripta(Request["op"].ToString()).Trim()).Replace("/", "\\"))))
|
||||
{
|
||||
|
||||
System.IO.FileInfo archivo = new System.IO.FileInfo(path);
|
||||
|
||||
HttpContext.Current.Response.Clear();
|
||||
HttpContext.Current.Response.ClearContent();
|
||||
HttpContext.Current.Response.ContentType = "text/plain";
|
||||
HttpContext.Current.Response.AppendHeader("Content-disposition", string.Format("attachment; filename={0}", archivo.Name));
|
||||
HttpContext.Current.Response.AddHeader("Content-Length", archivo.Length.ToString());
|
||||
HttpContext.Current.Response.TransmitFile(path);
|
||||
HttpContext.Current.Response.End();
|
||||
}
|
||||
else
|
||||
{
|
||||
RegistraScript("window.close()");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Extensiones.ModExtensiones.GuardaLog(ex.ToString());
|
||||
RegistraScript("window.close()");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fillrequestfields();
|
||||
DdlSubProyectoDatos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ");
|
||||
DdlSubProyectoDatos.DataBind();
|
||||
@@ -92,7 +128,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
}
|
||||
private void downfile(string path)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public void fillrequestfields()
|
||||
{
|
||||
@@ -151,8 +187,10 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
{
|
||||
|
||||
{
|
||||
string ruta = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), gvrow.DataKey("RutaXml").Trim()).Replace("/", "\\"); //gvrow.DataKey("RutaXml");
|
||||
//Alert(ruta);
|
||||
|
||||
string ruta = gvrow.DataKey("RutaXml");
|
||||
//return false;
|
||||
strErrores = new StringBuilder();
|
||||
XmlSatCFDI objxml = null;
|
||||
Modelos.Factura objfact = null;
|
||||
@@ -743,18 +781,18 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
string navurl = "";
|
||||
if(e.Row.DBCampo("Tipo") == "1")
|
||||
if (e.Row.DBCampo("Tipo") == "1")
|
||||
{
|
||||
string RutaXml = e.Row.DBCampo("RutaXml");
|
||||
if (RutaXml.IndexOf("Empresas")>0)
|
||||
{
|
||||
RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
|
||||
}
|
||||
navurl =string.Format("RepConciliacionEmitidosSat.aspx?op=", e.Row.DBCampo("RutaXml"));
|
||||
//if (RutaXml.IndexOf("Empresas")>0)
|
||||
//{
|
||||
// RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
|
||||
//}
|
||||
navurl = string.Format("RepConciliacionEmitidosSat.aspx?op={0}", Extensiones.ModExtensiones.Encripta(e.Row.DataKey("RutaXml")));
|
||||
}
|
||||
else
|
||||
{
|
||||
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
|
||||
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
|
||||
}
|
||||
e.Row.FCHyperLink("HypXml").NavigateUrl = navurl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user