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