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