Пример #1
0
 private void AccountServicesNotificationReport(AccountReportType accountReportType)
 {
     Account currentAccount = this.CurrentAccount;
     if (currentAccount.Id != Account.Null.Id)
     {
         System.DateTime date = System.DateTime.Now.Date;
         System.Data.DataSet set = Mappers.SimpleReportMapper.GetAccountServicesNotification(currentAccount.Id, date, 0L, 0L);
         if (((set != null) && (set.Tables.get_Count() == 2)) && (set.Tables.get_Item(0).Rows.get_Count() != 0))
         {
             set.Tables.get_Item(0).set_TableName("dataHeader");
             set.Tables.get_Item(1).set_TableName("dataServices");
             StiReport report = new StiReport();
             if (accountReportType.Template.get_Length() > 0)
             {
                 report.LoadFromString(accountReportType.Template);
             }
             report.Compile();
             report.RegData((System.Data.DataSet) set);
             report.Render(true);
             if (accountReportType.Name == "Уведомление для Грозного, без долга")
             {
                 StimulsoftUtilsOptions options = new StimulsoftUtilsOptions(false);
                 report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
                 options.RestoreValues();
             }
             else
             {
                 report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
             }
         }
     }
 }