public JobPull(JobListObject jlo, bool isReferredFromWizardJobPage) { thisRequest = jlo.r4d; contact = jlo.contact; InitializeComponent(); populateJobSection(); populateContactSection(); if (isReferredFromWizardJobPage && thisRequest.completedDate == null) { acceptButton.IsVisible = bool.Parse(Application.Current.Properties["user_iswizard"] + ""); acceptButton.IsVisible &= thisRequest.acceptDate == null; actionHeader.IsVisible = !acceptButton.IsVisible; actionGrid.IsVisible = actionHeader.IsVisible; if (thisRequest.hours != null) { saveButton.IsVisible = false; hoursWorkedEnt.Text = thisRequest.hours.Value.ToString(); hoursWorkedEnt.IsEnabled = false; } } else { if (thisRequest.hours != null && thisRequest.completedDate == null) { approvalHeader.IsVisible = true; approvalGrid.IsVisible = true; hoursWorkedLabel.Text = thisRequest.hours.Value.ToString(); totalCostLabel.Text = thisRequest.totalCost; } } }
public JobPull(JobListObject jlo) : this(jlo, false) { }