コード例 #1
0
        private void ConfigureDisplay()
        {
            this.ResourceManifestId     = Convert.ToInt32(this.Page.Request.QueryString["rmId"].ToString());
            this.lblManifestNumber.Text = this.ResourceManifestId.ToString();

            // If rmID (resource manifest id) is null then throw exception
            Facade.ResourceManifest facResourceManifest = new Orchestrator.Facade.ResourceManifest();
            this.SavedResourceManifest = facResourceManifest.GetResourceManifest(this.ResourceManifestId);

            txtManifestName.Text         = this.SavedResourceManifest.Description;
            dteManifestDate.SelectedDate = this.SavedResourceManifest.ManifestDate;

            DataAccess.IOrganisationLocation dacOrgLoc = new DataAccess.Organisation();
            cboDepot.DataSource     = dacOrgLoc.GetAllDepots(Orchestrator.Globals.Configuration.IdentityId);
            cboDepot.DataValueField = "OrganisationLocationId";
            cboDepot.DataTextField  = "OrganisationLocationName";
            cboDepot.DataBind();
            cboDepot.Items.Insert(0, new ListItem("All", "0"));

            dteStartdate.SelectedDate = DateTime.Today;
            dteEndDate.SelectedDate   = DateTime.Today.AddDays(1);

            txtExtraRowCount.Value     = Orchestrator.Globals.Configuration.DefaultResourceManifestNoOfBlankLines;
            chkUsePlannedTimes.Checked = Orchestrator.Globals.Configuration.UsePlannedTimes;
            chkShowFullAddress.Checked = Orchestrator.Globals.Configuration.ResourceManifestShowFullAddress;

            if (this.SavedResourceManifest.ResourceManifestJobs.Count == 1)
            {
                chkExcludeFirstRow.Enabled = chkExcludeFirstRow.Checked = false;
            }
            else
            {
                chkExcludeFirstRow.Checked = Orchestrator.Globals.Configuration.ExcludeResourceManifestFirstLine;
            }
        }
コード例 #2
0
        private void PopulateStaticData()
        {
            DataAccess.IDriver dacDriver = new DataAccess.Driver();
            cboDriverType.DataSource = dacDriver.GetAllDriverTypes();
            cboDriverType.DataBind();

            cboDriverType.Items.Insert(0, new ListItem("All", "0"));

            DataAccess.IOrganisationLocation dacOrgLoc = new DataAccess.Organisation();
            cboDepot.DataSource     = dacOrgLoc.GetAllDepots(Orchestrator.Globals.Configuration.IdentityId);
            cboDepot.DataValueField = "OrganisationLocationId";
            cboDepot.DataTextField  = "OrganisationLocationName";
            cboDepot.DataBind();
            cboDepot.Items.Insert(0, new ListItem("All", "0"));

            if (Session[Orchestrator.Globals.Constants.DriverManifestListFromDate] == null)
            {
                Session[Orchestrator.Globals.Constants.DriverManifestListFromDate] = DateTime.Today;
            }

            if (Session[Orchestrator.Globals.Constants.DriverManifestListToDate] == null)
            {
                Session[Orchestrator.Globals.Constants.DriverManifestListToDate] = DateTime.Today.AddDays(1);
            }

            dteStartdate.SelectedDate = (DateTime)Session[Orchestrator.Globals.Constants.DriverManifestListFromDate];
            dteEndDate.SelectedDate   = (DateTime)Session[Orchestrator.Globals.Constants.DriverManifestListToDate];
        }