Beispiel #1
0
        /// <summary>
        /// 初始绑定数据
        /// </summary>
        private void BindDate()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(" 1=1");
            //if (this.ddlxwlx.SelectedValue != "请选择")
            //{
            //    sb.Append(" and NewsTypeId='" + this.ddlxwlx.SelectedValue + "'");
            //}
            //if (!string.IsNullOrEmpty(this.TextBox1.Text))
            //{
            //    sb.Append(" and NewsTitle like '%" + this.TextBox1.Text + "%'");
            //}
            //if (this.DropDownList2.SelectedValue != "全部")
            //{
            //    sb.Append(" and IsCheck='" + this.DropDownList2.SelectedValue + "'");
            //}
            sb.Append(" and bid='" + Request.QueryString["id"] + "' ");
            NCPEP.Bll.T_JBONE bll = new NCPEP.Bll.T_JBONE();

            DataTable dt = bll.GetList(sb.ToString()).Tables[0];

            this.rep.DataSource = dt;
            this.rep.DataBind();
        }
Beispiel #2
0
        protected void btnshenhe_Click(object sender, EventArgs e)
        {
            int    i     = 0;
            string sysID = string.Empty;

            foreach (RepeaterItem row in this.rep.Items)
            {
                if (row.ItemType == ListItemType.Item || row.ItemType == ListItemType.AlternatingItem)
                {
                    CheckBox chk  = (CheckBox)row.FindControl("cbx");
                    Label    lbid = (Label)row.FindControl("lbid");
                    if (chk.Checked)
                    {
                        i++;
                        sysID = lbid.Text;
                    }
                }
            }
            if (i == 0)
            {
                MessageBox.Show(this, "请选择需要竞标的项目!");
            }
            else if (i > 1)
            {
                MessageBox.Show(this, "只能选择一项进行设置");
            }
            else
            {
                NCPEP.Model.T_JBONE model = new NCPEP.Model.T_JBONE();
                NCPEP.Bll.T_JBONE   bll   = new NCPEP.Bll.T_JBONE();
                model      = bll.GetModel(int.Parse(sysID));
                model.zbzt = "1";
                bll.Update(model);
                NCPEP.Model.T_BidTrans modelt = new NCPEP.Model.T_BidTrans();
                NCPEP.Bll.T_BidTrans   bllt   = new NCPEP.Bll.T_BidTrans();
                DataTable dt = bllt.GetList(" FK_BidId='" + Request.QueryString["id"] + "' and FK_LiceTranId='" + model.tid + "'").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    modelt = bllt.GetModel(int.Parse(dt.Rows[0]["id"].ToString()));
                    modelt.TradingStatus = 1;
                    bllt.Update(modelt);
                }
                NCPEP.Bll.T_Bid   bllb   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelb = new NCPEP.Model.T_Bid();
                modelb      = bllb.GetModel(int.Parse(Request.QueryString["id"]));
                modelb.Jbzt = "2";
                bllb.Update(modelb);
                MessageBox.ShowAndRedirect(this, "竞标完成", "jbone.aspx");
            }
        }