protected void btnUpdate_Click(object sender, EventArgs e) { //保存修改到数据库 AreaDal areaDal = new AreaDal(); areaDal.Save(txtSortID.Text, txtAreaCode.Text); JScript.Instance.ShowMessage(UpdatePanel1, "保存数据成功。"); }
private void BindData() { pager.PageSize = PagingSize; AreaDal areaDal = new AreaDal(); string filter = null; if (ViewState["Filter"] != null) filter = ViewState["Filter"].ToString(); pager.RecordCount = areaDal.GetCount(filter); DataTable table = areaDal.GetAll(pageIndex, PagingSize, filter); BindTable2GridView(gvMain, table); }