Пример #1
0
    private void LoadJob()
    {
        int jobID = int.Parse(Request.QueryString["jID"]);

        Orchestrator.Entities.Job job    = null;
        Orchestrator.Facade.IJob  facJob = new Orchestrator.Facade.Job();
        job = facJob.GetJob(jobID);

        if (job.NominalCode != null)
        {
            lblNominalCode.Text = job.NominalCode.ShortCode;
        }
        else
        {
            lblNominalCode.Text = "No Nominal Code Set";
        }

        Orchestrator.Facade.INominalCode facNominalCode = new Orchestrator.Facade.NominalCode();
        DataSet dsCodes = facNominalCode.GetAllActive();

        cboNominalCode.DataSource     = dsCodes;
        cboNominalCode.DataTextField  = "NominalCode";
        cboNominalCode.DataValueField = "NominalCodeID";
        cboNominalCode.DataBind();

        if (job.NominalCode != null)
        {
            cboNominalCode.FindItemByValue(job.NominalCode.NominalCodeID.ToString()).Selected = true;
            this.CurrentNominalCodeID = job.NominalCode.NominalCodeID;
        }
    }
Пример #2
0
        private void LoadJob()
        {
            int jobID = int.Parse(Request.QueryString["jID"]);

            Orchestrator.Entities.Job job    = null;
            Orchestrator.Facade.IJob  facJob = new Orchestrator.Facade.Job();
            job = facJob.GetJob(jobID);

            Facade.IBusinessType  facBusinessType = new Facade.BusinessType();
            Entities.BusinessType businessType    = facBusinessType.GetForBusinessTypeID(job.BusinessTypeID);

            if (businessType != null)
            {
                lblBusinessType.Text = businessType.Description;
            }
            else
            {
                lblBusinessType.Text = "No Business Type Set";
            }

            DataSet dsTypes = facBusinessType.GetAll();

            cboBusinessType.DataSource     = dsTypes;
            cboBusinessType.DataTextField  = "Description";
            cboBusinessType.DataValueField = "BusinessTypeID";
            cboBusinessType.DataBind();

            if (businessType != null)
            {
                cboBusinessType.FindItemByValue(businessType.BusinessTypeID.ToString()).Selected = true;
                this.CurrentBusinessTypeID = businessType.BusinessTypeID;
            }
        }