private void EditEmployeePayRate()
        {
            double?payRate = PosDialogWindow.PromptCurrency(Strings.EmployeeJobEditorPayRate, 0.0);

            if (payRate != null)
            {
                FormattedListBoxItem item = listBoxSelectedJobs.SelectedItem as FormattedListBoxItem;
                if (item != null)
                {
                    EmployeeJob     job  = item.ReferenceObject as EmployeeJob;
                    EmployeePayRate rate =
                        EmployeePayRate.GetEmployeePayRateForJob(SelectedEmployee.Id, job.Id);
                    rate.SetWage(payRate.Value);
                    rate.Update();
                    item.Set(job, job.Description + Environment.NewLine +
                             rate.Wage.ToString("C2"));
                }
            }
        }
        private void InitializeJobsList()
        {
            List <EmployeeJob> employeeJobs = new List <EmployeeJob>(SelectedEmployee.GetJobs());
            List <EmployeeJob> filterList   = (
                from job in EmployeeJob.GetAll()
                let found = employeeJobs.Any(employeeJob => employeeJob.Id == job.Id)
                            where !found select job).ToList();

            foreach (FormattedListBoxItem item in filterList
                     .Select(job => new FormattedListBoxItem(job, job.Description, true)))
            {
                listBoxAllJobs.Items.Add(item);
            }
            foreach (FormattedListBoxItem item in
                     from employeeJob in employeeJobs
                     let pay = EmployeePayRate.GetEmployeePayRateForJob(SelectedEmployee.Id, employeeJob.Id)
                               select GetJobListBoxItem(employeeJob, pay))
            {
                listBoxSelectedJobs.Items.Add(item);
            }
        }