backup switch, adjustment codeintegration
This commit is contained in:
@ -106,13 +106,23 @@ namespace CobXmlSupport
|
||||
codeComplInit += cr.FieldName + "\t" + enQuote( cr.MoveCode.Replace("\r\n", "\n")) + "\r\n";
|
||||
}
|
||||
}
|
||||
string backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + "." +
|
||||
(DateTime.Now.Year-2000).ToString("00") +
|
||||
DateTime.Now.Month.ToString("00") +
|
||||
DateTime.Now.Day.ToString("00") + "T"+
|
||||
DateTime.Now.Hour.ToString("00") +
|
||||
DateTime.Now.Minute.ToString("00") +
|
||||
DateTime.Now.Second.ToString("00") + ".cvs";
|
||||
|
||||
string backupfile;
|
||||
if (S.ettingUserCodeBcup)
|
||||
{
|
||||
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + "." +
|
||||
(DateTime.Now.Year - 2000).ToString("00") +
|
||||
DateTime.Now.Month.ToString("00") +
|
||||
DateTime.Now.Day.ToString("00") + "T" +
|
||||
DateTime.Now.Hour.ToString("00") +
|
||||
DateTime.Now.Minute.ToString("00") +
|
||||
DateTime.Now.Second.ToString("00") + ".cvs";
|
||||
}
|
||||
else {
|
||||
backupfile = inPath + inFile.Substring(0, inFile.LastIndexOf(".")) + ".backup.cvs";
|
||||
File.Delete(backupfile);
|
||||
}
|
||||
|
||||
File.Move(inPath + codeFile, backupfile );//+ DateTime.Now.ToString());
|
||||
File.WriteAllText(inPath + codeFile, codeComplInit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user