Exemplo n.º 1
0
        private void BindData()
        {
            if (m_jobId > 0)
            {
                Facade.IPlannerRequest facPlannerRequest = new Facade.PlannerRequest();
                dgRequests.DataSource = facPlannerRequest.GetPlannerRequestsForJobId(m_jobId);
                dgRequests.DataBind();

                lblJobId.Text = m_jobId.ToString();
            }
        }
Exemplo n.º 2
0
        private void PopulatePage()
        {
            // Populate the Job fieldset.
            lblJobId.Text    = m_jobId.ToString();
            lblJobState.Text = Utilities.UnCamelCase(m_job.JobState.ToString());
            lblJobType.Text  = Utilities.UnCamelCase(m_job.JobType.ToString());
            if (m_job.CurrentTrafficArea == null)
            {
                lblCurrentTrafficArea.Text = "Unknown";
            }
            else
            {
                lblCurrentTrafficArea.Text = m_job.CurrentTrafficArea.TrafficAreaName;
            }
            lblStockMovement.Text = (m_job.IsStockMovement ? "Yes" : "No");
            using (Facade.IPlannerRequest facPlannerRequest = new Facade.PlannerRequest())
            {
                if ((facPlannerRequest.GetPlannerRequestsForJobId(m_job.JobId)).Tables[0].Rows.Count > 0)
                {
                    imgHasRequests.Visible = true;
                    imgHasRequests.Attributes.Add("onClick", "javascript:ShowPlannerRequests('" + m_job.JobId.ToString() + "');");
                }
                else
                {
                    imgHasRequests.Visible = false;
                }
            }

            // Populate the cancelation controls
            txtCancellationReason.Text = m_job.ForCancellationReason;

            if (m_job.JobState == eJobState.Cancelled || m_job.HasBeenPosted)
            {
                btnCancelJob.Enabled = false;
            }

            // No reason for cancellation is required if the job type is groupage as groupage jobs get deleted upon cancellation.
            cancellationTable.Visible = m_job.JobType != eJobType.Groupage;
        }