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_JBTWO model = new NCPEP.Model.T_JBTWO(); NCPEP.Bll.T_JBTWO bll = new NCPEP.Bll.T_JBTWO(); 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, "一次竞标完成", "jbtwo.aspx"); } }
//二次竞价开始设置 protected void btnerci_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_Bid model = new NCPEP.Model.T_Bid(); NCPEP.Bll.T_Bid bll = new NCPEP.Bll.T_Bid(); model = bll.GetModel(int.Parse(sysID)); if (model != null) { if (model.Jbzt == "1") { MessageBox.Show(this, "一次竞标已经开始不用重复设置!"); return; } } Response.Redirect("jbtwo-addtwo.aspx?id=" + sysID + ""); } }
/// <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 DepaStatus='3' and StandardMode='3'"); NCPEP.Bll.T_Bid bll = new NCPEP.Bll.T_Bid(); this.pg.RecordCount = bll.GetRecordCount(sb.ToString()); this.pg.PageSize = 12; this.pg.UrlPageIndexName = "pg"; if (!string.IsNullOrEmpty(hdpage.Value) && hdpage.Value != "1") { pg.CurrentPageIndex = int.Parse(hdpage.Value); } int sindex = (this.pg.CurrentPageIndex - 1) * this.pg.PageSize + 1; int eindex = this.pg.CurrentPageIndex * this.pg.PageSize; DataSet ds = bll.GetListByPage(sb.ToString(), "id desc", sindex, eindex); //DataSet ds = bll.GetList(this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex, sb.ToString()); this.rep.DataSource = ds; this.rep.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["id"] != null) { NCPEP.Model.T_XMGG model = new NCPEP.Model.T_XMGG(); NCPEP.Bll.T_XMGG bll = new NCPEP.Bll.T_XMGG(); model = bll.GetModel(int.Parse(Request.QueryString["id"])); if (model != null) { this.lbxmmc.Text = model.bid.ToString(); NCPEP.Model.T_Bid modelb = new NCPEP.Model.T_Bid(); NCPEP.Bll.T_Bid bllb = new NCPEP.Bll.T_Bid(); modelb = bllb.GetModel(model.bid); this.lbxmmc.Text = modelb.BidName; this.txtNewsTitle.Text = model.xmtitle; this.txtsj.Text = model.xmsj; this.lbconten.Text = model.xmneirong; } } } }