Esempio n. 1
0
        private void lbxresults_selectionchanged(object sender, SelectionChangedEventArgs e)
        {
            //Checking there is an item in our list box
            if (lbxExistingMembers.SelectedIndex > -1)
            {
                string strSelectedName = lbxExistingMembers.SelectedItem.ToString();

                List <MembersInformation> filteredMembers;

                //Query that selects the members information chosen by the user
                filteredMembers = memberIndex.Where(m =>
                                                    (m.LastName + ", " + m.FirstName + ", (" + m.Email + ")") == strSelectedName).ToList();

                foreach (MembersInformation m in filteredMembers)
                {
                    //Pulling the information of the existing user to pull to the next window
                    MembersInformation info = new MembersInformation(m.Type, m.FirstName.ToUpper(), m.LastName.ToUpper(), m.StartDate, m.EndDate, m.SubTotal, m.Additional_Features_Training, m.Additional_Features_LockerRental, m.TotalCost, m.PhoneNumber, m.Email, m.Gender, m.Age, m.Weight, m.Credit_Card_Type, m.Credit_Card_Number, m.PFG_AthleticPerformance, m.PFG_OverallHealth, m.PFG_StrengthTraining, m.PFG_WeightLoss, m.PFG_WeightManagment);

                    MembershipRegistration next = new MembershipRegistration(info, quote);

                    next.Show();

                    this.Close();
                }
            }
        }
Esempio n. 2
0
        //User selects approve quote button
        private void btnApprove_Click(object sender, RoutedEventArgs e)
        {
            //Validate that all needed content for the quote was displayed to the user prior to allowing the user to proceed with the registration process
            if (lblMemTypeResult.Content == "" || lblStartDate.Content == "" || lblEndDateResult.Content == "" || lblSubtotalResult.Content == "" || lblTotalResult.Content == "")
            {
                MessageBox.Show("A quote has not been fully generated. A full quote must be provided before approving the quote. Please ensure you have pressed the generate quote button prior to selecting the approve button.");
                return;
            }
            //If the quote was properly generated, open the window for membership registration and pass in the needed information from the quote
            MembershipRegistration MembershipRegistrationWindow = new MembershipRegistration(quote);

            MembershipRegistrationWindow.Show();
            this.Close();
        }