1: using System.Collections.Generic;
2: using System.Linq;
3:
4: ////////////////////////////////////////////////////////////////////////////
5:
6: /// <summary>
7: ///
8: /// </summary>
9: namespace Ia.Learning.Cl.Model
10: {
11: ////////////////////////////////////////////////////////////////////////////
12:
13: /// <summary publish="true">
14: /// Default business support class.
15: /// </summary>
16: /// <value>
17: /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
18: /// </value>
19: /// <remarks>
20: /// Copyright © 2008-2020 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
21: ///
22: /// 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
23: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
24: ///
25: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
26: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
27: ///
28: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
29: ///
30: /// Copyright notice: This notice may not be removed or altered from any source distribution.
31: /// </remarks>
32: public class Level
33: {
34: /// <summary/>
35: public Level() { }
36:
37: /// <summary/>
38: public int Id { get; set; }
39:
40: /// <summary/>
41: public string Name { get; set; }
42:
43: /// <summary/>
44: public string ArabicName { get; set; }
45:
46: /// <summary/>
47: public string Url
48: {
49: get { return "~/level.aspx?id=" + Id.ToString(); }
50: }
51:
52: /// <summary/>
53: public virtual ICollection<Ia.Learning.Cl.Model.Grade> Grades
54: {
55: get
56: {
57: return (from g in Ia.Learning.Cl.Model.Grade.List where g.Level.Id == this.Id select g).ToList();
58: }
59: }
60:
61: ////////////////////////////////////////////////////////////////////////////
62:
63: /// <summary>
64: ///
65: /// </summary>
66: public static List<Ia.Learning.Cl.Model.Level> List
67: {
68: get
69: {
70: var levels = new List<Ia.Learning.Cl.Model.Level>()
71: {
72: new Ia.Learning.Cl.Model.Level() { Id = 1, ArabicName = "رياض أطفال", Name = "Kindergarten" },
73: new Ia.Learning.Cl.Model.Level() { Id = 2, ArabicName = "ابتدائية", Name = "Elementary" },
74: new Ia.Learning.Cl.Model.Level() { Id = 3, ArabicName = "متوسطة", Name = "Intermediate" },
75: new Ia.Learning.Cl.Model.Level() { Id = 4, ArabicName = "ثانوية", Name = "Secondary" }
76: };
77:
78: return levels;
79: }
80: }
81:
82: ////////////////////////////////////////////////////////////////////////////
83: ////////////////////////////////////////////////////////////////////////////
84: }
85:
86: ////////////////////////////////////////////////////////////////////////////
87: ////////////////////////////////////////////////////////////////////////////
88: }