using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MercatorApi;
using MercatorUi;
namespace MyNameSpace
{
public class Class1 : MercatorUi.Interfaces. IExec
{
public void Main()
{
DataSet ds = Api .Zselect( Globals .RepData, "select id,module from actions where (module='DEST') and ((id_actempl='.A-A729D53') or (id_actempl='.A-C48A0EB'))" );
if (ds == null )
return ;
Progress .ProgressCreate(ds.Tables[0].Rows.Count);
foreach ( DataRow dr in ds.Tables[0].Rows)
{
Progress .ProgressIncrement(1);
string id = Api .CleanRep(dr[ "id" ].ToString().TrimEnd());
string dir = Globals .RepData + "Files\\Actions\\DEST\\" + id;
if (System.IO. Directory .Exists(dir))
Api .CopyFolder(dir, "<" + Api . SqlFilePathRoots .Files.ToString() + "\\Actions\\DEST\\" + id);
}
Progress .ProgressDestroy();
Dialogs .Stop( "OK !" );
}
}
}