public EmployeeAddressModify(string sessionUserEmployeeShow, string storedUsername)
        {
            InitializeComponent();
            sessionUserEmployeeAddressModify = sessionUserEmployeeShow;
            passedUsername = storedUsername;
            //set Address Fields
            UserInputStreet1.Text = UserEmployeeAddressCollection.GetStreet1(passedUsername);
            UserInputCity1.Text   = UserEmployeeAddressCollection.GetCity1(passedUsername);
            UserInputState1.Text  = UserEmployeeAddressCollection.GetState1(passedUsername);
            UserInputZip1.Text    = UserEmployeeAddressCollection.GetZipCode1(passedUsername).ToString();
            NotesTextBox1.Text    = UserEmployeeAddressCollection.GetNotes1(passedUsername);

            string x, y;

            x = UserEmployeeAddressCollection.GetStreet1(passedUsername);
            y = UserEmployeeAddressCollection.GetStreet2(passedUsername);
            if (x != y)
            {
                UserInputStreet2.Text = UserEmployeeAddressCollection.GetStreet2(passedUsername);
                UserInputCity2.Text   = UserEmployeeAddressCollection.GetCity2(passedUsername);
                UserInputState2.Text  = UserEmployeeAddressCollection.GetState2(passedUsername);
                UserInputZip2.Text    = UserEmployeeAddressCollection.GetZipCode2(passedUsername).ToString();
                NotesTextBox2.Text    = UserEmployeeAddressCollection.GetNotes2(passedUsername);
            }
        }
Exemplo n.º 2
0
        public EmployeeShow(string sessionUser, string storedUsername)
        {
            InitializeComponent();
            passedUsername          = storedUsername;
            sessionUserEmployeeShow = sessionUser;

            //set Employee Fields
            UserName.Content = passedUsername;
            int holderVariable = UserEmployeeCollection.GetProfileType(passedUsername);

            if (holderVariable == 1)
            {
                ProfileType.Content = "Owner";
            }
            FirstName.Content   = UserEmployeeCollection.GetFirstName(passedUsername);
            MiddleName.Content  = UserEmployeeCollection.GetMiddleName(passedUsername);
            LastName.Content    = UserEmployeeCollection.GetLastName(passedUsername);
            DateOfBirth.Content = UserEmployeeCollection.GetDateOfBirth(passedUsername);
            Gender.Content      = UserEmployeeCollection.GetGender(passedUsername);
            StartDate.Content   = UserEmployeeCollection.GetStartDate(passedUsername);
            CellPhone1.Content  = UserEmployeeCollection.GetMobilePhone1(passedUsername);
            CellPhone2.Content  = UserEmployeeCollection.GetMobilePhone2(passedUsername);
            WorkPhone.Content   = UserEmployeeCollection.GetWorkPhone(passedUsername);
            FaxPhone.Content    = UserEmployeeCollection.GetFaxNumber(passedUsername);
            HomePhone.Content   = UserEmployeeCollection.GetHomePhone(passedUsername);
            Email.Content       = UserEmployeeCollection.GetEmail(passedUsername);

            //set Address Fields
            Street1.Content  = UserEmployeeAddressCollection.GetStreet1(passedUsername);
            City1.Content    = UserEmployeeAddressCollection.GetCity1(passedUsername);
            State1.Content   = UserEmployeeAddressCollection.GetState1(passedUsername);
            ZipCode1.Content = UserEmployeeAddressCollection.GetZipCode1(passedUsername);

            string x, y;

            x = UserEmployeeAddressCollection.GetStreet1(passedUsername);
            y = UserEmployeeAddressCollection.GetStreet2(passedUsername);
            if (x != y)
            {
                Street2.Content  = UserEmployeeAddressCollection.GetStreet2(passedUsername);
                City2.Content    = UserEmployeeAddressCollection.GetCity2(passedUsername);
                State2.Content   = UserEmployeeAddressCollection.GetState2(passedUsername);
                ZipCode2.Content = UserEmployeeAddressCollection.GetZipCode2(passedUsername);
            }

            //set Emergency Contact Fields
            eFirstName1.Content   = UserEmployeeEmergencyCollection.GetFirstName1(passedUsername);
            eLastName1.Content    = UserEmployeeEmergencyCollection.GetLastName1(passedUsername);
            ePhoneNumber1.Content = UserEmployeeEmergencyCollection.GetPhone1(passedUsername);
            eRelation1.Content    = UserEmployeeEmergencyCollection.GetRelation1(passedUsername);

            string a, b;

            a = UserEmployeeEmergencyCollection.GetFirstName1(passedUsername);
            b = UserEmployeeEmergencyCollection.GetFirstName2(passedUsername);
            if (a != b)
            {
                eFirstName2.Content   = UserEmployeeEmergencyCollection.GetFirstName2(passedUsername);
                eLastName2.Content    = UserEmployeeEmergencyCollection.GetLastName2(passedUsername);
                ePhoneNumber2.Content = UserEmployeeEmergencyCollection.GetPhone2(passedUsername);
                eRelation2.Content    = UserEmployeeEmergencyCollection.GetRelation2(passedUsername);
            }
        }