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

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Administration

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

Administration support class for Next Generation Network (NGN) web application (Intranet) model.

   1:  using System;
   2:  using System.Data;
   3:  using System.Collections.Generic;
   4:  using System.Linq;
   5:   
   6:  namespace Ia.Ngn.Ofn.Wa.Model.Business
   7:  {
   8:      ////////////////////////////////////////////////////////////////////////////
   9:   
  10:      /// <summary publish="true">
  11:      /// Administration support class for Next Generation Network (NGN) web application (Intranet) model.
  12:      /// </summary>
  13:      /// 
  14:      /// <remarks> 
  15:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  16:      ///
  17:      /// 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
  18:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  19:      ///
  20:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  21:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  22:      /// 
  23:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  24:      /// 
  25:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  26:      /// </remarks> 
  27:      public class Administration
  28:      {
  29:          ////////////////////////////////////////////////////////////////////////////
  30:   
  31:          /// <summary>
  32:          ///
  33:          /// </summary>
  34:          public Administration()
  35:          {
  36:          }
  37:   
  38:          ////////////////////////////////////////////////////////////////////////////
  39:   
  40:          /// <summary>
  41:          ///
  42:          /// </summary>
  43:          public static string PrepareFieldTnmdSupplierWorkorderPaperForm(List<Guid> userIdList, int siteId)
  44:          {
  45:              string html, htmlTable, arabicAreaName;
  46:              DataTable dataTable;
  47:              DateTime formDate;
  48:   
  49:              dataTable = Ia.Ngn.Cl.Model.Ui.Report.ReadSpecificUserIdAndAreaIdReportWithReportOpenStatusListDataTable(userIdList, siteId);
  50:   
  51:              htmlTable = Ia.Cl.Model.Default.GenerateHtmlTableFromDataTable(dataTable);
  52:   
  53:              arabicAreaName = (from s in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.SiteList where s.Id == siteId select s.ArabicName).SingleOrDefault();
  54:   
  55:              formDate = DateTime.UtcNow.AddHours(3); 
  56:   
  57:              html = Ia.Ngn.Ofn.Wa.Model.Data.Administration.FieldTnmdSupplierWorkorderPaperFormHtml;
  58:   
  59:              html = html.Replace("{$arabicAreaName}", arabicAreaName);
  60:              html = html.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
  61:   
  62:              html = html.Replace("{$reportTable}", htmlTable);
  63:   
  64:              return html;
  65:          }
  66:   
  67:          ////////////////////////////////////////////////////////////////////////////
  68:   
  69:          /// <summary>
  70:          ///
  71:          /// </summary>
  72:          public static string PrepareFieldTnmdSupplierWorkorderEmailForm(List<Guid> userIdList, int siteId)
  73:          {
  74:              string text, textTable, arabicAreaName;
  75:              DataTable dataTable;
  76:              DateTime formDate;
  77:   
  78:              dataTable = Ia.Ngn.Cl.Model.Ui.Report.ReadSpecificUserIdAndAreaIdReportWithReportOpenStatusListDataTable(userIdList, siteId);
  79:   
  80:              textTable = Ia.Cl.Model.Default.GenerateTabSeparatedTextFromDataTable(dataTable);
  81:   
  82:              textTable = textTable.Replace("&nbsp;", " ");
  83:   
  84:              arabicAreaName = (from s in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.SiteList where s.Id == siteId select s.ArabicName).SingleOrDefault();
  85:   
  86:              formDate = DateTime.UtcNow.AddHours(3);
  87:   
  88:              text = Ia.Ngn.Ofn.Wa.Model.Data.Administration.FieldTnmdSupplierWorkorderEmailFormText;
  89:   
  90:              text = text.Replace("{$arabicAreaName}", arabicAreaName);
  91:              text = text.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
  92:   
  93:              text = text.Replace("{$reportTable}", textTable);
  94:   
  95:              return text;
  96:          }
  97:   
  98:          ////////////////////////////////////////////////////////////////////////////
  99:          ////////////////////////////////////////////////////////////////////////////   
 100:      }
 101:   
 102:      ////////////////////////////////////////////////////////////////////////////
 103:      ////////////////////////////////////////////////////////////////////////////   
 104:  }