/// <summary>
        /// UploadFile
        /// </summary>
        /// <param name="fileName">fileName</param>
        /// <param name="buId">buId</param>
        /// <param name="gtpId">gtpId</param>
        /// <param name="gsId">gsId</param>
        /// <returns>bool</returns>
        public bool UploadFile(string fileName, string buId, string gtpId, string gsId)
        {
            int    size              = 1 * 1024 * 1024;
            int    total             = 0;
            string packageFileName   = Path.GetFileNameWithoutExtension(fileName);
            string packageFileSuffix = Path.GetExtension(fileName).Remove(0, 1);
            long   packageFileSize   = 0;

            using (FileStream fs = File.OpenRead(fileName))
            {
                packageFileSize = fs.Length;
                total           = (int)(fs.Length / size) + (fs.Length % size == 0 ? 0 : 1);
                using (BinaryReader br = new BinaryReader(fs))
                {
                    for (int i = 1; i <= total; i++)
                    {
                        byte[] bytes = br.ReadBytes(size);

                        resultDO result = this.wsAgent.uploadTenderpackage(bytes.Length, bytes, total, i, true, buId, gtpId, gsId, packageFileName, packageFileSuffix, packageFileSize);

                        if (result.code != i)
                        {
                            return(false);
                        }
                    }
                }
            }

            return(true);
        }
        /// <summary>
        /// FindListByGsIdAndGewigName
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <param name="gewigName">gewigName</param>
        /// <returns>gpEvalWayItemGtfWebDO[]</returns>
        public gpEvalWayItemGtfWebDO[] FindListByGsIdAndGewigName(string gsId, string gewigName)
        {
            if (string.IsNullOrWhiteSpace(gsId))
            {
                throw new ArgumentNullException(nameof(gsId));
            }

            resultDO result = this.wsAgent.findAll(gsId, gewigName);

            return(((object[])result.objList).Cast <gpEvalWayItemGtfWebDO>().ToArray());
        }
        /// <summary>
        /// FindQuestions
        /// </summary>
        /// <param name="gtpId">gtpId</param>
        /// <param name="gsId">gsId</param>
        /// <param name="gtoTitle">gtoTitle</param>
        /// <param name="gtoType">gtoType</param>
        /// <returns>gpTfOperationWebDO[]</returns>
        public gpTfOperationWebDO[] FindQuestions(string gtpId, string gsId, string gtoTitle, int gtoType)
        {
            resultDO result = this.wsAgent.findQuestions(gtpId, gsId, gtoTitle, gtoType);

            if (result.objList == null)
            {
                return(new gpTfOperationWebDO[0]);
            }

            return(((object[])result.objList).Cast <gpTfOperationWebDO>().ToArray());
        }
示例#4
0
        /// <summary>
        /// FindList
        /// </summary>
        /// <param name="auId">auId</param>
        /// <returns>gpTenderProjectWebDO[</returns>
        public gpTenderProjectWebDO[] FindList(string auId)
        {
            if (string.IsNullOrWhiteSpace(auId))
            {
                throw new ArgumentNullException(nameof(auId));
            }

            resultDO result = this.wsAgent.findList(auId);

            return(((object[])result.objList).Cast <gpTenderProjectWebDO>().ToArray());
        }
示例#5
0
        /// <summary>
        /// FindListByGtId
        /// </summary>
        /// <param name="gtId">gtId</param>
        /// <returns>gpTemplateNodeWebDO[]</returns>
        public gpTemplateNodeWebDO[] FindListByGtId(string gtId)
        {
            if (string.IsNullOrWhiteSpace(gtId))
            {
                throw new ArgumentNullException(nameof(gtId));
            }

            resultDO result = this.wsAgent.findList(gtId);

            return(((object[])result.objList).Cast <gpTemplateNodeWebDO>().ToArray());
        }
示例#6
0
        /// <summary>
        /// FindBidProjecList
        /// </summary>
        /// <param name="gtpId">gtpId</param>
        /// <param name="gsId">gsId</param>
        /// <param name="gtpName">gtpName</param>
        /// <param name="gtpCode">gtpCode</param>
        /// <returns>gpTenderProjectWebDO[]</returns>
        public gpTenderProjectWebDO[] FindBidProjecList(string gtpId, string gsId, string gtpName, string gtpCode)
        {
            resultDO result = this.wsAgent.findBidProjecList(gtpId, gsId, gtpName, gtpCode);

            if (result.objList == null)
            {
                return(new gpTenderProjectWebDO[0]);
            }

            return(((object[])result.objList).Cast <gpTenderProjectWebDO>().ToArray());
        }
示例#7
0
        /// <summary>
        /// FindListByAuIdAndName
        /// </summary>
        /// <param name="auId">auId</param>
        /// <param name="gtName">gtName</param>
        /// <param name="state">state</param>
        /// <returns>gpTemplateWebDO[]</returns>
        public gpTemplateWebDO[] FindListByAuIdAndName(string auId, string gtName, int state)
        {
            if (string.IsNullOrWhiteSpace(auId))
            {
                throw new ArgumentNullException(nameof(auId));
            }

            resultDO result = this.wsAgent.findList(auId, gtName, state);

            return(((object[])result.objList).Cast <gpTemplateWebDO>().ToArray());
        }
        /// <summary>
        /// Login
        /// </summary>
        /// <param name="login">login</param>
        /// <returns>结果</returns>
        public baseUserWebDO Login(login login)
        {
            if (login == null)
            {
                throw new ArgumentNullException(nameof(login));
            }

            resultDO result = this.wsAgent.login(login.account, login.password, login.acRole, login.macAddress);

            if (result.success)
            {
                return(result.obj as baseUserWebDO);
            }
            else
            {
                throw new Exception(result.message);
            }
        }
        /// <summary>
        /// CALogin
        /// </summary>
        /// <param name="calogin">calogin</param>
        /// <returns>结果</returns>
        public baseUserWebDO CALogin(CAlogin calogin)
        {
            if (calogin == null)
            {
                throw new ArgumentNullException(nameof(calogin));
            }

            resultDO result = this.wsAgent.CAlogin(calogin.caSignCert, calogin.password, calogin.acRole, calogin.macAddress);

            if (result.success)
            {
                return(result.obj as baseUserWebDO);
            }
            else
            {
                throw new Exception(result.message);
            }
        }
        /// <summary>
        /// DownloadFile
        /// </summary>
        /// <param name="filePath">filePath</param>
        /// <param name="gtpId">gtpId</param>
        /// <param name="gsId">gsId</param>
        /// <param name="buId">buId</param>
        /// <returns>bool</returns>
        public bool DownloadFile(string filePath, string gtpId, string gsId, string buId)
        {
            resultDO obj = this.wsAgent.downloadTenderpackage(gtpId, gsId, 1, buId);

            if (!obj.success)
            {
                return(false);
            }

            reslultInfoDO fileInfo = obj.obj as reslultInfoDO;
            string        fileName = Path.Combine(filePath, fileInfo.fileName + "." + fileInfo.suffix);
            long          fileSize = fileInfo.fileSize;
            long          size     = obj.fileContent.Length;
            int           total    = fileInfo.totalSegment;

            using (FileStream fs = File.Open(fileName, FileMode.Create, FileAccess.Write))
            {
                using (BinaryWriter bw = new BinaryWriter(fs))
                {
                    bw.Write(obj.fileContent);
                    bw.Flush();

                    for (int i = 2; i <= total; i++)
                    {
                        resultDO temp = this.wsAgent.downloadTenderpackage(gtpId, gsId, i, buId);

                        if (temp.success)
                        {
                            bw.Write(temp.fileContent);
                            bw.Flush();
                        }
                        else
                        {
                            return(false);
                        }
                    }
                }
            }

            return(true);
        }
        /// <summary>
        /// FileDifferenceResult
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object FileDifferenceResult(string gsId)
        {
            resultDO result = this.wsAgent.fileDifferenceResult(gsId);

            return(result);
        }
示例#12
0
        /// <summary>
        /// FindList
        /// </summary>
        /// <param name="gtpId">gtpId</param>
        /// <param name="gsId">gsId</param>
        /// <param name="gbqAgainstCoName">gbqAgainstCoName</param>
        /// <returns>gpBidQuestionsWebDO[]</returns>
        public gpBidQuestionsWebDO[] FindList(string gtpId, string gsId, string gbqAgainstCoName)
        {
            resultDO result = this.wsAgent.findList(gtpId, gsId, gbqAgainstCoName);

            return(((object[])result.objList).Cast <gpBidQuestionsWebDO>().ToArray());
        }
        /// <summary>
        /// UpdateBidEvaluationSingState
        /// </summary>
        /// <param name="gpSectionWebDO">gpSectionWebDO</param>
        /// <param name="evalReportFile">evalReportFile</param>
        /// <returns>bool</returns>
        public bool UpdateBidEvaluationSingState(gpSectionWebDO gpSectionWebDO, byte[] evalReportFile)
        {
            resultDO result = this.wsAgent.updateBidEvaluationSingState(gpSectionWebDO, evalReportFile);

            return(result.success);
        }
        /// <summary>
        /// FindBidEvaluationResultByProjectIdAndSectionId
        /// </summary>
        /// <param name="projectId">projectId</param>
        /// <param name="sectionId">sectionId</param>
        /// <returns>gpEvalResultWebDO[]</returns>
        public gpEvalResultWebDO[] FindBidEvaluationResultByProjectIdAndSectionId(string projectId, string sectionId)
        {
            resultDO result = this.wsAgent.getBidEvaluationResult(projectId, sectionId);

            return(((object[])result.objList).Cast <gpEvalResultWebDO>().ToArray());
        }
        /// <summary>
        /// AutomaticScoreResult
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object AutomaticScoreResult(string gsId)
        {
            resultDO result = this.wsAgent.automaticScoreResult(gsId);

            return(result);
        }
        /// <summary>
        /// GetBidEvaluationReportFile
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns>bool</returns>
        public resultDO GetBidEvaluationReportFile(string gsId)
        {
            resultDO result = this.wsAgent.getBidEvaluationReportFile(gsId);

            return(result);
        }
        /// <summary>
        /// AuxiliaryAnalysis
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object AuxiliaryAnalysis(string gsId)
        {
            resultDO result = this.wsAgent.auxiliaryAnalysis(gsId);

            return(result);
        }
        /// <summary>
        /// EvaluationFactorsAnalysis
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object EvaluationFactorsAnalysis(string gsId)
        {
            resultDO result = this.wsAgent.evaluationFactorsAnalysis(gsId);

            return(result);
        }
        /// <summary>
        /// ConformanceContrastResult
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object ConformanceContrastResult(string gsId)
        {
            resultDO result = this.wsAgent.conformanceContrastResult(gsId);

            return(result);
        }
        /// <summary>
        /// PriceAnalysis
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object PriceAnalysis(string gsId)
        {
            resultDO result = this.wsAgent.priceAnalysis(gsId);

            return(result);
        }
        /// <summary>
        /// FindListByProjectIdAndSectionId
        /// </summary>
        /// <param name="sectionId">projectId</param>
        /// <param name="sectionId">sectionId</param>
        /// <returns>gpBidFileOrgWebDO[]</returns>
        public gpBidFileOrgWebDO[] FindListByProjectIdAndSectionId(string projectId, string sectionId)
        {
            resultDO result = this.wsAgent.findAll(projectId, sectionId);

            return(((object[])result.objList).Cast <gpBidFileOrgWebDO>().ToArray());
        }
示例#22
0
        /// <summary>
        /// FindApplyFileBySectionId
        /// </summary>
        /// <param name="sectionId">sectionId</param>
        /// <returns>gpApplyDetailWebDO[]</returns>
        public gpApplyDetailWebDO[] FindApplyFileBySectionId(string sectionId)
        {
            resultDO result = this.wsAgent.getApplyFileList(sectionId);

            return(((object[])result.objList).Cast <gpApplyDetailWebDO>().ToArray());
        }
        /// <summary>
        /// FileExceptionResult
        /// </summary>
        /// <param name="gsId">gsId</param>
        /// <returns></returns>
        public object FileExceptionResult(string gsId)
        {
            resultDO result = this.wsAgent.fileExceptionResult(gsId);

            return(result);
        }
        /// <summary>
        /// BidFileResave
        /// </summary>
        /// <param name="gpSectionWebDO">gpSectionWebDO</param>
        /// <param name="evalReportFile">evalReportFile</param>
        /// <returns>bool</returns>
        public bool BidFileResave(gpSectionWebDO gpSectionWebDO, byte[] evalReportFile)
        {
            resultDO result = this.wsAgent.bidFileResave(gpSectionWebDO, evalReportFile);

            return(result.success);
        }