protected void ImageButtonsave_Click(object sender, EventArgs e) { DLL.Model.repair repair = new DLL.BLL.repair().GetModel(int.Parse(Request.QueryString["parameter"])); repair.ftype = TextBoxftype.Text; repair.result = TextBoxresult.Text; new DLL.BLL.repair().Update(repair); Response.Redirect(ViewState["url"].ToString()); }
protected void Page_Load(object sender, EventArgs e) { String url; if (!IsPostBack) { DataSet ds = new DLL.BLL.repair().GetList("id=" + Request.QueryString["parameter"]); rpteditor.DataSource = ds; rpteditor.DataBind(); DLL.Model.repair repair = new DLL.BLL.repair().GetModel(int.Parse(Request.QueryString["parameter"])); TextBoxftype.Text = repair.ftype; TextBoxresult.Text = repair.result; url = Request.UrlReferrer.ToString(); ViewState["url"] = url; } }
protected void bind() { DataSet ds = new DLL.BLL.repair().GetList("1=1 order by addTime desc"); rptrepair.DataSource = ds; rptrepair.DataBind(); if (ds != null) { if (ds.Tables.Count != 0) { if (ds.Tables[0].Rows.Count < 10) { DataPager1.Visible = false; } } } }