private void dgBoxes_DeleteCommand(object source, DataGridCommandEventArgs e) { int sid = int.Parse(e.Item.Cells[0].Text); try { IncidentBox.Delete(sid); Response.Redirect(this.Page.ResolveUrl("~/Admin/EMailIssueBoxes.aspx")); } catch { lblCantDelete.Text = LocRM.GetString("tIssboxCantDeleted"); divMessage.Visible = true; } }
void rpIssBoxes_ItemCommand(object source, RepeaterCommandEventArgs e) { int bid = -1; bid = int.Parse(e.CommandArgument.ToString()); if (e.CommandName == "Delete") { try { IncidentBox.Delete(bid); } catch { } Response.Redirect("~/Admin/HDMSettings.aspx"); } }