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

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 Optical Fiber Network (OFN) web application (Intranet) model.

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