protected void ButtonDelete_Click(object sender, EventArgs e) { if (account.DeleteAccount(int.Parse(lblAccountId.Text))) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "alert", "alert('Account Deleted');document.location.href='Accounts.aspx';", true); } }
void cbi_RemoveMe(object sender, CIEventArgs e) { foreach (var obj in flowLayoutPanel1.Controls.OfType <ConnectionItem>()) { if (obj.Key == e.Key) { flowLayoutPanel1.Controls.Remove(obj); //更新配置文件 AccountManage am = new AccountManage(); am.DeleteAccount(e.Key); } } }