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