protected void btnDeleteLink_Click(Object Sender, ImageClickEventArgs e) { ImageButton oButton = (ImageButton)Sender; oSites.Delete(Int32.Parse(oButton.CommandArgument)); Response.Redirect(Request.Path); }
private void buttonModify_Click(object sender, EventArgs e) { if (listViewSites.SelectedItems.Count == 0) { return; } uint num = Convert.ToUInt32(listViewSites.SelectedItems[0].Text); Site st; if (sites.Get(num, out st)) { SiteSetForm fm = new SiteSetForm(sites, st); if (DialogResult.OK == fm.ShowDialog()) { sites.Delete(num); sites.Add(fm.site); RefreshList(); } } }