Blame view

Vrh.Web.OneReport.Lib/ReportViewerForMVC/ReportViewerWebForm.ASPX.ParameterParser.cs 1.53 KB
ab9f2fbe   Schwirg László   Add project files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  using System;
  using System.Collections.Generic;
  using System.Collections.Specialized;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  
  namespace Vrh.Web.OneReport.ReportViewerForMvc
  {
      /// <summary>
      /// Class for handled parameters in ReportViewerWebForm.aspx call
      /// </summary>
      public class ReportViewerWebFormParameterParser
      {
          /// <summary>
          /// Constructor
          /// </summary>
          /// <param name="parameters">parameter collection</param>
          public ReportViewerWebFormParameterParser(NameValueCollection parameters)
          {
              _parameters = parameters;
          }
  
          /// <summary>
          /// Get AsyncPostBackTimeOut parameter from collection
          /// </summary>
          public int AsyncPostBackTimeOut
          {
              get
              {
                  int value = 90;
                  try
                  {
                      string strValue = _parameters[ASYNCPOSTBACKTIMEOUT];
                      if (!String.IsNullOrEmpty(strValue))
                      {
                          Int32.TryParse(strValue, out value);
                      }
                  }
                  catch{ }
                  return value;                
              }
          }
  
          /// <summary>
          /// parameter collection
          /// </summary>
          private NameValueCollection _parameters;
  
          /// <summary>
          /// Name of AsyncPostBackTimeOut parameter
          /// </summary>
          private const string ASYNCPOSTBACKTIMEOUT = "AsyncPostBackTimeOut"; 
      }
  }