예제 #1
0
        private void DownloadBidFile()
        {
            try
            {
                FolderBrowserDialog fbdl = new FolderBrowserDialog();
                if (fbdl.ShowDialog() == DialogResult.OK)
                {
                    baseUserWebDO loginResponse = Cache.GetInstance().GetValue <baseUserWebDO>("login");
                    bool          result        = gpTenderFileService.DownloadFile(fbdl.SelectedPath, this.gptp.gtpId, this.gptp.gpId, loginResponse.auID);

                    if (result)
                    {
                        MetroMessageBox.Show(this, "下载成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpTemplateWebDO gpTemplate = new gpTemplateWebDO();
                gpTemplate.gtName           = this.txtName.Text.Trim();
                gpTemplate.gtType           = (int)this.cboType.SelectedValue;
                gpTemplate.gtTypeSpecified  = true;
                gpTemplate.gtGroup          = (int)this.cboProjectType.SelectedValue;
                gpTemplate.gtGroupSpecified = true;
                gpTemplate.remark           = this.txtRemark.Text.Trim();
                gpTemplate.adtId            = user.auID;
                gpTemplate.adtCoId          = user.acId;
                gpTemplate.adtTime          = DateTime.Now;

                if (gpTemplateService.Add(gpTemplate))
                {
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    MetroFramework.MetroMessageBox.Show(this, "新建模板失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroFramework.MetroMessageBox.Show(this, "新建模板失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpTfOperationWebDO gptfo = gpTfOperationService.FindById(this.gtoId);

                gptfo.gtoContent    = this.txtContent.Text.Trim();
                gptfo.gtoAnswerId   = user.auID;
                gptfo.gtoAnswerCoId = user.acId;
                gptfo.gtoAnswerTime = DateTime.Now;

                if (gpTfOperationService.ReplayQuestion(gptfo))
                {
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    MetroMessageBox.Show(this, "操作失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "操作失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #4
0
        private void UploadBidFile()
        {
            try
            {
                string sourcePath = AppDirectory.Temp_Dir(this.gptp.gpId);
                string destPath   = Path.Combine(AppDirectory.Temp(), this.gptp.gpId + ".zip");

                Compress.CreateZipFile(sourcePath, destPath);

                baseUserWebDO loginResponse = Cache.GetInstance().GetValue <baseUserWebDO>("login");
                bool          result        = gpTenderFileService.UploadFile(destPath, loginResponse.auID, this.gptp.gtpId, this.gptp.gpId);

                if (result)
                {
                    MetroMessageBox.Show(this, "上传成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MetroMessageBox.Show(this, "上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "上传失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public void LoadData()
        {
            this.grdITender.Rows.Clear();
            baseUserWebDO loginResponse = Cache.GetInstance().GetValue <baseUserWebDO>("login");
            var           result        = gpTenderProjectService.FindList(loginResponse.auID);

            this.SetGridData(result);
        }
예제 #6
0
        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);
            }
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpEvalResultWebDO gpEvalResult = new gpEvalResultWebDO();
                gpEvalResult.gtpId           = gpApplyDetail.gtpId;
                gpEvalResult.gsId            = gpApplyDetail.gsId;
                gpEvalResult.gadBidPersonId  = gpApplyDetail.gadBidPersonId;
                gpEvalResult.gadBidCompanyId = gpApplyDetail.gadBidCompanyId;

                gpTenderEvalEleWebDO[] gpTenderEvalEles = gpTenderEvalEleService.FindListByGsIdAndGteeName(gpApplyDetail.gsId, "");

                gpEvalResult.gteeId             = gpTenderEvalEles[0].gteeId;
                gpEvalResult.gteeName           = this.txtGsewiName.Text.Trim();
                gpEvalResult.gerResult          = int.Parse(this.txtGerResult.Text.Trim());
                gpEvalResult.gerResultSpecified = true;
                gpEvalResult.gerScores          = double.Parse(this.txtGerScores.Text.Trim());
                gpEvalResult.gerScoresSpecified = true;
                gpEvalResult.remark             = this.txtRemark.Text.Trim();
                gpEvalResult.gerPersonId        = user.auID;
                gpEvalResult.gerCompanyId       = user.acId;
                gpEvalResult.gerTime            = DateTime.Now;
                gpEvalResult.gerTimeSpecified   = true;
                gpEvalResult.optId            = user.auID;
                gpEvalResult.optCoId          = user.acId;
                gpEvalResult.optTime          = DateTime.Now;
                gpEvalResult.optTimeSpecified = true;
                gpEvalResult.gadId            = "bc288829-9bcd-45fd-b487-be1a10c2267f";
                gpEvalResult.gewtId           = 0;
                gpEvalResult.gewtIdSpecified  = true;

                if (this.gpEvalResultService.Add(gpEvalResult))
                {
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    MetroFramework.MetroMessageBox.Show(this, "评分失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroFramework.MetroMessageBox.Show(this, "评分失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #8
0
        private void btnSummit_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.grdTemplate.CurrentRow != null)
                {
                    gpTemplateWebDO  gpt  = this.grdTemplate.CurrentRow.Tag as gpTemplateWebDO;
                    GenerateDocument gd   = new GenerateDocument();
                    string           path = gd.GenerateBidTemplateDocument(gpt);

                    using (FileStream fs = File.OpenRead(path))
                    {
                        string fileName  = Path.GetFileNameWithoutExtension(path);
                        string extension = Path.GetExtension(path);

                        byte[] bytes = new byte[fs.Length];
                        fs.Read(bytes, 0, bytes.Length);

                        baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                        bool result = this.gpTemplateService.FileUpload(gpt.gtId, user.auID, fileName, extension, bytes.Length, 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 (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "提交失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #9
0
        /// <summary>
        /// LoadData
        /// </summary>
        public void LoadData()
        {
            this.grdTemplate.Rows.Clear();
            baseUserWebDO loginResponse = Cache.GetInstance().GetValue <baseUserWebDO>("login");
            var           result        = gpTemplateService.FindListByAuIdAndName(loginResponse.auID, this.txtName.Text.Trim(), (int)this.cboState.SelectedValue);

            //升序
            foreach (var item in result.OrderBy(x => x.sort))
            {
                DataGridViewRow row = new DataGridViewRow();
                row.CreateCells(this.grdTemplate);
                row.Cells[this.colTemplateId.Index].Value          = item.gtId;
                row.Cells[this.colTemplateCode.Index].Value        = item.gtCode;
                row.Cells[this.colTempleName.Index].Value          = item.gtName;
                row.Cells[this.colTemplateType.Index].Value        = item.gtType;
                row.Cells[this.colTemplateProjectType.Index].Value = item.gtGroup;
                row.Cells[this.colTemplateDescription.Index].Value = item.remark;
                row.Cells[this.colTemplateCreateDate.Index].Value  = item.adtTime;
                row.Cells[this.colTemplateState.Index].Value       = item.fileMakeState;
                row.Tag = item;

                this.grdTemplate.Rows.Add(row);
            }
        }
        private void btnSummit_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpBidFileOrgWebDO obj = null;

                //修改
                if (this.gpBidFileOrg != null)
                {
                    obj         = this.gpBidFileOrg;
                    obj.optId   = user.auID;
                    obj.optCoId = user.acId;
                    obj.optTime = DateTime.Now;
                }
                else //新增
                {
                    obj           = new gpBidFileOrgWebDO();
                    obj.projectId = this.projectId;
                    obj.sectionId = this.sectionId;
                    obj.adtId     = user.auID;
                    obj.adtCoId   = user.acId;
                    obj.adtTime   = DateTime.Now;
                }

                obj.bbfoName        = this.txtName.Text.Trim();
                obj.isMust          = (int)this.cboIsMust.SelectedValue;
                obj.isMustSpecified = true;
                obj.sort            = int.Parse(this.txtSort.Text);
                obj.sortSpecified   = true;

                //修改
                if (this.gpBidFileOrg != null)
                {
                    if (this.gpBidFileOrgService.Update(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroFramework.MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else //新增
                {
                    if (this.gpBidFileOrgService.Add(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #11
0
        private void btnSummit_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpTenderEvalEleWebDO obj = null;

                //修改
                if (this.gpTenderEvalEle != null)
                {
                    obj         = this.gpTenderEvalEle;
                    obj.optId   = user.auID;
                    obj.optCoId = user.acId;
                    obj.optTime = DateTime.Now;
                }
                else //新增
                {
                    obj         = new gpTenderEvalEleWebDO();
                    obj.gtpId   = this.projectId;
                    obj.gsId    = this.sectionId;
                    obj.adtId   = user.auID;
                    obj.adtCoId = user.acId;
                    obj.adtTime = DateTime.Now;
                }

                obj.gteeName           = this.txtName.Text.Trim();
                obj.evalUnit           = this.txtUnit.Text.Trim();
                obj.evalNum            = decimal.Parse(this.txtNum.Text);
                obj.evalNumSpecified   = true;
                obj.evalGrads          = decimal.Parse(this.txtGrads.Text);
                obj.evalGradsSpecified = true;
                obj.maxScore           = decimal.Parse(this.txtMaxScore.Text);
                obj.maxScoreSpecified  = true;
                obj.minScore           = decimal.Parse(this.txtMinScore.Text);
                obj.minScoreSpecified  = true;
                obj.standard           = decimal.Parse(this.txtStandard.Text);
                obj.standardSpecified  = true;
                obj.greatWay           = int.Parse(this.txtGreatWay.Text);
                obj.greatWaySpecified  = true;
                obj.greatNum           = int.Parse(this.txtGreatNum.Text);
                obj.greatNumSpecified  = true;
                obj.littleWay          = int.Parse(this.txtLittleWay.Text);
                obj.littleWaySpecified = true;
                obj.littleNum          = int.Parse(this.txtLittleNum.Text);
                obj.littleNumSpecified = true;
                obj.canDel             = (int)this.cboCanDelete.SelectedValue;
                obj.canDelSpecified    = true;

                //修改
                if (this.gpTenderEvalEle != null)
                {
                    if (this.gpTenderEvalEleService.Update(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroFramework.MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else //新增
                {
                    if (this.gpTenderEvalEleService.Add(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #12
0
        private void btnSummit_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpEvalWayItemGtfWebDO obj = null;

                //修改
                if (this.gpEvalWayItemGtf != null)
                {
                    obj         = this.gpEvalWayItemGtf;
                    obj.optId   = user.auID;
                    obj.optCoId = user.acId;
                    obj.optTime = DateTime.Now;
                }
                else //新增
                {
                    obj         = new gpEvalWayItemGtfWebDO();
                    obj.gsId    = this.sectionId;
                    obj.adtId   = user.auID;
                    obj.adtCoId = user.acId;
                    obj.adtTime = DateTime.Now;
                }

                obj.gewigName                 = this.txtName.Text.Trim();
                obj.gewigType                 = (int)this.cboType.SelectedValue;
                obj.gewigTypeSpecified        = true;
                obj.maxScore                  = decimal.Parse(this.txtMaxScore.Text);
                obj.maxScoreSpecified         = true;
                obj.minScore                  = decimal.Parse(this.txtMinScore.Text);
                obj.minScoreSpecified         = true;
                obj.isNeedFirstPara           = (int)this.cboIsNeedFirstPara.SelectedValue;
                obj.isNeedFirstParaSpecified  = true;
                obj.firstParaDesc             = this.txtFirstParaDesc.Text;
                obj.isNeedSecondPara          = (int)this.cboIsNeedSecondPara.SelectedValue;
                obj.isNeedSecondParaSpecified = true;
                obj.secondParaDesc            = this.txtSecondParaDesc.Text;
                obj.algoName                  = this.txtAlgoName.Text;
                obj.sort          = int.Parse(this.txtSort.Text);
                obj.sortSpecified = true;
                obj.remark        = this.txtRemark.Text;

                //修改
                if (this.gpEvalWayItemGtf != null)
                {
                    if (this.gpEvalwayItemGtfService.Update(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroFramework.MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else //新增
                {
                    if (this.gpEvalwayItemGtfService.Add(obj))
                    {
                        this.DialogResult = DialogResult.OK;
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                baseUserWebDO user = Cache.GetInstance().GetValue <baseUserWebDO>("login");

                gpTemplateNodeWebDO gptn = null;

                //修改
                if (this.gptnParentId == -1)
                {
                    gptn         = this.trvTemplateNode.SelectedNode.Tag as gpTemplateNodeWebDO;
                    gptn.optId   = user.auID;
                    gptn.optCoId = user.acId;
                    gptn.optTime = DateTime.Now;
                }
                else //新增
                {
                    gptn                 = new gpTemplateNodeWebDO();
                    gptn.gtId            = gptId;
                    gptn.gtnPid          = this.gptnParentId;
                    gptn.gtnPidSpecified = true;
                    gptn.adtId           = user.auID;
                    gptn.adtCoId         = user.acId;
                    gptn.adtTime         = DateTime.Now;
                }

                gptn.gtnName                 = this.txtName.Text.Trim();
                gptn.gtnFileName             = this.txtFileName.Text.Trim();
                gptn.gtnFiletype             = (int)this.cboProjectType.SelectedValue;
                gptn.gtnFiletypeSpecified    = true;
                gptn.editState               = (int)this.cboCanModify.SelectedValue;
                gptn.editStateSpecified      = true;
                gptn.delState                = (int)this.cboCanDelete.SelectedValue;
                gptn.delStateSpecified       = true;
                gptn.gtnAttr                 = (int)this.cboProperty.SelectedValue;
                gptn.gtnAttrSpecified        = true;
                gptn.gtnDocType              = (int)this.cboDocumentType.SelectedValue;
                gptn.gtnDocTypeSpecified     = true;
                gptn.bossEditState           = (int)this.cboCanModifyManage.SelectedValue;
                gptn.bossEditStateSpecified  = true;
                gptn.carryState              = (int)this.cboClient.SelectedValue;
                gptn.carryStateSpecified     = true;
                gptn.biderEditState          = (int)this.cboCanModifyITender.SelectedValue;
                gptn.biderEditStateSpecified = true;
                gptn.sort          = int.Parse(this.txtSort.Text.Trim());
                gptn.sortSpecified = true;

                //修改
                if (this.gptnParentId == -1)
                {
                    if (this.gpTemplateNodeService.Update(gptn))
                    {
                        this.LoadTree();
                    }
                    else
                    {
                        MetroFramework.MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else //新增
                {
                    if (this.gpTemplateNodeService.Add(gptn))
                    {
                        this.gptnParentId = -1;
                        this.LoadTree();
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Error(ex);
                MetroMessageBox.Show(this, "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }