//行事件 protected void Grid1_RowCommand(object sender, FineUI.GridCommandEventArgs e) { if (e.CommandName == "Delete") { int id = Convert.ToInt32(Grid1.Rows[e.RowIndex].Values[0]); int flag = operate.DeletePublishByID(id); if (flag >= 1) { Alert.ShowInParent("删除成功"); BindData(); } else { Alert.ShowInParent("删除失败"); } } else if (e.CommandName == "CheckBox1") { int id = Convert.ToInt32(Grid1.Rows[e.RowIndex].Values[0]); FineUI.CheckBoxField checkField = (FineUI.CheckBoxField)Grid1.FindColumn(e.ColumnIndex); bool checkState = checkField.GetCheckedState(e.RowIndex); int a = operate.UpdatePublishByID(id, checkState); if (a > 0) { Alert.ShowInParent("操作成功"); BindData(); } else { Alert.ShowInParent("操作失败"); } } }