1: using System;
2: using System.Collections.Generic;
3: using System.Linq;
4:
5: namespace Ia.Learning.Cl.Model.Business
6: {
7: ////////////////////////////////////////////////////////////////////////////
8:
9: /// <summary publish="true">
10: /// Textbook Business Support Class
11: /// </summary>
12: /// <value>
13: /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
14: /// </value>
15: /// <remarks>
16: /// Copyright © 2019-2020 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
17: ///
18: /// 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
19: /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
20: ///
21: /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
22: /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23: ///
24: /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
25: ///
26: /// Copyright notice: This notice may not be removed or altered from any source distribution.
27: /// </remarks>
28: public class Textbook
29: {
30: /// <summary/>
31: public static Dictionary<int, string> PartName = new Dictionary<int, string>() { { 1, "الجزء الأول" }, { 2, "الجزء الثاني" } };
32:
33: /// <summary/>
34: public int Id { get; set; }
35:
36: /// <summary/>
37: public string Category { get; set; }
38:
39: /// <summary/>
40: public string CourseType { get; set; }
41:
42: /// <summary/>
43: public string Class { get; set; }
44:
45: /// <summary/>
46: public string GradeId { get; set; }
47:
48: /// <summary/>
49: public int Part { get; set; }
50:
51: /// <summary/>
52: public string Name { get; set; }
53:
54: /// <summary/>
55: public string Description { get; set; }
56:
57: /// <summary/>
58: public DateTime ReleaseDate { get; set; }
59:
60: /// <summary/>
61: public string SourceImageUrl { get; set; }
62:
63: /// <summary/>
64: public string ImageUrl
65: {
66: get { return "http://cdn.منهج.com/textbook/" + Id.ToString() + ".jpg"; }
67: }
68:
69: /// <summary/>
70: public string SourcePdfUrl { get; set; }
71:
72: /// <summary/>
73: public string PdfUrl
74: {
75: get { return "http://cdn.منهج.com/textbook/" + Id.ToString() + ".pdf"; }
76: }
77:
78: /// <summary/>
79: public string Url
80: {
81: get { return "~/textbook.aspx?id=" + Id.ToString(); }
82: }
83:
84: /// <summary/>
85: public virtual Ia.Learning.Cl.Model.Grade Grade
86: {
87: get
88: {
89: return (from g in Ia.Learning.Cl.Model.Grade.List where g.Id == GradeId select g).Single();
90: }
91: }
92:
93: ////////////////////////////////////////////////////////////////////////////
94: ////////////////////////////////////////////////////////////////////////////
95: }
96:
97: ////////////////////////////////////////////////////////////////////////////
98: ////////////////////////////////////////////////////////////////////////////
99: }