Inheritance: RatingReportSettings
コード例 #1
0
ファイル: Reports.cs プロジェクト: breslavsky/queue
 public async Task<byte[]> GetOperatorRatingReport(OperatorRatingReportSettings settings)
 {
     return await Task.Run(() =>
     {
         CheckPermission(UserRole.Administrator, AdministratorPermissions.Reports);
         return GenerateReport(new OperatorRatingReportProvider(settings));
     });
 }
コード例 #2
0
        private OperatorRatingReportSettings GetReportSettings()
        {
            OperatorRatingReportSettings settings = null;
            switch ((ReportDetailLevel)detailLevelTabControl.SelectedIndex)
            {
                case ReportDetailLevel.Year:
                    settings = new OperatorRatingReportSettings()
                    {
                        StartYear = (int)startYearComboBox.SelectedItem,
                        FinishYear = (int)finishYearComboBox.SelectedItem,
                    };
                    break;

                case ReportDetailLevel.Month:
                    settings = new OperatorRatingReportSettings()
                    {
                        StartYear = startMonthPicker.Value.Year,
                        StartMonth = startMonthPicker.Value.Month,
                        FinishYear = finishMonthPicker.Value.Year,
                        FinishMonth = finishMonthPicker.Value.Month
                    };
                    break;

                case ReportDetailLevel.Day:
                    settings = new OperatorRatingReportSettings()
                    {
                        StartYear = startDatePicker.Value.Year,
                        StartMonth = startDatePicker.Value.Month,
                        StartDay = startDatePicker.Value.Day,
                        FinishYear = finishDatePicker.Value.Year,
                        FinishMonth = finishDatePicker.Value.Month,
                        FinishDay = finishDatePicker.Value.Day
                    };
                    break;

                default:
                    throw new ApplicationException("Неверный тип детализации");
            }

            settings.DetailLevel = (ReportDetailLevel)detailLevelTabControl.SelectedIndex;
            settings.Operators = isFullCheckBox.Checked ? new Guid[0] : GetSelectedOperators();

            return settings;
        }
コード例 #3
0
 public OperatorRatingReportProvider(OperatorRatingReportSettings settings)
 {
     this.settings = settings;
 }