)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Statistics (Ia.Ftn.Wa.Models.Administration)

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

    1: using Microsoft.AspNetCore.Identity;
    2:  
    3: namespace Ia.Ftn.Wa.Models.Administration
    4: {
    5:     ////////////////////////////////////////////////////////////////////////////
    6:  
    7:     /// <summary publish="true">
    8:     ///
    9:     /// </summary>
   10:     /// 
   11:     /// <remarks> 
   12:     /// Copyright � 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   13:     ///
   14:     /// 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
   15:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   16:     ///
   17:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   18:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   19:     /// 
   20:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   21:     /// 
   22:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   23:     /// </remarks> 
   24:     public static class Statistics
   25:     {
   26:         ////////////////////////////////////////////////////////////////////////////
   27:  
   28:         /// <summary>
   29:         ///
   30:         /// </summary>
   31:         public static void SiteStatisticViewModel(ref Ia.Ftn.Wa.Models.Administration.StatisticsViewModel statisticsViewModel)
   32:         {
   33:             var list = Ia.Ftn.Cl.Models.Data.Administration.SiteStatistics();
   34:  
   35:             statisticsViewModel.SiteStatisticsList = list;
   36:  
   37:  
   38:             statisticsViewModel.SiteStatisticFiberMsanPstnChart = new Ia.Cl.Models.Ui.Chart();
   39:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Id = "char1";
   40:  
   41:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Labels = (from l in list where l.Name != "Total" select l.NameArabicName).ToList(); // exclude the Total columns
   42:  
   43:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Label1 = "Fiber Services";
   44:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Data1 = (from l in list where l.Name != "Total" select l.FiberService).ToList();
   45:  
   46:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Label2 = "MSAN Services";
   47:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Data2 = (from l in list where l.Name != "Total" select l.MsanService).ToList();
   48:  
   49:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Label3 = "PSTN Services";
   50:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Data3 = (from l in list where l.Name != "Total" select l.PstnService).ToList();
   51:  
   52:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Type = "bar";
   53:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Width = 600;
   54:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.Height = 300;
   55:  
   56:             statisticsViewModel.SiteStatisticFiberMsanPstnChart.DataBind();
   57:  
   58:  
   59:             statisticsViewModel.SiteStatisticServiceChart = new Ia.Cl.Models.Ui.Chart();
   60:             statisticsViewModel.SiteStatisticServiceChart.Id = "char2";
   61:  
   62:             statisticsViewModel.SiteStatisticServiceChart.Labels = (from l in list where l.Name != "Total" select l.Name).ToList(); // exclude the Total columns
   63:             statisticsViewModel.SiteStatisticServiceChart.Label1 = "Services";
   64:  
   65:             statisticsViewModel.SiteStatisticServiceChart.Data1 = (from l in list where l.Name != "Total" select l.FiberService).ToList();
   66:  
   67:             statisticsViewModel.SiteStatisticServiceChart.Type = "pie";
   68:             statisticsViewModel.SiteStatisticServiceChart.Width = 400;
   69:  
   70:             statisticsViewModel.SiteStatisticServiceChart.DataBind();
   71:  
   72:  
   73:             statisticsViewModel.SiteStatisticAccessCapacityChart = new Ia.Cl.Models.Ui.Chart();
   74:             statisticsViewModel.SiteStatisticAccessCapacityChart.Id = "char3";
   75:  
   76:             statisticsViewModel.SiteStatisticAccessCapacityChart.Labels = (from l in list where l.Name != "Total" select l.Name).ToList(); // exclude the Total columns
   77:             statisticsViewModel.SiteStatisticAccessCapacityChart.Label1 = "Access Capacity";
   78:  
   79:             statisticsViewModel.SiteStatisticAccessCapacityChart.Data1 = (from l in list where l.Name != "Total" select l.FiberAccessCapacity).ToList();
   80:  
   81:             statisticsViewModel.SiteStatisticAccessCapacityChart.Type = "pie";
   82:             statisticsViewModel.SiteStatisticAccessCapacityChart.Width = 400;
   83:  
   84:             statisticsViewModel.SiteStatisticAccessCapacityChart.DataBind();
   85:         }
   86:  
   87:         ////////////////////////////////////////////////////////////////////////////
   88:  
   89:         /// <summary>
   90:         ///
   91:         /// </summary>
   92:         public static void AreaStatisticViewModel(ref Ia.Ftn.Wa.Models.Administration.StatisticsViewModel statisticsViewModel)
   93:         {
   94:             var list = Ia.Ftn.Cl.Models.Data.Administration.ServiceAccessStatisticWithinKuwaitFtnArea();
   95:  
   96:             statisticsViewModel.AreaStatisticsList = list;
   97:  
   98:             statisticsViewModel.AreaStatisticChart = new Ia.Cl.Models.Ui.Chart();
   99:             statisticsViewModel.AreaStatisticChart.Id = "char4";
  100:  
  101:             statisticsViewModel.AreaStatisticChart.Labels = (from l in list where l.Name != "Total" select l.Name).ToList(); // exclude the Total columns
  102:  
  103:             statisticsViewModel.AreaStatisticChart.Label1 = "Access (Installed)";
  104:             statisticsViewModel.AreaStatisticChart.Data1 = (from l in list where l.Name != "Total" select l.NokiaAccess + l.HuaweiAccess).ToList();
  105:             statisticsViewModel.AreaStatisticChart.Label2 = "Access (Ready)";
  106:             statisticsViewModel.AreaStatisticChart.Data2 = (from l in list where l.Name != "Total" select l.AccessReady).ToList();
  107:  
  108:             statisticsViewModel.AreaStatisticChart.Label3 = "Access (Used)";
  109:             statisticsViewModel.AreaStatisticChart.Data3 = (from l in list where l.Name != "Total" select l.AccessUsed).ToList();
  110:  
  111:             statisticsViewModel.AreaStatisticChart.Label4 = "Services";
  112:             statisticsViewModel.AreaStatisticChart.Data4 = (from l in list where l.Name != "Total" select l.Service).ToList();
  113:  
  114:             statisticsViewModel.AreaStatisticChart.Type = "horizontalBar";
  115:             statisticsViewModel.AreaStatisticChart.Width = 800;
  116:             statisticsViewModel.AreaStatisticChart.Height = 1800;
  117:  
  118:             statisticsViewModel.AreaStatisticChart.DataBind();
  119:  
  120:             /*
  121:             siteStatisticFtnPstnChart.Label2 = "PSTN Services";
  122:             siteStatisticFtnPstnChart.Data2 = (from l in list where l.Name != "Total" select l.PstnService).ToList();
  123:             siteStatisticFtnPstnChart.DataBind();
  124: 
  125:             siteStatisticServiceChart.Labels = (from l in list where l.Name != "Total" select l.Name).ToList(); // exclude the Total columns
  126:             siteStatisticServiceChart.Label1 = "Services";
  127:             siteStatisticServiceChart.Data1 = (from l in list where l.Name != "Total" select l.Service).ToList();
  128:             siteStatisticServiceChart.DataBind();
  129: 
  130:             siteStatisticAccessCapacityChart.Labels = (from l in list where l.Name != "Total" select l.Name).ToList(); // exclude the Total columns
  131:             siteStatisticAccessCapacityChart.Label1 = "Access Capacity";
  132:             siteStatisticAccessCapacityChart.Data1 = (from l in list where l.Name != "Total" select l.AccessCapacity).ToList();
  133:             siteStatisticAccessCapacityChart.DataBind();
  134:             */
  135:  
  136:         }
  137:  
  138:         ////////////////////////////////////////////////////////////////////////////
  139:         ////////////////////////////////////////////////////////////////////////////
  140:     }
  141:  
  142:     ////////////////////////////////////////////////////////////////////////////
  143:     ////////////////////////////////////////////////////////////////////////////
  144: }