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

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

Administration support class for Fixed Telecommunications Network (FTN) 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.Ftn.Wa.Models.Business
    8: {
    9:     ////////////////////////////////////////////////////////////////////////////
   10:  
   11:     /// <summary publish="true">
   12:     /// Administration support class for Fixed Telecommunications Network (FTN) 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:     /// </remarks> 
   18:     public class Administration
   19:     {
   20:         ////////////////////////////////////////////////////////////////////////////
   21:  
   22:         /// <summary>
   23:         ///
   24:         /// </summary>
   25:         public Administration()
   26:         {
   27:         }
   28:  
   29:         ////////////////////////////////////////////////////////////////////////////
   30:  
   31:         /// <summary>
   32:         ///
   33:         /// </summary>
   34:         public static string PrepareFieldTnmdSupplierWorkorderPaperForm(List<string> userIdList, string frameworkId, List<int> actionCheckBoxSelectedItemValueList)
   35:         {
   36:             string html, htmlTable, arabicAreaName;
   37:             DataTable dataTable;
   38:             DateTime formDate;
   39:  
   40:             dataTable = Ia.Ftn.Cl.Models.Ui.Report.ToSimpleTextDataTable(userIdList, frameworkId, actionCheckBoxSelectedItemValueList);
   41:  
   42:             htmlTable = Ia.Cl.Models.Default.GenerateHtmlTableFromDataTable(dataTable);
   43:  
   44:             arabicAreaName = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.Id.ToString() == frameworkId select s.ArabicName).SingleOrDefault();
   45:  
   46:             formDate = DateTime.UtcNow.AddHours(3);
   47:  
   48:             html = Ia.Ftn.Wa.Models.Data.Administration.FieldTnmdSupplierWorkorderPaperFormHtml;
   49:  
   50:             html = html.Replace("{$arabicAreaName}", arabicAreaName);
   51:             html = html.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
   52:  
   53:             html = html.Replace("{$reportTable}", htmlTable);
   54:  
   55:             return html;
   56:         }
   57:  
   58:         ////////////////////////////////////////////////////////////////////////////
   59:  
   60:         /// <summary>
   61:         ///
   62:         /// </summary>
   63:         public static string PrepareFieldTnmdSupplierWorkorderEmailForm(List<string> userIdList, string frameworkId, List<int> actionCheckBoxSelectedItemValueList)
   64:         {
   65:             string text, formText, arabicAreaName;
   66:             DateTime formDate;
   67:  
   68:             text = Ia.Ftn.Cl.Models.Ui.Report.ToSimpleTextString(userIdList, frameworkId, actionCheckBoxSelectedItemValueList);
   69:  
   70:             text = text.Replace("&nbsp;", " ");
   71:  
   72:             arabicAreaName = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.Id.ToString() == frameworkId select s.ArabicName).SingleOrDefault();
   73:  
   74:             formDate = DateTime.UtcNow.AddHours(3);
   75:  
   76:             formText = Ia.Ftn.Wa.Models.Data.Administration.FieldTnmdSupplierWorkorderEmailFormText;
   77:  
   78:             formText = formText.Replace("{$arabicAreaName}", arabicAreaName);
   79:             formText = formText.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
   80:  
   81:             formText = formText.Replace("{$reportList}", text);
   82:  
   83:             return formText;
   84:         }
   85:  
   86:         ////////////////////////////////////////////////////////////////////////////
   87:  
   88:         /// <summary>
   89:         ///
   90:         /// </summary>
   91:         public static string PrepareFieldTnmdSupplierWorkorderQrCodeTextForm(List<string> userIdList, int siteId)
   92:         {
   93:             string text, formText, arabicAreaName;
   94:             DateTime formDate;
   95:  
   96:             text = Ia.Ftn.Cl.Models.Ui.Report.ToSimpleQrCodeTextString(userIdList, siteId.ToString());
   97:  
   98:             text = text.Replace("&nbsp;", " ");
   99:  
  100:             arabicAreaName = (from s in Ia.Ftn.Cl.Models.Data.NetworkDesignDocument.SiteList where s.Id == siteId select s.ArabicName).SingleOrDefault();
  101:  
  102:             formDate = DateTime.UtcNow.AddHours(3);
  103:  
  104:             formText = Ia.Ftn.Wa.Models.Data.Administration.FieldTnmdSupplierWorkorderEmailFormText;
  105:  
  106:             formText = formText.Replace("{$arabicAreaName}", arabicAreaName);
  107:             formText = formText.Replace("{$date}", formDate.ToString("yyyy-MM-dd"));
  108:  
  109:             formText = formText.Replace("{$reportList}", text);
  110:  
  111:             return formText;
  112:         }
  113:  
  114:         ////////////////////////////////////////////////////////////////////////////
  115:         ////////////////////////////////////////////////////////////////////////////   
  116:     }
  117:  
  118:     ////////////////////////////////////////////////////////////////////////////
  119:     ////////////////////////////////////////////////////////////////////////////   
  120: }