public void AddDocumentToCouch(string rDocument, PawnDocRegVO pawnDocRegVO)
 {
     try
     {
         bool   error;
         string retMSG;
         //  this.targetCouchVO.dbName = vo.TargetCouchDBName;
         SavedDoc = CouchArchiverAddHelper.getInstance().Document_Add(rDocument, out error, out retMSG,
                                                                      JobAllocationHandler3.getTargetCouch(), pawnDocRegVO.StorageID, pawnDocRegVO.TargetCouchDBName);
         //this.storageID = vo.StorageID;
         if (!SavedDoc)
         {
             if (retMSG != null && retMSG.Contains("already exists"))
             {
                 SavedDoc = true;
             }
             log.Error("Add Document failed:" + retMSG);
         }
     }
     catch (Exception e)
     {
         log.Error(string.Format("Save Doc failed for {0} target db{1}", pawnDocRegVO.StorageID, pawnDocRegVO.TargetCouchDBName), e);
         SavedDoc  = false;
         exception = e.Message;
     }
     finally
     {
         rDocument = null;
     }
 }
 public void deleteDocFromSource(PawnDocRegVO pawnDocRegVO)
 {
     try
     {
         bool   error;
         string retMSG;
         SouceDocDeleted = CouchArchiverDeleteHelper.getInstance().Document_Delete(out retMSG, out error, JobAllocationHandler3.getSourceCouch(), pawnDocRegVO.StorageID);
     }
     catch (Exception e)
     {
         log.Error(string.Format("Document delete failed for {0} source db{1}", pawnDocRegVO.StorageID, JobAllocationHandler3.getSourceCouch().dbName), e);
         SouceDocDeleted = false;
     }
 }
        public string getDocumentFromCouch(PawnDocRegVO pawnDocRegVO)
        {
            string rDocument = null;

            try
            {
                bool   error;
                string retMSG;
                rDocument = CouchArchiverGetHelper.getInstance().GetRawDocument(out retMSG, out error, JobAllocationHandler3.getSourceCouch(), pawnDocRegVO);
                if (error)
                {
                    GotDoc = false;
                }
                else
                {
                    GotDoc = true;
                }
                exception = retMSG;
            }
            catch (Exception e)
            {
                GotDoc    = false;
                exception = e.Message;
                log.Error(string.Format("Get Doc failed for {0}, archive skipped for {1}", pawnDocRegVO.StorageID, pawnDocRegVO.DocID), e);
            }
            return(rDocument);
        }