شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Business

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

Islamic Usool Support Functions: Business model

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Data;
   6:  using System.Text;
   7:  using System.Xml;
   8:  using System.Xml.Linq;
   9:  using System.Text.RegularExpressions;
  10:   
  11:  namespace Ia.Islamic.Usool.Model
  12:  {
  13:      ////////////////////////////////////////////////////////////////////////////
  14:   
  15:      /// <summary publish="true">
  16:      /// Islamic Usool Support Functions: Business model
  17:      /// </summary>
  18:      /// <value>
  19:      /// https://msdn.microsoft.com/en-us/library/z1hkazw7(v=vs.100).aspx
  20:      /// </value>
  21:      /// <remarks> 
  22:      /// Copyright © 2001-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  23:      ///
  24:      /// 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
  25:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  26:      ///
  27:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  28:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  29:      /// 
  30:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  31:      /// 
  32:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  33:      /// </remarks> 
  34:      public class Business
  35:      {
  36:          ////////////////////////////////////////////////////////////////////////////
  37:   
  38:          /// <summary>
  39:          ///
  40:          /// </summary>
  41:          public Business()
  42:          {
  43:          }
  44:   
  45:          ////////////////////////////////////////////////////////////////////////////
  46:   
  47:          /// <summary>
  48:          ///
  49:          /// </summary>
  50:          public static string BuildBookPage()
  51:          {
  52:              string s;
  53:              XElement xe;
  54:   
  55:              var v = from q in Ia.Islamic.Usool.Model.Data.AlUsoolAlThalatha.Document.Elements("book").Elements("language") /* where q.Attribute("name").Value == languageCode */ select q;
  56:              xe = v.First().Element("content");
  57:              var reader = xe.CreateReader();
  58:              reader.MoveToContent();
  59:              s = reader.ReadInnerXml();
  60:   
  61:              s = s.Replace("paragraph", "p");
  62:              s = s.Replace("</p>", "</p>\r\n");
  63:   
  64:              s = s.Replace("header", "h2");
  65:              s = s.Replace("</h2>", "</h2>\r\n");
  66:   
  67:              s = Ia.Cl.Model.Language.SlightlyChangeSomeSentencesToPreventSystemFromGeneratingSingleCharacters(s);
  68:              s = Ia.Cl.Model.Language.RemoveSmallKoranicJawazAndSiliCharacters(s);
  69:   
  70:              s = s.Replace(@"</ءاية>", "</a>");
  71:              s = Regex.Replace(s, @"<ءاية id=""(\d{1,3})\:(\d{1,3})"">", @"<a href=""http://krn.org/ar/$1.aspx#$2"">");
  72:   
  73:              s = s.Replace(@"</ترجمة>", "»");
  74:              s = Regex.Replace(s, @"<ترجمة id=""(\d{1,3})\:(\d{1,3})"">", @"«");
  75:   
  76:              return s;
  77:          }
  78:   
  79:          ////////////////////////////////////////////////////////////////////////////
  80:          ////////////////////////////////////////////////////////////////////////////
  81:      }
  82:  }