protected void SubmitButton_Click(object sender, EventArgs e)
    {
        CAServiceClient cas = new CAServiceClient();
        PersonLite      pl  = new PersonLite();

        pl.LastName  = lastnameTextBox.Text;
        pl.FirstName = firstnameTextBox.Text;
        pl.Email     = EmailTextBox.Text;
        pl.Apartment = ApartmentTextBox.Text;
        pl.Street    = StreetTextBox.Text;
        pl.City      = CityTextBox.Text;
        pl.State     = StateTextBox.Text;
        pl.ZipCode   = ZipTextBox.Text;
        pl.HomePhone = HomeTextBox.Text;
        pl.WorkPhone = WorkTextBox.Text;
        pl.Password  = PasswordTextBox.Text;
        bool result = cas.RegisterPerson(pl);

        if (result)
        {
            ResultLabel.Text = "You are Registered";
        }
        else
        {
            ResultLabel.Text = "Something went wrong";
        }
    }
示例#2
0
    protected void RegisterButton_Click(object sender, EventArgs e)
    {
        CAServiceClient cas = new CAServiceClient();
        PersonLite      pl  = new PersonLite();

        pl.LastName  = LastNameTextBox.Text;
        pl.FirstName = FirstNameTextBox.Text;
        pl.Email     = EmailTextBox.Text;
        pl.Apartment = AptTextBox.Text;
        pl.Street    = StreetTextBox.Text;
        pl.City      = CityTextBox.Text;
        pl.State     = StateTextBox.Text;
        pl.HomePhone = HomePhoneTextBox.Text;
        pl.WorkPhone = WorkPhoneTextBox.Text;
        pl.Password  = NewPassTextBox.Text;
        bool result = cas.RegisterPerson(pl);

        if (result)
        {
            ResultLabel.Text = "Registration Successful";
        }
        else
        {
            ResultLabel.Text = "Registration Failed";
        }
    }