Esempio n. 1
0
        public CouchVo couchDualLogin2(CouchVo vo1)
        {
            setCouchValues(vo1);
            bool   result = false;
            string msg    = string.Empty;
            SecuredCouchArchiver couchArch = new SecuredCouchArchiver(hostname, portName, secWebPort, dbName, userid, pass, isSec);

            if (!couchArch.Authenticate(vo1, vo1.userName, vo1.pwd, out msg))
            {
                vo1.errorMSG = "Authtication failed for '" + vo1.userName + "':" + msg;
                vo1.isError  = true;
                return(vo1);
            }

            if (!couchArch.Authenticate(vo1, vo1.adminUserName, vo1.adminPwd, out msg))
            {
                vo1.errorMSG = "Authtication failed for '" + vo1.adminUserName + "':" + msg;
                vo1.isError  = true;
                return(vo1);
            }
            vo1.isError = false;
            return(vo1);
        }
Esempio n. 2
0
        public CouchVo couchLogin(CouchVo vo1)
        {
            //bool result = false;
            string msg = string.Empty;

            SecuredCouchArchiver couchArch = new SecuredCouchArchiver(hostname, portName, secWebPort, dbName, userid, pass, isSec);

            if (!couchArch.Authenticate(vo1, vo1.userName, vo1.pwd, out msg))
            {
                vo1.errorMSG = "Authtication failed for '" + vo1.userName + "':" + msg;
                vo1.isError  = true;
                return(vo1);
            }
            vo1.isError = false;
            return(vo1);

            /*setCouchValues(vo1);
             * bool result = false;
             * string msg = string.Empty;
             * string fileName = "C:\\Program Files\\Phase2App\\templates\\Report031620110858461303709.pdf";
             * string docID = null;
             * try
             * {
             *  docID = couchLoginVerification(fileName, out msg, out result,false);
             * }
             * catch (Exception)
             * {
             *  vo1.errorMSG = msg;
             *  vo1.isError = result;
             *  return vo1;
             * }
             * if (!result)
             * {
             *  vo1.errorMSG = msg;
             *  vo1.isError = true;
             *  return vo1;
             * }
             *
             * Console.WriteLine("Added doc :" + docID);
             * SecuredCouchConnector CouchConnectorObj = new SecuredCouchConnector(hostname, portName, secWebPort, dbName, userid, pass, isSec);
             * result=CouchConnectorObj.Document_Delete(GldocName);
             * //CouchVo vo = new CouchVo();
             * vo1.errorMSG = "";
             * if(!result)
             *  vo1.isError = true;
             * return vo1;*/
        }