--
This commit is contained in:
@@ -64,7 +64,9 @@
|
|||||||
max-width: 80px;
|
max-width: 80px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.ltlzip{
|
||||||
|
display:none !important;
|
||||||
|
}
|
||||||
a.sline {
|
a.sline {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -5294,10 +5296,7 @@
|
|||||||
<asp:Literal ID="LtlXmlfin" runat="server"></asp:Literal></span>
|
<asp:Literal ID="LtlXmlfin" runat="server"></asp:Literal></span>
|
||||||
<span class="ltlzip">
|
<span class="ltlzip">
|
||||||
<asp:Literal ID="LtlZip" runat="server"></asp:Literal></span>
|
<asp:Literal ID="LtlZip" runat="server"></asp:Literal></span>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
|
||||||
<asp:PostBackTrigger ControlID="BtnGenerateXml" />
|
|
||||||
</Triggers>
|
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
@@ -5371,6 +5370,14 @@
|
|||||||
document.body.removeChild(elem);
|
document.body.removeChild(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function SavezipB64(filename, base64Content) {
|
||||||
|
var link = document.createElement('a');
|
||||||
|
link.href = 'data:application/zip;base64,' + base64Content;
|
||||||
|
link.download = filename;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
}
|
||||||
function Savezip(filename, data) {
|
function Savezip(filename, data) {
|
||||||
var blob = new Blob([data], { type: 'application/zip' });
|
var blob = new Blob([data], { type: 'application/zip' });
|
||||||
if (window.navigator.msSaveOrOpenBlob) {
|
if (window.navigator.msSaveOrOpenBlob) {
|
||||||
|
|||||||
@@ -9780,7 +9780,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
FileInfo file = new FileInfo(PathXML);
|
FileInfo file = new FileInfo(PathXML);
|
||||||
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
|
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
|
||||||
{
|
{
|
||||||
descargaZIP.AddFile(PathXML);
|
descargaZIP.AddFile(PathXML,"");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9790,7 +9790,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
FileInfo file = new FileInfo(PathXMLF);
|
FileInfo file = new FileInfo(PathXMLF);
|
||||||
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
|
if (!descargaZIP.Any(x => x.FileName.Contains(file.Name)))
|
||||||
{
|
{
|
||||||
descargaZIP.AddFile(PathXMLF);
|
descargaZIP.AddFile(PathXMLF, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -9801,8 +9801,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
descargaZIP.Save(PathZIP);
|
descargaZIP.Save(PathZIP);
|
||||||
if (!string.IsNullOrEmpty(PathZIP) && System.IO.File.Exists(PathZIP))
|
if (!string.IsNullOrEmpty(PathZIP) && System.IO.File.Exists(PathZIP))
|
||||||
{
|
{
|
||||||
LtlZip.Text = System.IO.File.ReadAllText(PathZIP);
|
byte[] fileBytes = System.IO.File.ReadAllBytes(PathZIP);
|
||||||
script = string.Format("Savezip(\"{0}.zip\", $('.ltlzip').html());", DdlPeriodo.SelectedItem.Text);
|
string base64 = Convert.ToBase64String(fileBytes);
|
||||||
|
LtlZip.Text = base64;
|
||||||
|
script = string.Format("SavezipB64(\"{0}.zip\", $('.ltlzip').html());", DdlPeriodo.SelectedItem.Text);
|
||||||
System.IO.File.Delete(PathZIP);
|
System.IO.File.Delete(PathZIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user