示例#1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            Window1  wnd   = new Window1();
            DateTime value = new DateTime(2016, 11, 1, 5, 20, 00);

            //call for loading in users from database goes here.
            //below is a temporary test case object
            UserEmployeeCollection.addUser(1, "Derek", "Thomas", "Blankinship", 1, 1,
                                           "admin", "password", value, 'M', "574-123-1234", "574-234-2345",
                                           "N/A", "574-345-3456", "N/A", "*****@*****.**", value,
                                           value, value, "admin", value, "admin",
                                           "no notes", 1);
            UserEmployeeAddressCollection.addUserAddress("admin", "exampleStreet1",
                                                         "exampleCity1", "exampleState1", 12345, value, "admin", value, "admin", "no notes", 1);
            UserEmployeeAddressCollection.addUserAddress("admin", "exampleStreet2",
                                                         "exampleCity2", "exampleState2", 23456, value, "admin", value, "admin", "no notes", 1);
            UserEmployeeEmergencyCollection.addUserEmergencyContact("admin", "Tara", "Blankinship",
                                                                    "574-567-8901", "wife", value, "admin", value, "admin", "no notes", 1);


            UserEmployeeCollection.addUser(1, "Hunter", "A", "Johnson", 1, 1,
                                           "user", "12345", value, 'M', "574-123-1234", "574-234-2345",
                                           "N/A", "574-345-3456", "N/A", "*****@*****.**", value,
                                           value, value, "admin", value, "admin",
                                           "no notes", 1);
            wnd.Show();
        }
示例#2
0
        private void Next_Click(object sender, RoutedEventArgs e)
        {
            string   firstName1, lastName1, phone1, relation1;
            string   firstName2, lastName2, phone2, relation2;
            string   notes1, notes2;
            DateTime dateRightNow = DateTime.Now;

            firstName1 = UserInputFirstName1.Text;
            lastName1  = UserInputLastName1.Text;
            phone1     = UserInputPhone1.Text;
            relation1  = UserInputRelation1.Text;
            notes1     = eNotesTextBox1.Text;
            UserEmployeeEmergencyCollection.addUserEmergencyContact(passedUsername,
                                                                    firstName1, lastName1, phone1, relation1, dateRightNow,
                                                                    sessionUserEmployeeAdd3, dateRightNow,
                                                                    sessionUserEmployeeAdd3, notes1, 1);

            if (eContact2Valid.Text == "Yes")
            {
                firstName2 = UserInputFirstName2.Text;
                lastName2  = UserInputLastName2.Text;
                phone2     = UserInputPhone2.Text;
                relation2  = UserInputRelation2.Text;
                notes2     = eNotesTextBox2.Text;
                UserEmployeeEmergencyCollection.addUserEmergencyContact(passedUsername,
                                                                        firstName2, lastName2, phone2, relation2, dateRightNow,
                                                                        sessionUserEmployeeAdd3, dateRightNow,
                                                                        sessionUserEmployeeAdd3, notes2, 1);
            }
            else if (eContact2Valid.Text == "No")
            {
            }

            EmployeeShow main = new EmployeeShow(sessionUserEmployeeAdd3, passedUsername);

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