Example #1
0
        public UserChangeToInactive(string sessionUser, string storedUsername)
        {
            InitializeComponent();

            passedUsername            = storedUsername;
            sessionUserEmployeeDelete = sessionUser;

            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);
        }
        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);

            Street2.Content  = UserEmployeeAddressCollection2.GetStreet2(passedUsername);
            City2.Content    = UserEmployeeAddressCollection2.GetCity2(passedUsername);
            State2.Content   = UserEmployeeAddressCollection2.GetState2(passedUsername);
            ZipCode2.Content = UserEmployeeAddressCollection2.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);

            eFirstName2.Content   = UserEmployeeEmergencyCollection2.GetFirstName2(passedUsername);
            eLastName2.Content    = UserEmployeeEmergencyCollection2.GetLastName2(passedUsername);
            ePhoneNumber2.Content = UserEmployeeEmergencyCollection2.GetPhone2(passedUsername);
            eRelation2.Content    = UserEmployeeEmergencyCollection2.GetRelation2(passedUsername);
        }
        public EmployeeModify(string sessionUser, string storedUsername)
        {
            passedUsername            = storedUsername;
            sessionUserModifyEmployee = sessionUser;

            InitializeComponent();
            int holderVariable = UserEmployeeCollection.GetProfileType(passedUsername);

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

            char tempGender = UserEmployeeCollection.GetGender(passedUsername);

            if (tempGender == 'M')
            {
                Gender.Text = "Male";
            }
            else if (tempGender == 'F')
            {
                Gender.Text = "Female";
            }
            else if (tempGender == 'A')
            {
                Gender.Text = "Attack Helicopter";
            }
        }