protected void delete_xml(object sender, EventArgs e) { MMServiceReference1.Service1Client prox = new MMServiceReference1.Service1Client(); if (DropDownList1.SelectedItem.Text == "Member") { if (prox.deleteUser("member.xml", Email.Text)) { ErrorCodes.Text = "Account Deleted"; } else { ErrorCodes.Text = "Account Not Found"; } } else if (DropDownList1.SelectedItem.Text == "Staff") { if (prox.deleteUser("staff.xml", Email.Text)) { ErrorCodes.Text = "Account Deleted"; } else { ErrorCodes.Text = "Account Not Found"; } } }
protected void DoRegister(object sender, EventArgs e) { MMServiceReference1.Service1Client prox = new MMServiceReference1.Service1Client(); string Fname = FirstName.Text; string Lname = LastName.Text; string pass1 = PassWord1.Text; string pass2 = PassWord2.Text; string email = Email.Text; Captcha1.ValidateCaptcha(txtCaptcha.Text.Trim()); if (pass1 == pass2 && Captcha1.UserValidated) { string encryptedPass = prox.Encryption(pass1); string fullString = Fname + "," + Lname + "," + email + "," + encryptedPass; if (prox.write2XML("member.xml", fullString)) { PassResponse.Text = "Account Created"; } else { PassResponse.Text = "Account Not Created"; } } else { PassResponse.Text = "Passwords do not match."; } }
protected void add_xml(object sender, EventArgs e) { MMServiceReference1.Service1Client prox = new MMServiceReference1.Service1Client(); string Fname = FirstName.Text; string Lname = LastName.Text; string pass1 = PassWord.Text; string email = Email.Text; if (DropDownList1.SelectedItem.Text == "Staff") { string encryptedPass = prox.Encryption(pass1); string fullString = Fname + "," + Lname + "," + email + "," + encryptedPass; if (prox.write2XML("staff.xml", fullString)) { ErrorCodes.Text = "Admin Created"; } else { ErrorCodes.Text = "Admin Not Created"; } } if (DropDownList1.SelectedItem.Text == "Member") { string encryptedPass = prox.Encryption(pass1); string fullString = Fname + "," + Lname + "," + email + "," + encryptedPass; if (prox.write2XML("member.xml", fullString)) { ErrorCodes.Text = "member Created"; } else { ErrorCodes.Text = "member Not Created"; } } }