protected void Page_Load(object sender, System.EventArgs e) { Orchestrator.WebUI.Security.Authorise.EnforceAuthorisation(eSystemPortion.GeneralUsage); m_resourceId = Convert.ToInt32(Request.QueryString["resourceId"]); m_resourceType = (eResourceType)Convert.ToInt32(Request.QueryString["resourceTypeId"]); string date = Request.QueryString["fromDateTime"]; m_startDate = new DateTime(Convert.ToInt32(date.Substring(4, 4)), Convert.ToInt32(date.Substring(2, 2)), Convert.ToInt32(date.Substring(0, 2)), Convert.ToInt32(date.Substring(8, 2)), Convert.ToInt32(date.Substring(10, 2)), 0); if (!IsPostBack) { switch (m_resourceType) { case eResourceType.Driver: Facade.IDriver facDriver = new Facade.Resource(); lblResource.Text = facDriver.GetDriverForResourceId(m_resourceId).Individual.FullName; break; case eResourceType.Vehicle: Facade.IVehicle facVehicle = new Facade.Resource(); lblResource.Text = facVehicle.GetForVehicleId(m_resourceId).RegNo; break; case eResourceType.Trailer: Facade.ITrailer facTrailer = new Facade.Resource(); lblResource.Text = facTrailer.GetForTrailerId(m_resourceId).TrailerRef; break; } Facade.IJob facJob = new Facade.Job(); m_dsFutureJobs = facJob.GetFutureJobs(m_resourceId, ((Entities.CustomPrincipal)Page.User).IdentityId); dgBasicJobs.DataSource = m_dsFutureJobs; dgBasicJobs.DataBind(); } }