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

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

    1: using System.Data;
    2: using System.Net;
    3:  
    4: namespace Ia.Ftn.Wa.Models.Maintenance
    5: {
    6:     ////////////////////////////////////////////////////////////////////////////
    7:  
    8:     /// <summary publish="true">
    9:     ///
   10:     /// </summary>
   11:     /// 
   12:     /// <remarks> 
   13:     /// Copyright © 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   14:     ///
   15:     /// 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
   16:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   17:     ///
   18:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   19:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   20:     /// 
   21:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   22:     /// 
   23:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   24:     /// </remarks> 
   25:     public static class Find
   26:     {
   27:         private static List<Ia.Ftn.Cl.Models.Ui.Service2> serviceList;
   28:         private static List<Ia.Ftn.Cl.Models.Ui.Nokia.AgcfGatewayRecord> agcfGatewayRecordList;
   29:         private static List<Ia.Ftn.Cl.Models.Ui.Nokia.AgcfEndpoint> agcfEndpointList;
   30:         private static List<Ia.Ftn.Cl.Models.Huawei.Mgw> mgwList;
   31:         private static List<Ia.Ftn.Cl.Models.Huawei.Asbr> asbrList;
   32:         private static List<Ia.Ftn.Cl.Models.Ui.Nokia.SubParty> subPartyList;
   33:         private static List<Ia.Ftn.Cl.Models.Ui.Nokia.Subscriber> subscriberList;
   34:         private static List<Ia.Ftn.Cl.Models.Ui.Huawei.Sbr> sbrList;
   35:         private static List<Ia.Ftn.Cl.Models.Huawei.Owsbr> owsbrList;
   36:         private static List<Ia.Ftn.Cl.Models.Huawei.Seruattr> seruattrList;
   37:         private static List<Ia.Ftn.Cl.Models.Ericsson.AxeSubscriber> axeSubscriberList;
   38:         private static List<Ia.Ftn.Cl.Models.Siemens.EwsdSubscriber> ewsdSubscriberList;
   39:         private static List<Ia.Ftn.Cl.Models.Ont> ontList;
   40:         private static List<Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Ont> nddOntList;
   41:         private static List<Ia.Ftn.Cl.Models.OntServiceVoip> ontServiceVoipList;
   42:         private static List<Ia.Ftn.Cl.Models.OntOntPots> ontOntPotsList;
   43:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsDev> emsDevList;
   44:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsBoard> emsBoardList;
   45:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsPort> emsPortList;
   46:         private static List<Ia.Ftn.Cl.Models.Ui.Huawei.EmsOnt> emsOntList;
   47:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsOntSipInfo> emsOntSipInfoList;
   48:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsVoipPstnUser> emsVoipPstnUserList;
   49:         private static List<Ia.Ftn.Cl.Models.Huawei.EmsVag> emsVagList;
   50:         private static List<Ia.Ftn.Cl.Models.Event> eventList;
   51:         private static List<Ia.Ftn.Cl.Models.Access> accessList;
   52:         private static List<Ia.Ftn.Cl.Models.Ui.ServiceRequestService> serviceRequestServiceList;
   53:         private static List<Ia.Ftn.Cl.Models.ServiceRequest> serviceRequestList;
   54:         private static List<Ia.Ftn.Cl.Models.ServiceRequestAdministrativeIssue> serviceRequestAdministrativeIssueList;
   55:         private static List<Ia.Ftn.Cl.Models.ServiceRequestHistory> serviceRequestHistoryList;
   56:         private static List<Ia.Ftn.Cl.Models.ServiceRequestType> serviceRequestTypeList;
   57:         private static List<Ia.Ftn.Cl.Models.ServiceRequestOnt> serviceRequestOntList;
   58:         private static List<Ia.Ftn.Cl.Models.ServiceRequestOntDetail> serviceRequestOntDetailList;
   59:         private static List<Ia.Ftn.Cl.Models.Report> reportList;
   60:         private static List<Ia.Ftn.Cl.Models.ReportHistory> reportHistoryList;
   61:  
   62:         ////////////////////////////////////////////////////////////////////////////
   63:  
   64:         /// <summary>
   65:         ///
   66:         /// </summary>
   67:         public static void ViewModel(ref Ia.Ftn.Wa.Models.Maintenance.FindViewModel findViewModel)
   68:         {
   69:             Search(ref findViewModel);
   70:         }
   71:  
   72:         ////////////////////////////////////////////////////////////////////////////
   73:  
   74:         /// <summary>
   75:         ///
   76:         /// </summary>
   77:         public static void Post(ref Ia.Ftn.Wa.Models.Maintenance.FindViewModel findViewModel, string commandName)
   78:         {
   79:         }
   80:  
   81:         ////////////////////////////////////////////////////////////////////////////
   82:  
   83:         /// <summary>
   84:         ///
   85:         /// </summary>
   86:         private static void Search(ref Ia.Ftn.Wa.Models.Maintenance.FindViewModel findViewModel)
   87:         {
   88:             string rawInput, inputType;
   89:  
   90:             var enqueueIntoMsmq = true;
   91:             var stopwatch = new Ia.Cl.Models.Stopwatch();
   92:  
   93:             if (!string.IsNullOrEmpty(findViewModel.Input)) rawInput = WebUtility.HtmlDecode(findViewModel.Input);
   94:             else rawInput = null;
   95:  
   96:             inputType = findViewModel.InputType;
   97:  
   98:             Ia.Ftn.Cl.Models.Business.Maintenance.Find.Search(ref stopwatch, findViewModel.CurrentStaffIdentityUser.Framework, enqueueIntoMsmq, rawInput, inputType, out serviceList, out agcfGatewayRecordList, out agcfEndpointList, out mgwList, out asbrList, out subPartyList, out subscriberList, out sbrList, out owsbrList, out seruattrList, out axeSubscriberList, out ewsdSubscriberList, out nddOntList, out ontList, out ontServiceVoipList, out ontOntPotsList, out emsDevList, out emsBoardList, out emsPortList, out emsOntList, out emsOntSipInfoList, out emsVoipPstnUserList, out emsVagList, out eventList, out accessList, out serviceRequestServiceList, out serviceRequestList, out serviceRequestAdministrativeIssueList, out serviceRequestHistoryList, out serviceRequestTypeList, out serviceRequestOntList, out serviceRequestOntDetailList, out reportList, out reportHistoryList, out Ia.Cl.Models.Result result);
   99:  
  100:             stopwatch.RecordElapsedMilliseconds("Y");
  101:  
  102:             if (result.IsSuccessful)
  103:             {
  104:                 if (serviceList != null) findViewModel.Service2List = serviceList.OrderBy(u => u.Port).ToList();
  105:                 else findViewModel.Service2List = serviceList;
  106:  
  107:                 findViewModel.AgcfGatewayRecordList = agcfGatewayRecordList;
  108:  
  109:                 if (agcfEndpointList != null) findViewModel.AgcfEndpointList = agcfEndpointList.OrderBy(u => u.FlatTermID).ToList();
  110:                 else findViewModel.AgcfEndpointList = agcfEndpointList;
  111:  
  112:                 findViewModel.MgwList = mgwList;
  113:                 findViewModel.AsbrList = asbrList;
  114:                 findViewModel.SubPartyList = subPartyList;
  115:                 findViewModel.SubscriberList = subscriberList;
  116:  
  117:                 findViewModel.SbrList = sbrList;
  118:                 findViewModel.OwsbrList = owsbrList;
  119:                 findViewModel.SeruattrList = seruattrList;
  120:                 findViewModel.AxeSubscriberList = axeSubscriberList;
  121:                 findViewModel.EwsdSubscriberList = ewsdSubscriberList;
  122:  
  123:                 if (nddOntList != null) findViewModel.NddOntList = nddOntList.OrderBy(u => u.Id).ToList();
  124:                 else findViewModel.NddOntList = nddOntList;
  125:  
  126:                 findViewModel.OntList = ontList;
  127:                 findViewModel.OntServiceVoipList = ontServiceVoipList;
  128:                 findViewModel.OntOntPotsList = ontOntPotsList;
  129:  
  130:                 findViewModel.EmsDevList = emsDevList;
  131:  
  132:                 if (emsBoardList != null) findViewModel.EmsBoardList = emsBoardList.OrderBy(u => u.SN).ToList();
  133:                 else findViewModel.EmsBoardList = emsBoardList;
  134:  
  135:                 if (emsPortList != null) findViewModel.EmsPortList = emsPortList.OrderBy(u => u.SN).ThenBy(u => u.PN).ToList();
  136:                 else findViewModel.EmsPortList = emsPortList;
  137:  
  138:                 findViewModel.EmsOntList = emsOntList;
  139:  
  140:                 if (emsOntSipInfoList != null) findViewModel.EmsOntSipInfoList = emsOntSipInfoList.OrderBy(u => u.TEL).ToList();
  141:                 else findViewModel.EmsOntSipInfoList = emsOntSipInfoList;
  142:  
  143:                 if (emsVoipPstnUserList != null) findViewModel.EmsVoipPstnUserList = emsVoipPstnUserList.OrderBy(u => u.SN).ThenBy(u => u.PN).ToList();
  144:                 else findViewModel.EmsVoipPstnUserList = emsVoipPstnUserList;
  145:  
  146:                 findViewModel.EmsVagList = emsVagList;
  147:  
  148:                 if (eventList != null) findViewModel.EventList = eventList.OrderByDescending(ev => ev.Created).Take(10).ToList();
  149:                 else findViewModel.EventList = eventList;
  150:  
  151:                 findViewModel.AccessList = accessList;
  152:                 findViewModel.ServiceRequestServiceList = serviceRequestServiceList;
  153:  
  154:                 if (serviceRequestList != null) findViewModel.ServiceRequestList = serviceRequestList.OrderBy(sr => sr.Id).ToList();
  155:                 else findViewModel.ServiceRequestList = serviceRequestList;
  156:  
  157:                 findViewModel.ServiceRequestAdministrativeIssueList = serviceRequestAdministrativeIssueList;
  158:  
  159:                 if (serviceRequestHistoryList != null) findViewModel.ServiceRequestHistoryList = serviceRequestHistoryList.OrderBy(sr => sr.ServiceDateTime).ToList();
  160:                 else findViewModel.ServiceRequestHistoryList = serviceRequestHistoryList;
  161:  
  162:                 findViewModel.ServiceRequestTypeList = serviceRequestTypeList;
  163:  
  164:                 findViewModel.ServiceRequestOntList = serviceRequestOntList;
  165:                 findViewModel.ServiceRequestOntDetailList = serviceRequestOntDetailList;
  166:  
  167:                 findViewModel.ReportListHistoryColumnOnlyList = reportList;
  168:                 //findViewModel.ReportHistoryList = reportHistoryList;
  169:  
  170:                 stopwatch.RecordElapsedMilliseconds("Z");
  171:             }
  172:             else
  173:             {
  174:             }
  175:  
  176:             findViewModel.Result = result;
  177:  
  178:             stopwatch.Stop();
  179:  
  180:             findViewModel.DiagnosticLabel = "Search elapsed time (milliseconds): " + stopwatch.List();
  181:  
  182:             stopwatch.Reset();
  183:         }
  184:  
  185:         ////////////////////////////////////////////////////////////////////////////
  186:         ////////////////////////////////////////////////////////////////////////////
  187:     }
  188:  
  189:     ////////////////////////////////////////////////////////////////////////////
  190:     ////////////////////////////////////////////////////////////////////////////
  191: }