/// <summary>
    /// Save transfers data
    /// </summary>
    public void DoSaveCSV(object sender, EventArgs e)
    {
        CultureInfo  csvCulture = CultureResolver.ResolveCsvCulture(Request);
        CSVFormatter csvformat  = new CSVFormatter(csvCulture);

        // Create Header
        var filter = SearchFilter;

        bool isConfidentialityAffected = WasteTransfers.IsAffectedByConfidentiality(filter);

        Dictionary <string, string> header = EPRTR.HeaderBuilders.CsvHeaderBuilder.GetWasteTransfersSearchHeader(
            filter,
            isConfidentialityAffected);

        // Create Body
        var rows = WasteTransfers.GetActivityTree(filter);

        // dump to file
        string topheader = csvformat.CreateHeader(header);

        string[] colHeaderRows = csvformat.GetWasteTransferActivityColHeaderRows(filter);

        Response.WriteUtf8FileHeader("EPRTR_Waste_Transfers_Activity_List");

        Response.Write(topheader + colHeaderRows[0] + colHeaderRows[1] + colHeaderRows[2]);

        //all rows but total
        foreach (var item in rows.Where(r => r.Code != ActivityTreeListRow.CODE_TOTAL))
        {
            string row = csvformat.GetWasteTransferActivityRow(item, filter);
            Response.Write(row);
        }

        //write total row

        var totalRow = rows.SingleOrDefault(r => r.Code == ActivityTreeListRow.CODE_TOTAL);

        if (totalRow == null)
        {
            //find all rows on topLevel. if only one, use this as total row
            var toplevelRows = rows.Where(r => r.Level == 0);
            if (toplevelRows != null && toplevelRows.Count() == 1)
            {
                totalRow = toplevelRows.Single();
            }
        }

        //write total row if any is found
        if (totalRow != null)
        {
            Response.Write(Environment.NewLine);
            Response.Write(csvformat.AddText(Resources.GetGlobal("Common", "Total")));
            Response.Write(Environment.NewLine);


            string[] totalColHeaderRows = csvformat.GetWasteTransferActivityColHeaderRows(filter);

            Response.Write(totalColHeaderRows[0] + totalColHeaderRows[1]);

            string row = csvformat.GetWasteTransferActivityRow(totalRow, filter);
            Response.Write(row);
        }


        Response.End();
    }