+ string currentDir = Directory.GetCurrentDirectory();\r
+ string dirPagos = Path.Combine( currentDir, ConfigurationSettings.AppSettings["DirectorioPagos"] );\r
+ if ( ! Directory.Exists(dirPagos) )\r
+ {\r
+ Directory.CreateDirectory( dirPagos );\r
+ }\r
+ \r
+ int secuencia = 0;\r
+ \r
+ string baseFileName = "rc_" + DateTime.Now.ToString("yyyy-MM-dd") + "_"; \r
+ string pathName = Path.Combine( dirPagos, baseFileName + secuencia.ToString("00") + ".xml" );\r
+ \r
+ while ( File.Exists(pathName) )\r
+ {\r
+ secuencia += 1;\r
+ pathName = Path.Combine( dirPagos, baseFileName + secuencia.ToString("00") + ".xml");\r
+ }\r
+\r
+ XmlTextWriter writer = new XmlTextWriter( pathName, null );\r