private void SaveNewSponsor_Click(object sender, RoutedEventArgs e) { if (gridMatches.Items.Count > 0 && MessageBox.Show("Have you verified that none of the existing\nentries to the right correspond to this customer?", "Create New Sponsor", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) { return; } if (!Fields.ValidateAll()) { MessageBox.Show("Please enter all required fields before submitting.", "Create New Sponsor", MessageBoxButton.OK, MessageBoxImage.Hand); return; } using (Proc Sponsor_New = new Proc("Sponsor_New")) { Sponsor_New["@SponsorSSN"] = Fields.SponsorSSN; Sponsor_New["@SponsorLastName"] = Fields.SponsorLastName; Sponsor_New["@SponsorFirstName"] = Fields.SponsorFirstName; Sponsor_New["@SponsorMI"] = Fields.SponsorMI; Sponsor_New["@SponsorSuffix"] = Fields.SponsorSuffix; Sponsor_New["@SponsorEmail"] = Fields.SponsorEmail; Sponsor_New["@SpouseSSN"] = Fields.SpouseSSN; Sponsor_New["@SpouseLastName"] = Fields.SpouseLastName; Sponsor_New["@SpouseFirstName"] = Fields.SpouseFirstName; Sponsor_New["@SpouseMI"] = Fields.SpouseMI; Sponsor_New["@SpouseSuffix"] = Fields.SpouseSuffix; Sponsor_New["@SpouseEmail"] = Fields.SpouseEmail; Sponsor_New["@DutyPhone"] = Fields.DutyPhone; Sponsor_New["@DutyLocation"] = Fields.DutyLocation; Sponsor_New["@RankCode"] = Fields.RankCode; Sponsor_New["@DEROS"] = Fields.DEROS; Sponsor_New["@PersonalPhoneCountry"] = Fields.PersonalPhoneCountry; Sponsor_New["@PersonalPhoneNumber"] = Fields.PersonalPhoneNumber; Sponsor_New["@OfficialMailLine1"] = Fields.OfficialMailLine1; Sponsor_New["@OfficialMailCMR"] = Fields.OfficialMailCMR; Sponsor_New["@OfficialMailBox"] = Fields.OfficialMailBox; Sponsor_New["@OfficialMailCity"] = Fields.OfficialMailCity; Sponsor_New["@OfficialMailState"] = Fields.OfficialMailState; Sponsor_New["@OfficialMailZip"] = Fields.OfficialMailZip; Sponsor_New["@HomeStreet"] = Fields.HostAddrStreet; Sponsor_New["@HomeNumber"] = Fields.HostAddrNumber; Sponsor_New["@HomeCity"] = Fields.HostAddrCity; Sponsor_New["@HomePostal"] = Fields.HostAddrPostal; if (Sponsor_New.ExecuteNonQuery(BusinessBase.ShowUserMessage, "New Sponsor: ", true)) { Fields = new DataFields(); RoutedCommands.OpenSponsor.Execute(Sponsor_New["@SponsorGUID"], null); } } }
public tabNewCustWiz() { InitializeComponent(); #if DEBUG btnTestFill.Visibility = System.Windows.Visibility.Visible; #endif Fields = new DataFields(); iTRAACHelpers.WPFDataGrid_Standard_Behavior(gridMatches); gridMatches.ItemsSource = PotentialMatches.DefaultView; InitializePotentialMatchesGridGrouping(); using (Proc Ranks_s = new Proc("Ranks_s")) cbxRank.ItemsSource = Ranks_s.ExecuteDataTable().DefaultView; txtSponsorSSN1.Focus(); }
private void ClearAllFields_Click(object sender, RoutedEventArgs e) { Fields = new DataFields(); PotentialMatches.Clear(); }
private void SaveNewSponsor_Click(object sender, RoutedEventArgs e) { if (gridMatches.Items.Count > 0 && MessageBox.Show("Have you verified that none of the existing\nentries to the right correspond to this customer?", "Create New Sponsor", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No) return; if (!Fields.ValidateAll()) { MessageBox.Show("Please enter all required fields before submitting.", "Create New Sponsor", MessageBoxButton.OK, MessageBoxImage.Hand); return; } using (Proc Sponsor_New = new Proc("Sponsor_New")) { Sponsor_New["@SponsorSSN"] = Fields.SponsorSSN; Sponsor_New["@SponsorLastName"] = Fields.SponsorLastName; Sponsor_New["@SponsorFirstName"] = Fields.SponsorFirstName; Sponsor_New["@SponsorMI"] = Fields.SponsorMI; Sponsor_New["@SponsorSuffix"] = Fields.SponsorSuffix; Sponsor_New["@SponsorEmail"] = Fields.SponsorEmail; Sponsor_New["@SpouseSSN"] = Fields.SpouseSSN; Sponsor_New["@SpouseLastName"] = Fields.SpouseLastName; Sponsor_New["@SpouseFirstName"] = Fields.SpouseFirstName; Sponsor_New["@SpouseMI"] = Fields.SpouseMI; Sponsor_New["@SpouseSuffix"] = Fields.SpouseSuffix; Sponsor_New["@SpouseEmail"] = Fields.SpouseEmail; Sponsor_New["@DutyPhone"] = Fields.DutyPhone; Sponsor_New["@DutyLocation"] = Fields.DutyLocation; Sponsor_New["@RankCode"] = Fields.RankCode; Sponsor_New["@DEROS"] = Fields.DEROS; Sponsor_New["@PersonalPhoneCountry"] = Fields.PersonalPhoneCountry; Sponsor_New["@PersonalPhoneNumber"] = Fields.PersonalPhoneNumber; Sponsor_New["@OfficialMailLine1"] = Fields.OfficialMailLine1; Sponsor_New["@OfficialMailCMR"] = Fields.OfficialMailCMR; Sponsor_New["@OfficialMailBox"] = Fields.OfficialMailBox; Sponsor_New["@OfficialMailCity"] = Fields.OfficialMailCity; Sponsor_New["@OfficialMailState"] = Fields.OfficialMailState; Sponsor_New["@OfficialMailZip"] = Fields.OfficialMailZip; Sponsor_New["@HomeStreet"] = Fields.HostAddrStreet; Sponsor_New["@HomeNumber"] = Fields.HostAddrNumber; Sponsor_New["@HomeCity"] = Fields.HostAddrCity; Sponsor_New["@HomePostal"] = Fields.HostAddrPostal; if (Sponsor_New.ExecuteNonQuery(BusinessBase.ShowUserMessage, "New Sponsor: ", true)) { Fields = new DataFields(); RoutedCommands.OpenSponsor.Execute(Sponsor_New["@SponsorGUID"], null); } } }