void ViewRegisterUser(object sender, EventArgs e)
        {
            // Register User and return to page
            var newAttendee = new Attendee
                {
                    FirstName = this.view.FirstName,
                    LastName = this.view.LastName,
                    Age = this.view.Age
                };

            this.view.RegistrationSuccessful = newAttendee.Save();
        }
Exemplo n.º 2
0
        protected void ButtonRegisterClick(object sender, EventArgs e)
        {
            var attendee = new Attendee();

            attendee.FirstName = TextBoxFirstName.Text;
            attendee.LastName = TextBoxLastName.Text;
            attendee.Age = Convert.ToInt32(TextBoxAge.Text);

            var result = attendee.Save();

            this.LabelMessage.Text = result ? "Attendee save sucess..." : "Attendee save failed...";
        }