Ejemplo n.º 1
0
        public FormEmployee(Homework4.FormMain _parent, Homework4.EIS.EmpInfoServiceSoapClient _EISclient, String _EIN)
        {
            EIN       = _EIN;
            parent    = _parent;
            token     = parent.getToken();
            EISclient = _EISclient;
            InitializeComponent();

            comboBoxState.DataSource    = EISclient.getStatesList();
            comboBoxState.DisplayMember = "StateCode";
            comboBoxState.ValueMember   = "StateCode";

            comboBoxDept.DataSource    = EISclient.getDeptList();
            comboBoxDept.DisplayMember = "DeptCode";
            comboBoxDept.ValueMember   = "DeptCode";

            textBoxEIN.Text = EIN;

            if (EIN.Equals("000000"))
            {
                thisEmployee = new Homework4.EIS.Employee();
                this.Text    = "New Employee";
                this.buttonDelete.Enabled = false;
            }
            else
            {
                this.populateFields();
            }
        }
Ejemplo n.º 2
0
        private void populateFields()
        {
            thisEmployee = EISclient.getEmployee(EIN, token);
            this.Text    = thisEmployee.LastName + ", " + thisEmployee.FirstName + " " + thisEmployee.MiddleInitial + ".";

            textBoxFirstName.Text         = thisEmployee.FirstName;
            textBoxMI.Text                = thisEmployee.MiddleInitial;
            textBoxLastName.Text          = thisEmployee.LastName;
            textBoxStreet.Text            = thisEmployee.StreetAddress;
            textBoxCity.Text              = thisEmployee.City;
            comboBoxState.SelectedIndex   = comboBoxState.FindString(thisEmployee.State);
            textBoxZip.Text               = thisEmployee.Zip;
            comboBoxGender.SelectedIndex  = comboBoxGender.FindString(thisEmployee.Gender);
            dateTimePickerBirth.Value     = thisEmployee.DateOfBirth;
            textBoxSSN.Text               = thisEmployee.SSN;
            textBoxHomePhone.Text         = thisEmployee.HomePhone;
            textBoxCell.Text              = thisEmployee.CellPhone;
            textBoxWork.Text              = thisEmployee.WorkPhone;
            textBoxTitle.Text             = thisEmployee.Title;
            comboBoxDept.SelectedIndex    = comboBoxDept.FindString(thisEmployee.DeptCode);
            textBoxOfficeLocation.Text    = thisEmployee.OfficeLocation;
            dateTimePickerHired.Value     = thisEmployee.DateHired;
            textBoxSuperEIN.Text          = thisEmployee.SupervisorEIN;
            comboBoxPayType.SelectedIndex = comboBoxPayType.FindString(thisEmployee.EmployeeType);
            textBoxSalary.Text            = thisEmployee.SalaryOrWage.ToString();
            dateTimePickerRaise.Value     = thisEmployee.DateOfLastRaise;
            numericUpDownExemptions.Value = thisEmployee.TaxExemptions;
            comboBoxStatus.SelectedIndex  = comboBoxStatus.FindString(thisEmployee.TaxFilingStatus);
            textBoxExtra.Text             = thisEmployee.ExtraWithholdings.ToString();
        }
Ejemplo n.º 3
0
 public System.Threading.Tasks.Task <string> saveNewEmployeeAsync(Homework4.EIS.Employee EmployeeToSave, string strToken)
 {
     return(base.Channel.saveNewEmployeeAsync(EmployeeToSave, strToken));
 }
Ejemplo n.º 4
0
 public string saveNewEmployee(Homework4.EIS.Employee EmployeeToSave, string strToken)
 {
     return(base.Channel.saveNewEmployee(EmployeeToSave, strToken));
 }