Esempio n. 1
0
        private void button_Click(object sender, RoutedEventArgs e)
        {
            CustomerShow main = new CustomerShow(sessionUserSelectCustomerToView, passedUsername);

            App.Current.MainWindow = main;
            this.Close();
            main.Show();
        }
Esempio n. 2
0
        private void Next_Click(object sender, RoutedEventArgs e)
        {
            int    selectedProfileType = 0;
            string workNumber, fax;
            string userEmail, storedPassword;
            string notes, comName;

            comName    = ComName.Text;
            workNumber = WorkPhone.Text;
            fax        = FaxNumber.Text;
            //name = ComName.Text;
            userEmail      = Email.Text;
            storedPassword = CustomerCollection.GetPassword(passedUsername);
            notes          = NotesTextBox.Text;
            if (ProfileType.Text == "Customer")
            {
                selectedProfileType = 3;
            }

            DateTime dateRightNow = DateTime.Now;

            //adds on to the back
            //so access with UserCollection.last();
            CustomerCollection.ModifyCustomer(comName, selectedProfileType,
                                              passedUsername, storedPassword, workNumber,
                                              fax, userEmail,
                                              CustomerCollection.GetCreatedByDate(passedUsername),
                                              CustomerCollection.GetCreatedBy(passedUsername), dateRightNow,
                                              sessionUserCustomerModifyProfile, notes);

            CustomerShow main = new CustomerShow(sessionUserCustomerModifyProfile, passedUsername);

            App.Current.MainWindow = main;
            this.Close();
            main.Show();
        }
        private void Next_Click(object sender, RoutedEventArgs e)
        {
            string   street1, city1, state1;
            string   notes1;
            int      zip1;
            DateTime dateRightNow = DateTime.Now;

            street1 = UserInputStreet1.Text;
            city1   = UserInputCity1.Text;
            state1  = UserInputState1.Text;
            zip1    = Convert.ToInt32(UserInputZip1.Text);
            notes1  = NotesTextBox1.Text;
            CustomerAddressCollection.ModifyCustomerAddress1(passedUsername,
                                                             street1, city1, state1, zip1,
                                                             CustomerAddressCollection.GetCreatedByDate(passedUsername),
                                                             CustomerAddressCollection.GetCreatedBy(passedUsername), dateRightNow,
                                                             sessionUserCustomerModifyAddress, notes1);

            CustomerShow main = new CustomerShow(sessionUserCustomerModifyAddress, passedUsername);

            App.Current.MainWindow = main;
            this.Close();
            main.Show();
        }