- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
private static void WriteErrLog(string FileName, string errors)
{
try
{
string name = Environment.CurrentDirectory + "\\log\\" + FileName.Replace("80020_", "");
name = name.Replace(".xml", ".txt");
if (File.Exists(name))
name = name.Replace(".txt", "_" + DateTime.Now.ToString("yyyy-MM-dd hh_mm_ss") + ".txt");
using (StreamWriter f = new StreamWriter(name, true, Encoding.GetEncoding(1251)))
{
f.Write(errors);
}
}
catch { }
}