//保存 protected void Button1_Click(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { NCPEP.Model.T_Bid model = new NCPEP.Model.T_Bid(); NCPEP.Dal.T_Bid dal = new NCPEP.Dal.T_Bid(); model = dal.GetModel(int.Parse(Request.QueryString["id"])); model.Jbjzsj = System.DateTime.Now.AddMinutes(double.Parse(this.ddljjsj.SelectedValue)).ToString(); model.Jbqbj = this.txtjjdj.Text; model.Jbzt = "3"; if (dal.Update(model)) { MessageBox.ShowAndRedirect(this, "设置成功", "jbtwo.aspx"); } else { MessageBox.Show(this, "设置失败"); } } }
//protected void BindDll() //{ // NCPEP.Bll.T_NewsType bll = new NCPEP.Bll.T_NewsType(); // DataTable dt = bll.GetAllList().Tables[0]; // this.ddlxwlx.DataSource = dt; // this.ddlxwlx.DataTextField = "NewsTypeName"; // this.ddlxwlx.DataValueField = "Id"; // this.ddlxwlx.DataBind(); // this.ddlxwlx.Items.Insert(0, new ListItem("请选择")); //} /// <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' and jbzt='1' or jbzt='3'"); if (model.JBYhm != null) { sb.Append(" and jbyhm='" + model.JBYhm + "'"); } NCPEP.Dal.T_Bid bll = new NCPEP.Dal.T_Bid(); this.pg.RecordCount = bll.GetRecordCountByUser(sb.ToString()); this.pg.PageSize = 10; 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.GetListByPageByUser(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(); }