protected void grvKeyCatalog_RowDeleting(object sender, GridViewDeleteEventArgs e) { int id = Convert.ToInt32(this.grvKeyCatalog.DataKeys[e.RowIndex].Value.ToString()); QJVRMS.Business.KeyWords obj = new QJVRMS.Business.KeyWords(); obj.Delete(id); this.bindCatalog(); }
protected void rptKey_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { if (e.CommandName.ToLower().Equals("del")) { int id; int.TryParse(e.CommandArgument.ToString(), out id); QJVRMS.Business.KeyWords obj = new QJVRMS.Business.KeyWords(); obj.Delete(id); bind(); } } }