//returns confidential indicator for waste trasnfers. If not calculated yet, it will be calculated and stored in viewstate protected bool getWasteTransferConfidentialityAffected() { if (WasteTransferConfidentialityAffected == null) { WasteTransferConfidentialityAffected = AreaOverview.IsWasteAffectedByConfidentiality(SearchFilter); } return((bool)WasteTransferConfidentialityAffected); }
public void DoSaveCSV(object sender, EventArgs e) { CultureInfo csvCulture = CultureResolver.ResolveCsvCulture(Request); CSVFormatter csvformat = new CSVFormatter(csvCulture); // Create Header var filter = SearchFilter; bool isConfidentialityAffected = AreaOverview.IsWasteAffectedByConfidentiality(filter); Dictionary <string, string> header = EPRTR.HeaderBuilders.CsvHeaderBuilder.GetAreaoverviewWasteTransferSearchHeader(filter, isConfidentialityAffected); // Create Body List <AreaOverview.AOWasteTreeListRow> rows = AreaOverview.GetWasteTransferActivityTree(filter).ToList(); sortResult(rows); // dump to file string topheader = csvformat.CreateHeader(header); string rowHeader = csvformat.GetAreaOverviewWasteTransferHeader(); Response.WriteUtf8FileHeader("EPRTR_Areaoverview_WasteTransfers_List"); Response.Write(topheader + rowHeader); foreach (var item in rows) { string row = csvformat.GetAreaOverviewWasteTransferRow(item); if (AreaOverview.AOWasteTreeListRow.CODE_TOTAL.Equals(item.Code)) { Response.Write(Environment.NewLine); Response.Write(rowHeader); } Response.Write(row); } Response.End(); }