Beispiel #1
0
        void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            DataSet  ds       = new DataSet();
            DateTime dateFrom = dtFrom.Value;
            DateTime dateTo   = dtTo.Value;

            ds.Tables.Add(IssueDoc.GetIssueSummaryBySupplier(dateFrom, dateTo, _chosenStoreTypeID));
            ds.Tables[0].TableName = "SupplierSummary";
            ds.Tables.Add(IssueDoc.GetIssueBreakdownBySupplier(dateFrom, dateTo, _chosenStoreTypeID));
            ds.Tables[1].TableName = "SupplierBreakdown";

            var _distributionBreakdow = new DistributionBreakdown
            {
                HubName   = { Text = GeneralInfo.Current.HospitalName },
                DateRange =
                {
                    Text =
                        string.Format("{0} to {1}", dtFrom.Text,
                                      dtTo.Text)
                },
                DataSource = ds
            };

            e.Result = _distributionBreakdow;
        }