Permalink
Browse files

Created an admin ability to rename a backup file to make exporting ta…

…sks for the task library a bit easier.
  • Loading branch information...
1 parent 39fcf31 commit 190cf8883b37c060fa09528002df2e526dc3c127 @shannoncruey shannoncruey committed Nov 4, 2011
Showing with 426 additions and 363 deletions.
  1. +26 −1 web/pages/taskMethods.asmx.cs
  2. +400 −362 web/script/taskManage.js
@@ -22,6 +22,7 @@
using System.Web.Services;
using System.Xml.Linq;
using System.Xml.XPath;
+using System.IO;
namespace ACWebMethods
{
@@ -2126,8 +2127,32 @@ public string wmExportTasks(string sTaskArray)
throw new Exception(ex.Message);
}
}
-
+
+ //THIS METHOD IS INTERNAL
+ //we use it for renaming a backup file suitable for the task library.
+ //it's not bulletproof, and is not exposed in the gui.
[WebMethod(EnableSession = true)]
+ public string wmRenameFile(string sExistingName, string sNewFileName)
+ {
+ string sPath = Server.MapPath("~/temp/");
+
+ try
+ {
+ //delete the new name if it exists
+ //File.Delete(sPath + sNewFileName);
+
+ //rename the file to our new name
+ File.Move(sPath + sExistingName, sPath + sNewFileName);
+
+ return sNewFileName;
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+
+ [WebMethod(EnableSession = true)]
public string wmCreateTask(object[] oObj)
{
try
Oops, something went wrong.

0 comments on commit 190cf88

Please sign in to comment.