Ejemplo n.º 1
0
        public void ApplyFilter()
        {
            // Build Filter String
            // Find Shunt List For Particular Client
            DateTime today = DateTime.UtcNow;

            today = today.Subtract(today.TimeOfDay);

            Facade.Job facJob      = new Facade.Job();
            DataSet    dsShuntList = facJob.GetShuntListForClient(Convert.ToInt32(cboClient.Value), today);

            grdDailyShuntList.DataSource = dsShuntList;
            grdDailyShuntList.DataBind();
        }
Ejemplo n.º 2
0
        private void GetShuntListData()
        {
            DateTime shuntListDate = dteShuntListDate.SelectedDate.Value;

            shuntListDate = shuntListDate.Subtract(shuntListDate.TimeOfDay);

            Facade.Job facJob = new Facade.Job();

            int     identityId  = Convert.ToInt32(cboClient.SelectedValue);
            DataSet dsShuntList = facJob.GetShuntListForClient(identityId, shuntListDate);

            if (dsShuntList.Tables[0].Rows.Count > 0)
            {
                // Configure the report settings collection
                NameValueCollection reportParams = new NameValueCollection();
                reportParams.Add("Client", cboClient.Text);
                reportParams.Add("IdentityId", cboClient.SelectedValue);
                reportParams.Add("Date", shuntListDate.ToString("dd/MM/yy"));

                // Configure the Session variables used to pass data to the report
                Session[Orchestrator.Globals.Constants.ReportTypeSessionVariable]       = eReportType.ShuntList;
                Session[Orchestrator.Globals.Constants.ReportDataSessionTableVariable]  = dsShuntList;
                Session[Orchestrator.Globals.Constants.ReportDataSessionSortVariable]   = String.Empty;
                Session[Orchestrator.Globals.Constants.ReportDataMemberSessionVariable] = "Table";
                Session[Orchestrator.Globals.Constants.ReportParamsSessionVariable]     = reportParams;

                // Set the identity ID property of the report viewer.
                reportViewer.IdentityId = identityId;

                // Show the user control
                reportViewer.Visible = true;
            }
            else
            {
                lblError.Text    = "No jobs found for client " + cboClient.Text;
                lblError.Visible = true;
            }
        }