// Checks if the account exists in Accounts.xml. protected void accountExists(object sender, EventArgs e) { ServiceReference1.myInterfaceClient myPxy = new ServiceReference1.myInterfaceClient(); if (myPxy.AccountExists(AccountOwner.Text)) { myPxy.Close(); Status.Text = "Account exists"; return; } myPxy.Close(); Status.Text = "Account does not exist"; }
// Deletes the account information from Accounts.xml. protected void deleteAccount(object sender, EventArgs e) { ServiceReference1.myInterfaceClient myPxy = new ServiceReference1.myInterfaceClient(); if (myPxy.AccountExists(AccountOwner.Text)) { if (myPxy.DeleteAccount(AccountOwner.Text)) { myPxy.Close(); Status.Text = "Account deletion: Successful"; return; } } myPxy.Close(); Status.Text = "Account deletion: Unsuccessful"; }