Example #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            PersonV2 contact = new PersonV2();

            contact.FirstName    = txtFirstName.Text;
            contact.MiddleName   = txtMiddleName.Text;
            contact.LastName     = txtLastName.Text;
            contact.Street1      = txtStreet1.Text;
            contact.Street2      = txtStreet2.Text;
            contact.City         = txtCity.Text;
            contact.State        = txtState.Text;
            contact.Zip          = txtZip.Text;
            contact.Phone        = txtPhone.Text;
            contact.Email        = txtEmail.Text;
            contact.CellPhone    = txtCellPhone.Text;
            contact.InstagramURL = txtInstagramURL.Text;

            if (contact.Feedback.Contains("Error:"))
            {
                lblFeedback.Text = contact.Feedback;
            }
            else
            {
                lblFeedback.Text = contact.AddARecord();
            }
        }
Example #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            PersonV2 temp = new PersonV2();
            DataSet  ds   = temp.SearchPersons(txtFirstName.Text, txtLastName.Text);

            dgvTable.DataSource = ds;
            dgvTable.DataMember = ds.Tables["Persons_Temp"].ToString();
        }