)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Skip Navigation LinksHome » Code Library » MaintenanceController

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

Maintenance API Controller class of Next Generation Network'a (NGN's) model.

   1:  using System.Collections.Generic;
   2:  using System.Linq;
   3:  using System.Web.Http;
   4:   
   5:  namespace Ia.Ngn.Cl.Model.Api.Controller
   6:  {
   7:      ////////////////////////////////////////////////////////////////////////////
   8:   
   9:      /// <summary publish="true">
  10:      /// Maintenance API Controller class of Next Generation Network'a (NGN's) model.
  11:      /// </summary>
  12:      /// 
  13:      /// <remarks> 
  14:      /// Copyright © 2006-2017 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
  15:      ///
  16:      /// 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
  17:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  18:      ///
  19:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  20:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  21:      /// 
  22:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  23:      /// 
  24:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  25:      /// </remarks> 
  26:      public class MaintenanceController : ApiController
  27:      {
  28:          ////////////////////////////////////////////////////////////////////////////
  29:   
  30:          /// <summary>
  31:          /// Find information about input
  32:          /// </summary>
  33:          [HttpGet]
  34:          [Route("api/maintenance/find/{key}/{input}")]
  35:          public Ia.Ngn.Cl.Model.Ui.Maintenance.Find Find(string key, string input)
  36:          {
  37:              Ia.Cl.Model.Result result;
  38:              Ia.Ngn.Cl.Model.Business.Administration.StaffContact staffContact;
  39:              Ia.Ngn.Cl.Model.Ui.Maintenance.Find find;
  40:              List<Ia.Ngn.Cl.Model.Ui.Service2> serviceList;
  41:   
  42:              result = new Ia.Cl.Model.Result();
  43:   
  44:              staffContact = (from s in Ia.Ngn.Cl.Model.Data.Administration.StaffContactList where s.ApiKey == key select s).SingleOrDefault();
  45:   
  46:              find = new Ia.Ngn.Cl.Model.Ui.Maintenance.Find();
  47:              serviceList = new List<Ia.Ngn.Cl.Model.Ui.Service2>();
  48:   
  49:              //if (!string.IsNullOrEmpty(input)) input = Server.HtmlDecode(input);
  50:              //else input = null;
  51:   
  52:              if (Ia.Ngn.Cl.Model.Business.Authority.StaffContactCanCreateReadUpdateDeleteMaintenanceFind(Ia.Ngn.Cl.Model.Business.Authority.PersistentStorageFunction.Read, staffContact))
  53:              {
  54:                  Ia.Ngn.Cl.Model.Ui.Maintenance.Find.SearchForApi(staffContact.Staff.Framework, input, out serviceList, out result);
  55:   
  56:                  if (serviceList != null)
  57:                  {
  58:                      find.ServiceList = serviceList;
  59:                  }
  60:                  else
  61:                  {
  62:   
  63:                  }
  64:              }
  65:              else
  66:              {
  67:                  result.AddError("You are not authorized to modify this value (لست مخولاً بتعديل هذه القيمة). ");
  68:              }
  69:   
  70:              find.Result = result;
  71:   
  72:              return find;
  73:          }
  74:   
  75:          ////////////////////////////////////////////////////////////////////////////
  76:   
  77:          /// <summary>
  78:          ///
  79:          /// </summary>
  80:          public IHttpActionResult GetResponse(int id)
  81:          {
  82:              //int outputInt;
  83:              //string outputString;
  84:   
  85:              //Ia.Ngn.Cl.Model.Business.Maintenance.Find.Search(null, operand, inputType, out var serviceList, out agcfGatewayRecordList, out agcfEndpointList, out subPartyList, out subscriberList, out huSbrList, 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 serviceRequestHistoryList, out serviceRequestTypeList, out serviceRequestOntList, out serviceRequestOntDetailList, out reportList, out reportHistoryList, out result);
  86:   
  87:              return Ok(new
  88:              {
  89:                  Id = id,
  90:                  //OutputInt = outputInt,
  91:                  //OutputString = outputString,
  92:              });
  93:          }
  94:   
  95:          ////////////////////////////////////////////////////////////////////////////
  96:          ////////////////////////////////////////////////////////////////////////////
  97:      }
  98:  }