Added org name to download report filenames

This commit is contained in:
Rick Falkvinge
2016-04-05 01:50:07 +02:00
parent ff56f20ae7
commit d9a88ddfd2
2 changed files with 3 additions and 2 deletions
@@ -4,6 +4,7 @@ using System.Globalization;
using Resources.Pages;
using Swarmops.Common.Enums;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Structure;
public partial class Pages_v5_Ledgers_Csv_BalanceData : DataV5Base
{
@@ -28,7 +29,7 @@ public partial class Pages_v5_Ledgers_Csv_BalanceData : DataV5Base
Response.ClearHeaders();
Response.ContentType = "text/plain";
Response.AppendHeader ("Content-Disposition",
"attachment;filename=" + Ledgers.BalanceSheet_DownloadFileName +
"attachment;filename=" + CurrentOrganization.Name.Replace (" ","") + "-" + Ledgers.BalanceSheet_DownloadFileName +
this._year.ToString (CultureInfo.InvariantCulture) + "-" + DateTime.Today.ToString ("yyyyMMdd") + ".csv");
Response.Output.WriteLine ("\"{0}\",\"{1}\",\"{2}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\"",
@@ -28,7 +28,7 @@ public partial class Pages_v5_Ledgers_Csv_ProfitLossData : DataV5Base
Response.ClearHeaders();
Response.ContentType = "text/plain";
Response.AppendHeader ("Content-Disposition",
"attachment;filename=" + Ledgers.ProfitLossStatement_DownloadFileName +
"attachment;filename=" + CurrentOrganization.Name.Replace(" ", "") + "-" + Ledgers.ProfitLossStatement_DownloadFileName +
this._year.ToString (CultureInfo.InvariantCulture) + "-" + DateTime.Today.ToString ("yyyyMMdd") + ".csv");
if (this._year == DateTime.Today.Year)