protected void GdvLabelList_RowCommand(object sender, CommandEventArgs e) { bool flag = false; switch (e.CommandName) { case "Deleted": if (LabelManage.Delete(e.CommandArgument.ToString())) { AdminPage.WriteSuccessMsg("删除成功", "LabelManage.aspx"); return; } AdminPage.WriteErrMsg("删除失败", "LabelManage.aspx"); return; case "Copy": if (LabelManage.Copy(e.CommandArgument.ToString())) { AdminPage.WriteSuccessMsg("复制成功", "LabelManage.aspx"); return; } AdminPage.WriteErrMsg("复制失败", "LabelManage.aspx"); return; } flag = false; }
protected void BtnDel_Click(object sender, EventArgs e) { if (this.GdvLabelList.SelectList.Length <= 0) { AdminPage.WriteErrMsg("<li>对不起,您还没选择要删除的标签!</li>"); } else if (LabelManage.Delete(this.GdvLabelList.SelectList.ToString())) { this.GdvLabelList.DataBind(); } else { AdminPage.WriteErrMsg("删除失败!"); } }