예제 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.grdData.CurrentRow != null)
            {
                DialogResult result = MetroMessageBox.Show(this, "确定要删除吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                if (result == DialogResult.OK)
                {
                    gpEvalWayItemGtfWebDO obj = this.grdData.CurrentRow.Tag as gpEvalWayItemGtfWebDO;

                    if (this.gpEvalwayItemGtfService.Remove(obj.gewigId))
                    {
                        this.grdData.Rows.Remove(this.grdData.CurrentRow);
                    }
                    else
                    {
                        MetroMessageBox.Show(this, "删除失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
            else
            {
                MetroMessageBox.Show(this, "请选择要删除的评标条款!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
        /// <summary>
        /// Update
        /// </summary>
        /// <param name="gpEvalWayItemGtf">gpEvalWayItemGtf</param>
        /// <returns>bool</returns>
        public bool Update(gpEvalWayItemGtfWebDO gpEvalWayItemGtf)
        {
            if (gpEvalWayItemGtf == null)
            {
                throw new ArgumentNullException(nameof(gpEvalWayItemGtf));
            }

            return(this.wsAgent.edit(gpEvalWayItemGtf).success);
        }
예제 #3
0
        public BidEvalClauseForm(IGpEvalwayItemGtfService gpEvalwayItemGtfService, string projectId, string sectionId, gpEvalWayItemGtfWebDO gpEvalWayItemGtf)
        {
            InitializeComponent();

            List <ComboBoxDataSource> lstType = new List <ComboBoxDataSource>();

            lstType.Add(new ComboBoxDataSource()
            {
                Text = "符合性", Value = 0
            });
            lstType.Add(new ComboBoxDataSource()
            {
                Text = "评分", Value = 1
            });
            this.cboType.DataSource    = lstType;
            this.cboType.DisplayMember = "Text";
            this.cboType.ValueMember   = "Value";

            List <ComboBoxDataSource> lstIsNeed = new List <ComboBoxDataSource>();

            lstIsNeed.Add(new ComboBoxDataSource()
            {
                Text = "不需要", Value = 0
            });
            lstIsNeed.Add(new ComboBoxDataSource()
            {
                Text = "需要", Value = 1
            });
            this.cboIsNeedFirstPara.DataSource    = lstIsNeed;
            this.cboIsNeedFirstPara.DisplayMember = "Text";
            this.cboIsNeedFirstPara.ValueMember   = "Value";

            this.cboIsNeedSecondPara.DataSource    = new List <ComboBoxDataSource>(lstIsNeed);
            this.cboIsNeedSecondPara.DisplayMember = "Text";
            this.cboIsNeedSecondPara.ValueMember   = "Value";

            this.gpEvalwayItemGtfService = gpEvalwayItemGtfService;
            this.projectId        = projectId;
            this.sectionId        = sectionId;
            this.gpEvalWayItemGtf = gpEvalWayItemGtf;

            if (gpEvalWayItemGtf != null)
            {
                this.txtName.Text                      = gpEvalWayItemGtf.gewigName;
                this.cboType.SelectedValue             = gpEvalWayItemGtf.gewigType;
                this.txtMaxScore.Text                  = gpEvalWayItemGtf.maxScore.ToString();
                this.txtMinScore.Text                  = gpEvalWayItemGtf.minScore.ToString();
                this.cboIsNeedFirstPara.SelectedValue  = gpEvalWayItemGtf.isNeedFirstPara;
                this.txtFirstParaDesc.Text             = gpEvalWayItemGtf.firstParaDesc;
                this.cboIsNeedSecondPara.SelectedValue = gpEvalWayItemGtf.isNeedSecondPara;
                this.txtSecondParaDesc.Text            = gpEvalWayItemGtf.secondParaDesc;
                this.txtAlgoName.Text                  = gpEvalWayItemGtf.algoName;
                this.txtSort.Text                      = gpEvalWayItemGtf.sort.ToString();
                this.txtRemark.Text                    = gpEvalWayItemGtf.remark;
            }
        }
예제 #4
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (this.grdData.CurrentRow != null)
            {
                gpEvalWayItemGtfWebDO obj = this.grdData.CurrentRow.Tag as gpEvalWayItemGtfWebDO;

                BidEvalClauseForm frm = new BidEvalClauseForm(this.gpEvalwayItemGtfService, this.projectId, obj.gsId, obj);
                frm.Text = "编辑评标条款";

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    this.LoadData();
                }

                frm.Dispose();
            }
            else
            {
                MetroMessageBox.Show(this, "请选择要编辑的评标条款!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
예제 #5
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);
            }
        }