)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation Links

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

Default business support class.

    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 Grade
   33:     {
   34:         /// <summary/>
   35:         public Grade() { }
   36:  
   37:         /// <summary/>
   38:         public string 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 "~/grade.aspx?id=" + Id; }
   50:         }
   51:  
   52:         /// <summary/>
   53:         public virtual Ia.Learning.Cl.Model.Level Level { get; set; }
   54:  
   55:         /// <summary/>
   56:         public virtual ICollection<Ia.Learning.Cl.Model.Business.Textbook> Textbooks
   57:         {
   58:             get
   59:             {
   60:                 return (from t in Ia.Learning.Cl.Model.Data.Textbook.List where t.Grade == this select t).ToList();
   61:             }
   62:         }
   63:  
   64:         ////////////////////////////////////////////////////////////////////////////
   65:  
   66:         /// <summary>
   67:         ///
   68:         /// </summary>
   69:         public static List<Ia.Learning.Cl.Model.Grade> List
   70:         {
   71:             get
   72:             {
   73:                 var grades = new List<Ia.Learning.Cl.Model.Grade>()
   74:                 {
   75:                     new Ia.Learning.Cl.Model.Grade() { Id = "KG-1", ArabicName = "الأول", Name = "First", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 1 select l).SingleOrDefault() },
   76:                     new Ia.Learning.Cl.Model.Grade() { Id = "KG-2", ArabicName = "الثاني", Name = "Second", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 1 select l).SingleOrDefault() },
   77:  
   78:                     new Ia.Learning.Cl.Model.Grade() { Id = "1", ArabicName = "الأول", Name = "First", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 2 select l).SingleOrDefault() },
   79:                     new Ia.Learning.Cl.Model.Grade() { Id = "2", ArabicName = "الثاني", Name = "Second", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 2 select l).SingleOrDefault() },
   80:                     new Ia.Learning.Cl.Model.Grade() { Id = "3", ArabicName = "الثالث", Name = "Third", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 2 select l).SingleOrDefault() },
   81:                     new Ia.Learning.Cl.Model.Grade() { Id = "4", ArabicName = "الرابع", Name = "Fourth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 2 select l).SingleOrDefault() },
   82:                     new Ia.Learning.Cl.Model.Grade() { Id = "5", ArabicName = "الخامس", Name = "Fifth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 2 select l).SingleOrDefault() },
   83:  
   84:                     new Ia.Learning.Cl.Model.Grade() { Id = "6", ArabicName = "السادس", Name = "Sixth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 3 select l).SingleOrDefault() },
   85:                     new Ia.Learning.Cl.Model.Grade() { Id = "7", ArabicName = "السابع", Name = "Seventh", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 3 select l).SingleOrDefault() },
   86:                     new Ia.Learning.Cl.Model.Grade() { Id = "8", ArabicName = "الثامن", Name = "Eighth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 3 select l).SingleOrDefault() },
   87:                     new Ia.Learning.Cl.Model.Grade() { Id = "9", ArabicName = "التاسع", Name = "Ninth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 3 select l).SingleOrDefault() },
   88:  
   89:                     new Ia.Learning.Cl.Model.Grade() { Id = "10", ArabicName = "العاشر", Name = "Tenth", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 4 select l).SingleOrDefault() },
   90:                     new Ia.Learning.Cl.Model.Grade() { Id = "11-l", ArabicName = "الحادي عشر أدبي", Name = "Elevanth Literature", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 4 select l).SingleOrDefault() },
   91:                     new Ia.Learning.Cl.Model.Grade() { Id = "11-s", ArabicName = "الحادي عشر علمي", Name = "Eleventh Sciences", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 4 select l).SingleOrDefault() },
   92:                     new Ia.Learning.Cl.Model.Grade() { Id = "12-l", ArabicName = "الثاني عشر أدبي", Name = "Twelfth Literature", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 4 select l).SingleOrDefault() },
   93:                     new Ia.Learning.Cl.Model.Grade() { Id = "12-s", ArabicName = "الثاني عشر علمي", Name = "Twelfth Sciences", Level = (from l in Ia.Learning.Cl.Model.Level.List where l.Id == 4 select l).SingleOrDefault() },
   94:                 };
   95:  
   96:                 return grades;
   97:             }
   98:         }
   99:  
  100:         ////////////////////////////////////////////////////////////////////////////
  101:         ////////////////////////////////////////////////////////////////////////////
  102:     }
  103:  
  104:     ////////////////////////////////////////////////////////////////////////////
  105:     ////////////////////////////////////////////////////////////////////////////
  106: }