Exemplo n.º 1
0
        protected void SyncChangedAttachmentFolders()
        {
            string sel, hostpath, remotepath;

            //SFTPInterface sftpi = new SFTPInterface();
            //sel = @"select LogX, ERefNo = null from _Attachments where changed = 1 union select LogX = null, ERefNo from _Attachments where changed = 1";
            sel = @"select LogX, ERefNo from _Attachments where changed = 1";
            AttachmentCollection changed = Attachments.GetCollection(sel);

            foreach (Attachment a in changed)
            {
                hostpath   = GetHostPathToThisAttachment(a.Logx, a.ERefNo);
                remotepath = GetRemotePathToThisAttachment(a.Logx, a.ERefNo);
                int xxx = 0;
                xxx = SFTPInterface.SynchronizeAttachmentFolder(remotepath, hostpath);
                if (xxx == 0)
                {
                    Attachment.ClearAttachmentChangedFlag(a);
                }
            }
        }
Exemplo n.º 2
0
        private void SyncThisFolder(int logx, int erefno)
        {
            int xxx = 0;

            xxx = SFTPInterface.SynchronizeAttachmentFolder(@"C:\ADBMW\ADBM\ADBMSalesManagement\Attachments\By_ERefNo\29411", @"/Attachments/By_ERefNo/29411");
        }