コード例 #1
0
        private void button11_Click(object sender, EventArgs e)
        {
            ArchJobErrorDesc edesc = ArchJobErrorDesc.getInstance();

            edesc.getErrorCode("");
            CouchUtil util = new CouchUtil();

            CouchVo vo = new CouchVo();

            vo.userName      = "******";
            vo.pwd           = "mydbuser";
            vo.serverName    = "localhost";
            vo.serverport    = "5984";
            vo.dbName        = "mydb";
            vo.adminUserName = "******";
            vo.adminPwd      = "adminadmin";
            PawnDocRegVO docRegVO = new PawnDocRegVO();

            docRegVO.DocID           = 1234;
            docRegVO.StorageID       = "05f4b578-d22b-4d1e-8e24-6fa0ee581b38";
            docRegVO.TargetCouchDBID = 4444;
            string   msg     = null;
            bool     retFlag = false;
            Document doc     = util.GetDocument(out msg, out retFlag, vo, docRegVO);

            log.Debug("Got Doc " + doc);
        }
コード例 #2
0
        private void button14_Click(object sender, EventArgs e)
        {
            ArchJobErrorDesc edesc = ArchJobErrorDesc.getInstance();

            edesc.getErrorCode("");
            CouchUtil util = new CouchUtil();


            CouchVo vo = new CouchVo();

            vo.userName      = "******";
            vo.pwd           = "pa55w0rd1";
            vo.serverName    = "couchdb-dev";
            vo.serverport    = "5985";
            vo.dbName        = "clx_cust_docs_dev";
            vo.adminUserName = "******";
            vo.adminPwd      = "adminadmin";

            PawnDocRegVO docRegVO = new PawnDocRegVO();

            docRegVO.DocID             = 1234;
            docRegVO.StorageID         = "30fcdd50-b81a-4dfa-b837-9da56e4c9e3f";
            docRegVO.TargetCouchDBID   = 4444;
            docRegVO.TargetCouchDBName = "clx_7_2010";
            string   msg     = null;
            bool     retFlag = false;
            Document doc     = util.GetDocument(out msg, out retFlag, vo, docRegVO);

            log.Debug("Got Doc " + doc);


            vo               = new CouchVo();
            vo.userName      = "******";
            vo.pwd           = "mydbuser";
            vo.serverName    = "localhost";
            vo.serverport    = "5984";
            vo.dbName        = docRegVO.TargetCouchDBName;
            vo.adminUserName = "******";
            vo.adminPwd      = "adminadmin";
            string msg1 = "";
            bool   ret  = false;

            util.addDocumentToCouch(vo, doc, out msg1, out ret);
        }