protected void SubmitButton_Click(object sender, EventArgs e) { string user = UserTextBox.Text; string first = FirstNameTextBox.Text; string last = LastNameTextBox.Text; string email = EmailTextBox.Text; string password = ConfirmTextBox.Text; BookRevReference.BookReviewServiceClient sc = new BookRevReference.BookReviewServiceClient(); BookRevReference.Reviewer rev = new BookRevReference.Reviewer(); rev.ReviewerUserName = user; rev.ReviewerLastName = last; rev.ReviewerFirstName = first; rev.ReviewerEmail = email; rev.ReviewPlainPassword = password; bool result = sc.RegisterReviewer(rev); if (result) { Response.Redirect("Default.aspx"); } else { ErrorLabel.Text = "Something went horribly wrong"; } }
protected void SubmitButton_Click(object sender, EventArgs e) { BookRevReference.BookReviewServiceClient sc = new BookRevReference.BookReviewServiceClient(); int result = sc.Login(UserTextBox.Text, PasswordTextBox.Text); if (result != 0) { Session["userKey"] = result; ResultLabel.Text = "Welcome" + result.ToString(); } else { ResultLabel.Text = "Invaild login"; } }