protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { int rowIndex = e.RowIndex; Warehouse warehouse = new Warehouse(); warehouse.Warehouse_id = Convert.ToInt32(this.GridView1.DataKeys[rowIndex].Value); WarehouseProvider provider = new WarehouseProvider(); if (provider.Delete(warehouse)) { this.Alert("删除成功!!!"); this.ListPager1.RecordCount = this.ListPager1.RecordCount - 1; this.BindSource(); } }