1: using System.Collections.Generic;
2: using System.Data;
3: using System.Linq;
4:
5: namespace Ia.Ngn.Cl.Model.Business
6: {
7: ////////////////////////////////////////////////////////////////////////////
8:
9: /// <summary publish="true">
10: /// Report support class of Next Generation Network'a (NGN's) business model.
11: /// </summary>
12: ///
13: /// <remarks>
14: /// Copyright © 2006-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
15: ///
16: /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
17: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
18: ///
19: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
20: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
21: ///
22: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
23: ///
24: /// Copyright notice: This notice may not be removed or altered from any source distribution.
25: /// </remarks>
26: public partial class Report
27: {
28: public enum Status { Open = 1, Closed = 2 }
29:
30: public enum ServiceType { Unspecified = 0, Dn = 1, AccessName = 2, AccessUnknown = 3 }
31:
32: ////////////////////////////////////////////////////////////////////////////
33:
34: /// <summary>
35: ///
36: /// </summary>
37: public Report() { }
38:
39: ////////////////////////////////////////////////////////////////////////////
40:
41: /// <summary>
42: ///
43: /// </summary>
44: public class Category
45: {
46: /// <summary/>
47: public Category() { }
48:
49: /// <summary/>
50: public int Id { get; set; }
51: /// <summary/>
52: public string Name { get; set; }
53: /// <summary/>
54: public string ArabicName { get; set; }
55: /// <summary/>
56: public virtual ICollection<Ia.Ngn.Cl.Model.Business.Report.Area> Areas
57: {
58: get
59: {
60: return (from a in Ia.Ngn.Cl.Model.Data.Report.AreaList where a.Category.Id == this.Id select a).ToList();
61: }
62: }
63: }
64:
65: ////////////////////////////////////////////////////////////////////////////
66:
67: /// <summary>
68: ///
69: /// </summary>
70: public class Area
71: {
72: /// <summary/>
73: public Area() { }
74:
75: /// <summary/>
76: public int Id { get; set; }
77: /// <summary/>
78: public int XmlId { get; set; }
79: /// <summary/>
80: public string Name { get; set; }
81: /// <summary/>
82: public string ArabicName { get; set; }
83: /// <summary/>
84: public List<string> Frameworks { get; set; }
85: /// <summary/>
86: public virtual Category Category { get; set; }
87: /// <summary/>
88: public virtual ICollection<Indication> Indications
89: {
90: get { return (from i in Ia.Ngn.Cl.Model.Data.Report.IndicationList where i.Area.Id == this.Id select i).ToList(); }
91: }
92: /// <summary/>
93: public virtual ICollection<Action> Actions
94: {
95: get { return (from a in Ia.Ngn.Cl.Model.Data.Report.ActionList where a.Area.Id == this.Id select a).ToList(); }
96: }
97: /// <summary/>
98: public virtual ICollection<Resolution> Resolutions
99: {
100: get { return (from r in Ia.Ngn.Cl.Model.Data.Report.ResolutionList where r.Area.Id == this.Id select r).ToList(); }
101: }
102:
103: /// <summary/>
104: public int AreaId(int categoryId, int areaId)
105: {
106: return categoryId * 100 + areaId;
107: }
108: }
109:
110: ////////////////////////////////////////////////////////////////////////////
111:
112: /// <summary>
113: ///
114: /// </summary>
115: public class Indication
116: {
117: /// <summary/>
118: public Indication() { }
119:
120: /// <summary/>
121: public int Id { get; set; }
122: /// <summary/>
123: public int XmlId { get; set; }
124: /// <summary/>
125: public bool Obsolete { get; set; }
126: /// <summary/>
127: public bool CanInsert { get; set; }
128: /// <summary/>
129: public string Name { get; set; }
130: /// <summary/>
131: public string ArabicName { get; set; }
132: /// <summary/>
133: public string ColoredName { get; set; }
134: /// <summary/>
135: public string ColoredArabicName { get; set; }
136: /// <summary/>
137: public string EnglishAndArabicName { get; set; }
138: /// <summary/>
139: public string ColoredEnglishAndArabicName { get; set; }
140: /// <summary/>
141: public string Color { get; set; }
142: /// <summary/>
143: /// <summary/>
144: public List<string> Frameworks { get; set; }
145: /// <summary/>
146: public virtual Area Area { get; set; }
147:
148: /// <summary/>
149: public int IndicationId(int areaId, int indicationId) { return areaId * 10000 + indicationId; }
150: }
151:
152: ////////////////////////////////////////////////////////////////////////////
153:
154: /// <summary>
155: ///
156: /// </summary>
157: public class Action
158: {
159: /// <summary/>
160: public Action() { }
161:
162: /// <summary/>
163: public int Id { get; set; }
164: /// <summary/>
165: public int XmlId { get; set; }
166: /// <summary/>
167: public bool Obsolete { get; set; }
168: /// <summary/>
169: public bool CanInsert { get; set; }
170: /// <summary/>
171: public string Name { get; set; }
172: /// <summary/>
173: public string ArabicName { get; set; }
174: /// <summary/>
175: public string ColoredName { get; set; }
176: /// <summary/>
177: public string ColoredArabicName { get; set; }
178: /// <summary/>
179: public string EnglishAndArabicName { get; set; }
180: /// <summary/>
181: public string ColoredEnglishAndArabicName { get; set; }
182: /// <summary/>
183: public string Color { get; set; }
184: /// <summary/>
185: public List<string> Frameworks { get; set; }
186: /// <summary/>
187: public virtual Area Area { get; set; }
188: /// <summary/>
189: public int ActionId(int areaId, int actionId) { return areaId * 10000 + actionId; }
190: }
191:
192: ////////////////////////////////////////////////////////////////////////////
193:
194: /// <summary>
195: ///
196: /// </summary>
197: public class Resolution
198: {
199: /// <summary/>
200: public Resolution() { }
201:
202: /// <summary/>
203: public int Id { get; set; }
204: /// <summary/>
205: public int XmlId { get; set; }
206: /// <summary/>
207: public bool Obsolete { get; set; }
208: /// <summary/>
209: public bool CanInsert { get; set; }
210: /// <summary/>
211: public string Name { get; set; }
212: /// <summary/>
213: public string ArabicName { get; set; }
214: /// <summary/>
215: public string ColoredName { get; set; }
216: /// <summary/>
217: public string ColoredArabicName { get; set; }
218: /// <summary/>
219: public string EnglishAndArabicName { get; set; }
220: /// <summary/>
221: public string ColoredEnglishAndArabicName { get; set; }
222: /// <summary/>
223: public string Color { get; set; }
224: /// <summary/>
225: public virtual Area Area { get; set; }
226: /// <summary/>
227: public int ResolutionId(int areaId, int resolutionId) { return areaId * 10000 + resolutionId; }
228: }
229:
230:
231:
232: ////////////////////////////////////////////////////////////////////////////
233: ////////////////////////////////////////////////////////////////////////////
234: }
235:
236: ////////////////////////////////////////////////////////////////////////////
237: ////////////////////////////////////////////////////////////////////////////
238: }