public string GenerateBidDocument(gpTenderProjectWebDO gptp, gpTemplateWebDO gpt) { string path = Path.Combine(AppDirectory.Temp_Dir(gptp.gpId), "招标文件.docx"); IGpTemplateNodeService gpTemplateNodeService = new GpTemplateNodeService(); gpTemplateNodeWebDO[] gptns = gpTemplateNodeService.FindListByGtId(gpt.gtId); using (DocX document = DocX.Create(path)) { //标题 document.InsertParagraph("《招标文件》").FontSize(18d).Bold().SpacingAfter(50d).Alignment = Alignment.center; //项目名称 document.InsertParagraph(string.Format("项目名称:{0}", gptp.gtpName)).FontSize(15d).Bold().SpacingAfter(30d).Alignment = Alignment.left; //标段名称 document.InsertParagraph(string.Format("标段名称:{0}", gptp.gsName)).FontSize(15d).Bold().SpacingAfter(30d).Alignment = Alignment.left; //段落 this.GenerateDocumentContent(gptns, document, 0, 1); document.Save(); } return(path); }
private void btnRecJudges_Click(object sender, EventArgs e) { try { if (this.grdProject.CurrentRow != null) { gpTenderProjectWebDO gptp = this.grdProject.CurrentRow.Tag as gpTenderProjectWebDO; baseUserWebDO loginResponse = Cache.GetInstance().GetValue <baseUserWebDO>("login"); ////// Service.ServiceReferenceGpBidQuestions.gpBidQuestionsWebDO obj = new Service.ServiceReferenceGpBidQuestions.gpBidQuestionsWebDO(); obj.gtpId = gptp.gtpId; obj.gsId = gptp.gsId; obj.gbqEndTime = DateTime.Now; obj.gbqEndTimeSpecified = true; obj.gbqConTent = "测试"; obj.gbqAgainstCoName = "123"; obj.gbqProposerId = loginResponse.auID; obj.gbqProposerName = loginResponse.auName; obj.gbqProposedTime = DateTime.Now; obj.gbqProposedTimeSpecified = true; obj.isEnd = 0; obj.isEndSpecified = true; obj.evalState = gptp.evalState; obj.evalStateSpecified = true; bool b = gpBidQuestionsService.Add(obj); Service.ServiceReferenceGpBidQuestions.gpBidQuestionsWebDO[] result = gpBidQuestionsService.FindList(gptp.gtpId, gptp.gsId, string.Empty); Service.ServiceReferenceGpBidQuestions.gpBidQuestionsWebDO r = result[0]; r.gbqConTent = "测试1"; bool b1 = gpBidQuestionsService.Update(r); result = gpBidQuestionsService.FindList(gptp.gtpId, gptp.gsId, string.Empty); bool b2 = gpBidQuestionsService.Remove(result[0].gbqId); result = gpBidQuestionsService.FindList(gptp.gtpId, gptp.gsId, string.Empty); SetRecJudgesForm setRecJudgesForm = new SetRecJudgesForm(); setRecJudgesForm.ShowDialog(this); setRecJudgesForm.Dispose(); } else { MetroFramework.MetroMessageBox.Show(this, "请选择招标项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (System.Exception ex) { log.Error(ex); MetroMessageBox.Show(this, "操作失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public ITenderDetailForm(gpTenderProjectWebDO gptp) { InitializeComponent(); StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("招标项目id:{0}", gptp.gtpId)); sb.AppendLine(string.Format("招标项目code:{0}", gptp.gtpCode)); sb.AppendLine(string.Format("项目ID:{0}", gptp.gpId)); sb.AppendLine(string.Format("项目编号:{0}", gptp.gpCode)); sb.AppendLine(string.Format("统一交易标识码:{0}", gptp.unifiedDealCode)); sb.AppendLine(string.Format("招标项目名称:{0}", gptp.gtpName)); sb.AppendLine(string.Format("招标项目类型ID(树形):{0}", gptp.tdrPrjTypeId)); sb.AppendLine(string.Format("招标项目类型代码:{0}", gptp.tdrPrjType)); sb.AppendLine(string.Format("招标项目类型名称:{0}", gptp.tdrPrjName)); sb.AppendLine(string.Format("招标项目分类ID(树形):{0}", gptp.tdrPrjClassifyId)); sb.AppendLine(string.Format("招标项目分类代码:{0}", gptp.tdrPrjClassifyCode)); sb.AppendLine(string.Format("招标项目分类名称:{0}", gptp.tdrPrjClassifyName)); sb.AppendLine(string.Format("招标项目所在行政区域id(行政区域表):{0}", gptp.regionId)); sb.AppendLine(string.Format("招标项目所在行政区域代码:{0}", gptp.regionCode)); sb.AppendLine(string.Format("招标项目所在行政区域名称:{0}", gptp.regionName)); sb.AppendLine(string.Format("招标代理机构代码类型(暂固定为97,统一社会信用代码):{0}", gptp.tdrAgencyCodeType)); sb.AppendLine(string.Format("招标内容与范围及招标方案说明:{0}", gptp.content)); sb.AppendLine(string.Format("项目业主名称:{0}", gptp.ownerName)); sb.AppendLine(string.Format("招标人名称:{0}", gptp.tenderName)); sb.AppendLine(string.Format("招标人类别:{0}", gptp.tenderType)); sb.AppendLine(string.Format("招标人类别名称:{0}", gptp.tenderTypeName)); sb.AppendLine(string.Format("招标人代码:{0}", gptp.tenderCode)); sb.AppendLine(string.Format("招标代理机构名称:{0}", gptp.agentName)); sb.AppendLine(string.Format("招标代理机构类别:{0}", gptp.agentType)); sb.AppendLine(string.Format("招标代理机构类别名称:{0}", gptp.agentTypeName)); sb.AppendLine(string.Format("招标代理机构代码(统一社会信用代码):{0}", gptp.agentCode)); sb.AppendLine(string.Format("招标代理机构基本信息版本号(企业信息操作时间):{0}", gptp.agentVersion)); sb.AppendLine(string.Format("招标方式:{0}", gptp.tenderWay)); sb.AppendLine(string.Format("招标方式名称:{0}", gptp.tenderWayName)); sb.AppendLine(string.Format("招标组织形式:{0}", gptp.tenderOrgWay)); sb.AppendLine(string.Format("招标项目建立时间:{0}", gptp.creatTime)); sb.AppendLine(string.Format("监督部门ID:{0}", gptp.superviseId)); sb.AppendLine(string.Format("监督部门代码类型(暂固定为97,统一社会信用代码):{0}", gptp.superviseCodeType)); sb.AppendLine(string.Format("监督部门代码类型名称:{0}", gptp.superviseCodeTypeName)); sb.AppendLine(string.Format("监督部门代码:{0}", gptp.superviseCode)); sb.AppendLine(string.Format("监督部门名称:{0}", gptp.superviseName)); sb.AppendLine(string.Format("审核部门代码类型(暂固定为97,统一社会信用代码):{0}", gptp.verifyCoCodeType)); sb.AppendLine(string.Format("审核部门代码:{0}", gptp.verifyCoCode)); sb.AppendLine(string.Format("审核部门名称:{0}", gptp.verifyCoName)); sb.AppendLine(string.Format("信息申报责任人姓名(招标项目信息的审核人):{0}", gptp.infoReporterName)); sb.AppendLine(string.Format("信息申报责任人代码类型(暂固定为97,统一社会信用代码):{0}", gptp.infoReporterCodeType)); sb.AppendLine(string.Format("信息申报责任人代码:{0}", gptp.infoReporterCode)); sb.AppendLine(string.Format("申报责任人:{0}", gptp.applyName)); sb.AppendLine(string.Format("状态:{0}", gptp.state)); txtDetail.AppendText(sb.ToString()); }
private void btnResult_Click(object sender, EventArgs e) { if (this.grdProject.CurrentRow != null) { gpTenderProjectWebDO gptp = this.grdProject.CurrentRow.Tag as gpTenderProjectWebDO; EOBResultForm eOBResultForm = new EOBResultForm(gptp.gtpId, gptp.gsId); eOBResultForm.ShowDialog(this); eOBResultForm.Dispose(); } else { MetroFramework.MetroMessageBox.Show(this, "请选择招标项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnBidEvalReport_Click(object sender, EventArgs e) { try { if (this.grdProject.CurrentRow != null) { gpTenderProjectWebDO gptp = this.grdProject.CurrentRow.Tag as gpTenderProjectWebDO; OpenFileDialog ofdl = new OpenFileDialog(); ofdl.Filter = "pdf(*.pdf)|*.pdf"; if (ofdl.ShowDialog() == DialogResult.OK) { gpSectionWebDO obj = new gpSectionWebDO(); obj.gtpId = gptp.gtpId; obj.gsId = gptp.gsId; obj.evalReportUploadTime = DateTime.Now; obj.evalReportFileName = Path.GetFileName(ofdl.FileName); using (Stream stream = ofdl.OpenFile()) { byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); bool result = bidEvaluationService.BidFileResave(obj, bytes); if (result) { MetroMessageBox.Show(this, "上传成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MetroMessageBox.Show(this, "上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } else { MetroMessageBox.Show(this, "请选择招标项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (System.Exception ex) { log.Error(ex); MetroMessageBox.Show(this, "上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public string GenerateBidEvalFactorDocument(gpTenderProjectWebDO gptp) { string path = Path.Combine(AppDirectory.Temp_Dir(gptp.gpId), "评分因素.docx"); IGpBidFileOrgService gpBidFileOrgService = new GpBidFileOrgService(); var result = gpBidFileOrgService.FindListByProjectIdAndSectionId(gptp.gtpId, gptp.gpId); using (DocX document = DocX.Create(path)) { //标题 document.InsertParagraph("《评分因素》").FontSize(18d).Bold().SpacingAfter(50d).Alignment = Alignment.center; var t = document.AddTable(result.Count() + 1, 2); t.Design = TableDesign.ColorfulList; t.Alignment = Alignment.center; //标题 t.Rows[0].Cells[0].Paragraphs[0].Append("名称"); t.Rows[0].Cells[1].Paragraphs[0].Append("是否必须"); int indexer = 1; foreach (var item in result.OrderBy(x => x.sort)) { t.Rows[indexer].Cells[0].Paragraphs[0].Append(item.bbfoName); t.Rows[indexer].Cells[1].Paragraphs[0].Append(item.isMust == 0 ? "否" : "是"); indexer++; } // Insert a new Paragraph into the document. var p = document.InsertParagraph("评分因素:"); p.SpacingAfter(10d); // Insert the Table after the Paragraph. p.InsertTableAfterSelf(t); document.Save(); } return(path); }
private void grdITender_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } gpTenderProjectWebDO gptp = this.grdITender.Rows[e.RowIndex].Tag as gpTenderProjectWebDO; if (e.ColumnIndex == this.colITenderDetail.Index) { ITenderDetailForm iTenderDetailForm = new ITenderDetailForm(gptp); iTenderDetailForm.ShowDialog(this); iTenderDetailForm.Dispose(); } else if (e.ColumnIndex == this.colEditITenderFile.Index) { EditITenderForm editProjectForm = new EditITenderForm(gptp); editProjectForm.ShowDialog(this); editProjectForm.Dispose(); } else if (e.ColumnIndex == this.colQuestion.Index) { QueryITenderQuestionForm queryITenderQuestionForm = new QueryITenderQuestionForm(gptp); queryITenderQuestionForm.ShowDialog(this); queryITenderQuestionForm.Dispose(); } else if (e.ColumnIndex == this.colDeleteITenderFile.Index) { if (MetroMessageBox.Show(this, "确定要删除吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (this.gpTenderFileService.RemoveFile(gptp.gtpId, gptp.gpId)) { MetroMessageBox.Show(this, "删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MetroMessageBox.Show(this, "删除失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
private void grdITender_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } gpTenderProjectWebDO gptp = this.grdITender.Rows[e.RowIndex].Tag as gpTenderProjectWebDO; if (e.ColumnIndex == this.colIViewBid.Index) { OOBHallToForm oOBHallToForm = new OOBHallToForm(); oOBHallToForm.ShowDialog(this); oOBHallToForm.Close(); } else if (e.ColumnIndex == this.colOpenBid.Index) { OOBDecryptBidFileForm oOBDecryptBidFileForm = new OOBDecryptBidFileForm(); oOBDecryptBidFileForm.ShowDialog(this); oOBDecryptBidFileForm.Close(); } }
private void btnDownloadITenderFile_Click(object sender, EventArgs e) { try { if (this.grdProject.CurrentRow != null) { gpTenderProjectWebDO gptp = this.grdProject.CurrentRow.Tag as gpTenderProjectWebDO; Service.ServiceReferenceBidEvaluation.resultDO result = bidEvaluationService.GetBidEvaluationReportFile(gptp.gsId); Service.ServiceReferenceBidEvaluation.reslultInfoDO obj = result.obj as Service.ServiceReferenceBidEvaluation.reslultInfoDO; SaveFileDialog sfdl = new SaveFileDialog(); sfdl.Filter = string.Format("{0}(*.{0})|*.{0}", obj.suffix); sfdl.FileName = obj.fileName; sfdl.DefaultExt = obj.suffix; sfdl.AddExtension = true; if (sfdl.ShowDialog() == DialogResult.OK) { using (FileStream fs = File.Create(sfdl.FileName)) { fs.Write(result.fileContent, 0, result.fileContent.Length); } } } else { MetroMessageBox.Show(this, "请选择招标项目!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (System.Exception ex) { log.Error(ex); MetroMessageBox.Show(this, "下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public EditITenderForm(gpTenderProjectWebDO gptp) { InitializeComponent(); this.gptp = gptp; }
public QueryITenderQuestionForm(gpTenderProjectWebDO gptp) { InitializeComponent(); this.gptp = gptp; }
public string GenerateBidEvalClauseDocument(gpTenderProjectWebDO gptp) { string path = Path.Combine(AppDirectory.Temp_Dir(gptp.gpId), "评标条款.docx"); IGpEvalwayItemGtfService gpEvalwayItemGtfService = new GpEvalwayItemGtfService(); var result = gpEvalwayItemGtfService.FindListByGsIdAndGewigName(gptp.gpId, string.Empty); using (DocX document = DocX.Create(path)) { //标题 document.InsertParagraph("《评分条款》").FontSize(18d).Bold().SpacingAfter(50d).Alignment = Alignment.center; var t = document.AddTable(result.Count() + 1, 11); t.Design = TableDesign.ColorfulList; t.Alignment = Alignment.center; //标题 t.Rows[0].Cells[0].Paragraphs[0].Append("编码"); t.Rows[0].Cells[1].Paragraphs[0].Append("名称"); t.Rows[0].Cells[2].Paragraphs[0].Append("类型"); t.Rows[0].Cells[3].Paragraphs[0].Append("最高分"); t.Rows[0].Cells[4].Paragraphs[0].Append("最低分"); t.Rows[0].Cells[5].Paragraphs[0].Append("是否需要设置值1"); t.Rows[0].Cells[6].Paragraphs[0].Append("设置值1的说明"); t.Rows[0].Cells[7].Paragraphs[0].Append("是否需要设置值2"); t.Rows[0].Cells[8].Paragraphs[0].Append("设置值2的说明"); t.Rows[0].Cells[9].Paragraphs[0].Append("算法名称"); t.Rows[0].Cells[10].Paragraphs[0].Append("备注"); int indexer = 1; foreach (var item in result.OrderBy(x => x.sort)) { t.Rows[indexer].Cells[0].Paragraphs[0].Append(item.gewigCode); t.Rows[indexer].Cells[1].Paragraphs[0].Append(item.gewigName); t.Rows[indexer].Cells[2].Paragraphs[0].Append(item.gewigType.ToString()); t.Rows[indexer].Cells[3].Paragraphs[0].Append(item.maxScore.ToString()); t.Rows[indexer].Cells[4].Paragraphs[0].Append(item.minScore.ToString()); t.Rows[indexer].Cells[5].Paragraphs[0].Append(item.isNeedFirstPara == 0 ? "不需要" : "需要"); t.Rows[indexer].Cells[6].Paragraphs[0].Append(item.firstParaDesc); t.Rows[indexer].Cells[7].Paragraphs[0].Append(item.isNeedSecondPara == 0 ? "不需要" : "需要"); t.Rows[indexer].Cells[8].Paragraphs[0].Append(item.secondParaDesc); t.Rows[indexer].Cells[9].Paragraphs[0].Append(item.algoName); t.Rows[indexer].Cells[10].Paragraphs[0].Append(item.remark); indexer++; } // Insert a new Paragraph into the document. var p = document.InsertParagraph("评分条款:"); p.SpacingAfter(10d); // Insert the Table after the Paragraph. p.InsertTableAfterSelf(t); document.Save(); } return(path); }
public string GenerateBidQuestionDocument(gpTenderProjectWebDO gptp) { string path = Path.Combine(AppDirectory.Temp_Dir(gptp.gpId), "问题澄清.docx"); IGpTfOperationService gpTfOperationService = new GpTfOperationService(); //澄清 var result1 = gpTfOperationService.FindQuestions(gptp.gtpId, gptp.gpId, string.Empty, 1); //修改 var result2 = gpTfOperationService.FindQuestions(gptp.gtpId, gptp.gpId, string.Empty, 2); if (result1.Count() == 0 && result2.Count() == 0) { return(string.Empty); } using (DocX document = DocX.Create(path)) { //标题 document.InsertParagraph("《问题澄清》").FontSize(18d).Bold().SpacingAfter(50d).Alignment = Alignment.center; //澄清 var t1 = document.AddTable(result1.Count() + 1, 3); t1.Design = TableDesign.ColorfulList; t1.Alignment = Alignment.center; //标题 t1.Rows[0].Cells[0].Paragraphs[0].Append("标题"); t1.Rows[0].Cells[1].Paragraphs[0].Append("内容"); t1.Rows[0].Cells[2].Paragraphs[0].Append("创建时间"); int indexer = 1; foreach (var item in result1) { t1.Rows[indexer].Cells[0].Paragraphs[0].Append(item.gtoTitle); t1.Rows[indexer].Cells[1].Paragraphs[0].Append(item.gtoContent); t1.Rows[indexer].Cells[2].Paragraphs[0].Append(item.optTime.ToLongDateString()); indexer++; } //修改 var t2 = document.AddTable(result2.Count() + 1, 3); t2.Design = TableDesign.ColorfulList; t2.Alignment = Alignment.center; //标题 t2.Rows[0].Cells[0].Paragraphs[0].Append("标题"); t2.Rows[0].Cells[1].Paragraphs[0].Append("内容"); t2.Rows[0].Cells[2].Paragraphs[0].Append("创建时间"); indexer = 1; foreach (var item in result2) { t2.Rows[indexer].Cells[0].Paragraphs[0].Append(item.gtoTitle); t2.Rows[indexer].Cells[1].Paragraphs[0].Append(item.gtoContent); t2.Rows[indexer].Cells[2].Paragraphs[0].Append(item.optTime.ToLongDateString()); indexer++; } // Insert a new Paragraph into the document. var p1 = document.InsertParagraph("澄清:"); p1.SpacingAfter(10d); // Insert the Table after the Paragraph. p1.InsertTableAfterSelf(t1); // Insert a new Paragraph into the document. var p2 = document.InsertParagraph("修改:"); p2.SpacingAfter(10d); // Insert the Table after the Paragraph. p2.InsertTableAfterSelf(t2); document.Save(); } return(path); }
public string GenerateBidEvalScoringPointDocument(gpTenderProjectWebDO gptp) { string path = Path.Combine(AppDirectory.Temp_Dir(gptp.gpId), "评分点.docx"); IGpTenderEvalEleService gpTenderEvalEleService = new GpTenderEvalEleService(); var result = gpTenderEvalEleService.FindListByGsIdAndGteeName(gptp.gpId, string.Empty); using (DocX document = DocX.Create(path)) { //标题 document.InsertParagraph("《评分点》").FontSize(18d).Bold().SpacingAfter(50d).Alignment = Alignment.center; var t = document.AddTable(result.Count() + 1, 11); t.Design = TableDesign.ColorfulList; t.Alignment = Alignment.center; //标题 t.Rows[0].Cells[0].Paragraphs[0].Append("评标因素名称"); t.Rows[0].Cells[1].Paragraphs[0].Append("评标因素单位"); t.Rows[0].Cells[2].Paragraphs[0].Append("评标因素数值"); t.Rows[0].Cells[3].Paragraphs[0].Append("评标因素数值梯度"); t.Rows[0].Cells[4].Paragraphs[0].Append("基准分数最大值"); t.Rows[0].Cells[5].Paragraphs[0].Append("基准分数最小值"); t.Rows[0].Cells[6].Paragraphs[0].Append("基准"); t.Rows[0].Cells[7].Paragraphs[0].Append("大于基准算法"); t.Rows[0].Cells[8].Paragraphs[0].Append("大于基准梯度值"); t.Rows[0].Cells[9].Paragraphs[0].Append("小于基准算法"); t.Rows[0].Cells[10].Paragraphs[0].Append("小于基准梯度值"); int indexer = 1; foreach (var item in result) { t.Rows[indexer].Cells[0].Paragraphs[0].Append(item.gteeName); t.Rows[indexer].Cells[1].Paragraphs[0].Append(item.evalUnit); t.Rows[indexer].Cells[2].Paragraphs[0].Append(item.evalNum.ToString()); t.Rows[indexer].Cells[3].Paragraphs[0].Append(item.evalGrads.ToString()); t.Rows[indexer].Cells[4].Paragraphs[0].Append(item.maxScore.ToString()); t.Rows[indexer].Cells[5].Paragraphs[0].Append(item.minScore.ToString()); t.Rows[indexer].Cells[6].Paragraphs[0].Append(item.standard.ToString()); t.Rows[indexer].Cells[7].Paragraphs[0].Append(item.greatWay.ToString()); t.Rows[indexer].Cells[8].Paragraphs[0].Append(item.greatNum.ToString()); t.Rows[indexer].Cells[9].Paragraphs[0].Append(item.littleWay.ToString()); t.Rows[indexer].Cells[10].Paragraphs[0].Append(item.littleNum.ToString()); indexer++; } // Insert a new Paragraph into the document. var p = document.InsertParagraph("评分点:"); p.SpacingAfter(10d); // Insert the Table after the Paragraph. p.InsertTableAfterSelf(t); document.Save(); } return(path); }