private void btnSearchRec_Click(object sender, EventArgs e) { PersonV2 temp = new PersonV2(); DataSet ds = temp.SearchARecord(txtFirstName.Text, txtLastName.Text); dgvResults.DataSource = ds; dgvResults.DataMember = ds.Tables["PersonV2_Temp"].ToString(); }
public Form1(int intPersonV2_ID) { InitializeComponent(); PersonV2 temp = new PersonV2(); SqlDataReader dr = temp.FindOneRecord(intPersonV2_ID); while (dr.Read()) { txtFName.Text = dr["FName"].ToString(); txtMName.Text = dr["MName"].ToString(); txtLName.Text = dr["LName"].ToString(); txtStreet1.Text = dr["Street1"].ToString(); txtStreet2.Text = dr["Street2"].ToString(); txtCity.Text = dr["City"].ToString(); txtState.Text = dr["State"].ToString(); txtZip.Text = dr["Zip"].ToString(); txtPhone.Text = dr["Phone"].ToString(); txtEmail.Text = dr["Email"].ToString(); lblPersonV2_ID.Text = dr["PersonID"].ToString(); } }