Professional Applications Programmers/Consultants برمجة واستشارات تطبيقات الإنترنت
Skip Navigation LinksHome » Code Library » Level

Public general use code classes and xml files that we've compiled and used over the years:

Default entity support class.

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Xml.Linq;
   6:  using System.Configuration;
   7:   
   8:  ////////////////////////////////////////////////////////////////////////////
   9:   
  10:  /// <summary>
  11:  ///
  12:  /// </summary>
  13:  namespace Ia.Learning.Manhaj.Model
  14:  {
  15:      ////////////////////////////////////////////////////////////////////////////
  16:   
  17:      /// <summary publish="true">
  18:      /// Default entity support class.
  19:      /// </summary>
  20:      /// <value>
  21:      /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
  22:      /// </value>
  23:      /// <remarks> 
  24:      /// Copyright © 2008-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  25:      ///
  26:      /// 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
  27:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  28:      ///
  29:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  30:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  31:      /// 
  32:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  33:      /// 
  34:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  35:      /// </remarks> 
  36:      public class Level
  37:      {
  38:          public Level() { }
  39:   
  40:          public int Id { get; set; }
  41:          public string Name { get; set; }
  42:          public string ArabicName { get; set; }
  43:          /*
  44:          public List<Grade> Grades { get; set; }
  45:  
  46:          public Grade Grade(int gradeId)
  47:          {
  48:              return Grades.Find(p => p.Id == gradeId);
  49:          }
  50:           */
  51:      }
  52:   
  53:      ////////////////////////////////////////////////////////////////////////////
  54:      ////////////////////////////////////////////////////////////////////////////
  55:   
  56:      /// <summary>
  57:      ///
  58:      /// </summary>
  59:      public class Grade
  60:      {
  61:          public Grade() { }
  62:   
  63:          public int Id { get; set; }
  64:          public int LevelId { get; set; }
  65:          public string Name { get; set; }
  66:          public string ArabicName { get; set; }
  67:          /*
  68:          public List<Course> Courses { get; set; }
  69:  
  70:          public Course Course(int levelId)
  71:          {
  72:              return Courses.Find(p => p.Id == levelId);
  73:          }
  74:           */
  75:      }
  76:   
  77:      ////////////////////////////////////////////////////////////////////////////
  78:      ////////////////////////////////////////////////////////////////////////////
  79:   
  80:      /// <summary>
  81:      ///
  82:      /// </summary>
  83:      public class Course
  84:      {
  85:          public Course() { }
  86:   
  87:          public int Id { get; set; }
  88:          public int GradeId { get; set; }
  89:          public string Name { get; set; }
  90:          /*
  91:          public List<Book> Books { get; set; }
  92:  
  93:          public Book Book(int bookId)
  94:          {
  95:              return Books.Find(p => p.Id == bookId);
  96:          }
  97:           */
  98:      }
  99:   
 100:      ////////////////////////////////////////////////////////////////////////////
 101:      ////////////////////////////////////////////////////////////////////////////
 102:   
 103:      /// <summary>
 104:      ///
 105:      /// </summary>
 106:      public class Book
 107:      {
 108:          public Book() { }
 109:   
 110:          public int Id { get; set; }
 111:          public int CourseId { get; set; }
 112:          public string Name { get; set; }
 113:          public int TotalPages { get; set; }
 114:          // public List<Page> Pages { get; set; }
 115:      }
 116:   
 117:      ////////////////////////////////////////////////////////////////////////////
 118:      ////////////////////////////////////////////////////////////////////////////
 119:   
 120:      /// <summary>
 121:      ///
 122:      /// </summary>
 123:      public class Page
 124:      {
 125:          public Page() { }
 126:   
 127:          public int Id { get; set; }
 128:          public int BookId { get; set; }
 129:          public int Number { get; set; }
 130:      }
 131:   
 132:      ////////////////////////////////////////////////////////////////////////////
 133:      ////////////////////////////////////////////////////////////////////////////
 134:  }