-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReportsModel.cs
103 lines (83 loc) · 2.79 KB
/
ReportsModel.cs
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Countersoft.Foundation.Commons.Core;
using Countersoft.Gemini.Commons.Dto;
using Countersoft.Gemini.Infrastructure.Helpers;
namespace Timesheet
{
public class ReportsModel
{
public ReportsModel()
{
ReportOptions = new ReportOptions();
}
public Dictionary<int, string> ReportMenu { get; set; }
public enum ReportTypes
{
TimeReport = 50,
TimeReportProject = 51,
TimeReportUser = 53
}
public ReportOptions ReportOptions { get; set; }
public IEnumerable<SelectListItem> AllReports
{
get { return new SelectList(ReportMenu, "Key", "Value", ReportOptions.Reports); }
}
public IEnumerable<SelectListItem> FilterList { get; set; }
public IEnumerable<SelectListItem> TimeList { get; set; }
public IEnumerable<SelectListItem> ProjectList { get; set; }
public IEnumerable<SelectListItem> ResourceList { get; set; }
public IEnumerable<SelectListItem> GroupByList { get; set; }
}
public class ReportOptions
{
public ReportOptions()
{
Reports = 0;
Parameters = new Dictionary<string, string>();
ProjectIds = new List<int>();
ResourceIds = new List<int>();
TimeTypeIds = new List<string>();
StartDateString = string.Empty;
EndDateString = string.Empty;
AllProjectsSelected = false;
}
public int Reports { get; set; }
public Dictionary<string, string> Parameters { get; set; }
public DateTime? EndDate { get; set; }
public string EndDateString { get; set; }
public string EndDateDisplay
{
get
{
return EndDateString;
}
}
public DateTime? StartDate { get; set; }
public string StartDateString { get; set; }
public string StartDateDisplay
{
get {
return StartDateString;
}
}
/*private string _subChart;
public string SubChart
{
get { return _subChart; }
set { _subChart = value; }
}*/
public bool? ProjectSummaryChart { get; set; }
//public string PdfUrl { get; set; }
//public string FieldId { get; set; }
public int? FilterId { get; set; }
public List<int> ProjectIds { get; set; }
public List<int> ResourceIds { get; set; }
public List<string> TimeTypeIds { get; set; }
public int GroupBy { get; set; }
public bool AllProjectsSelected { get; set; }
}
}