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

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.Collections.Generic;
   3:  using System.Data;
   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.ToSimpleTextDataTable(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, formText, arabicAreaName;
  75:              DateTime formDate;
  76:   
  77:              text = Ia.Ngn.Cl.Model.Ui.Report.ToSimpleTextString(userIdList, siteId);
  78:   
  79:              text = text.Replace("&nbsp;", " ");
  80:   
  81:              arabicAreaName = (from s in Ia.Ngn.Cl.Model.Data.NetworkDesignDocument.SiteList where s.Id == siteId select s.ArabicName).SingleOrDefault();
  82:   
  83:              formDate = DateTime.UtcNow.AddHours(3);
  84:   
  85:              formText = Ia.Ngn.Ofn.Wa.Model.Data.Administration.FieldTnmdSupplierWorkorderEmailFormText;
  86:   
  87:              formText = formText.Replace("{$arabicAreaName}", arabicAreaName);
  88:              formText = formText.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
  89:   
  90:              formText = formText.Replace("{$reportList}", text);
  91:   
  92:              return formText;
  93:          }
  94:   
  95:          ////////////////////////////////////////////////////////////////////////////
  96:          ////////////////////////////////////////////////////////////////////////////   
  97:      }
  98:   
  99:      ////////////////////////////////////////////////////////////////////////////
 100:      ////////////////////////////////////////////////////////////////////////////   
 101:  }