/// <summary> /// Saves html report to local config filepath /// </summary> /// <param name="report">filepath of html report</param> /// <returns>file path of saved report</returns> public string SaveReport(string report) { if (string.IsNullOrEmpty(_config.ClientDir) || _active) { return(null); } var path = Path.Combine(_config.ClientDir, _config.StormName); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } var sFileName = string.Format(@"{8}_{0}_{1:00}{2:00}{3:0000}_{4:00}{5:00}{6:00}_{7}.html", Fdr.FeederName.Trim(), _stop.Month, _stop.Day, _stop.Year, _stop.Hour, _stop.Minute, _stop.Second, Environment.UserName.Trim(), _config.getAreaName(Fdr.FeederId)); var filePath = Path.Combine(path, sFileName); SCUtil.SafeDelete(filePath); File.Copy(report, filePath); return(filePath); }
private string GetTempHtmlPath() { _htmlPath = Path.Combine(Path.GetTempPath(), @"DamageReport.html"); SCUtil.SafeDelete(_htmlPath); return(_htmlPath); }