/// <summary> /// Helper methods to display information in the Results textbox. /// </summary> private void ResultsClear() { TextBoxResults.Clear(); TextBoxLeadID.Clear(); TextBoxCapturedBy.Clear(); TextBoxCapturedDate.Clear(); TextBoxRegID.Clear(); TextBoxFirstName.Clear(); TextBoxLastName.Clear(); TextBoxTitle.Clear(); TextBoxCompany.Clear(); TextBoxCompany2.Clear(); TextBoxAddress.Clear(); TextBoxAddress2.Clear(); TextBoxAddress3.Clear(); TextBoxCity.Clear(); TextBoxStateCode.Clear(); TextBoxZipCode.Clear(); TextBoxCountryCode.Clear(); TextBoxEmail.Clear(); TextBoxPhone.Clear(); TextBoxPhoneExt.Clear(); TextBoxFax.Clear(); TextBoxNotes.Clear(); dgvDemographics.DataSource = null; }
// Private Functions // ----------------- private void SetMovieSelection(bool clear) { // set/disable next button ButtonNext.Enabled = !clear; if (clear) { PictureBoxMovie.BackgroundImage = null; TextBoxTitle.Clear(); TextBoxCategory.Clear(); TextBoxCost.Clear(); // confirm selectedMovie is null if we're clearing selectedMovie = null; Program.MovieSelection = null; } else { PictureBoxMovie.BackgroundImage = selectedMovie.Poster; TextBoxTitle.Text = selectedMovie.Title; TextBoxCategory.Text = selectedMovie.Genre; TextBoxCost.Text = "$ " + selectedMovie.Price.ToString(); Program.MovieSelection = selectedMovie; } }