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

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

Service Request Type API Controller class of Optical Fiber Network (OFN) model.

    1: using Ia.Cl.Model.Life;
    2: using Ia.Ngn.Cl.Model.Business;
    3: using System;
    4: using System.Collections;
    5: using System.Collections.Generic;
    6: using System.Data;
    7: using System.Linq;
    8: using System.Runtime.Serialization;
    9: using System.Web.Http;
   10: using System.Xml.Linq;
   11:  
   12: namespace Ia.Ngn.Ofn.Wa.Api.Model.Controller
   13: {
   14:     ////////////////////////////////////////////////////////////////////////////
   15:  
   16:     /// <summary publish="true">
   17:     /// Service Request Type API Controller class of Optical Fiber Network (OFN) model.
   18:     /// </summary>
   19:     /// 
   20:     /// <remarks> 
   21:     /// Copyright © 2021-2022 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   22:     ///
   23:     /// 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
   24:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   25:     ///
   26:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   27:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   28:     /// 
   29:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   30:     /// 
   31:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   32:     /// </remarks> 
   33:     // [Authorize]
   34:     public partial class ServiceRequestTypeController : ApiController
   35:     {
   36:         private static readonly object objectLock = new object();
   37:  
   38:         ////////////////////////////////////////////////////////////////////////////
   39:  
   40:         /// <summary>
   41:         /// Service Request: List service request type values within the Optical Fiber Network
   42:         /// </summary>
   43:         public ServiceRequestTypeController() { }
   44:  
   45:         ////////////////////////////////////////////////////////////////////////////
   46:  
   47:         /// <summary>
   48:         /// List of service request type type (sic) list
   49:         /// </summary>
   50:         [HttpGet]
   51:         [Route("api/v1/service-request-types/types")]
   52:         public SortedList GetServiceRequestTypeTypeList()
   53:         {
   54:             return Ia.Ngn.Cl.Model.Data.ServiceRequestType.ServiceRequestTypeTypeList;
   55:         }
   56:  
   57:         ////////////////////////////////////////////////////////////////////////////
   58:  
   59:         /// <summary>
   60:         /// Put/update a service request type
   61:         /// </summary>
   62:         [HttpPut]
   63:         [Route("api/v1/service-request-types")]
   64:         public string PostServiceRequestType([FromUri] int SRV_REQ_ID, [FromUri] int SRV_NO, [FromUri] int TECH_TYPE_ID, [FromUri] string VAL)
   65:         {
   66:             DataTable dataTable;
   67:             string service;
   68:             bool isUpdated;
   69:  
   70:             Ia.Cl.Model.Result result;
   71:  
   72:             service = SRV_NO.ToString();
   73:  
   74:             dataTable = new DataTable();
   75:             dataTable.TableName = @"SRV_REQ_FIPER.SRV_NO = " + service + " and SRV_REQ_FIPER_TECH.SRV_REQ_ID";
   76:  
   77:             dataTable.Columns.Add("SRV_REQ_ID", typeof(int));
   78:             dataTable.Columns.Add("SRV_NO", typeof(int));
   79:             dataTable.Columns.Add("TECH_TYPE_ID", typeof(int));
   80:             dataTable.Columns.Add("VAL", typeof(string));
   81:  
   82:             dataTable.Rows.Add(SRV_REQ_ID, SRV_NO, TECH_TYPE_ID, VAL);
   83:  
   84:             //Ia.Ngn.Cl.Model.Data.ServiceRequestType.UpdateForServiceRequestTypeWithOutputDataTableService(dataTable, service, out isUpdated, out result);
   85:  
   86:             return "Update deactivated"; // result.Message;
   87:         }
   88:  
   89:         ////////////////////////////////////////////////////////////////////////////
   90:  
   91:         /// <summary>
   92:         /// List service request types by service request id
   93:         /// </summary>
   94:         [HttpGet]
   95:         [Route("api/v1/service-request-types/{serviceRequestId}")]
   96:         public List<Ia.Ngn.Cl.Model.ServiceRequestType> ListByServiceRequestId(int serviceRequestId)
   97:         {
   98:             var list = Ia.Ngn.Cl.Model.Data.ServiceRequestType.ListByServiceRequestId(serviceRequestId);
   99:  
  100:             return list;
  101:         }
  102:  
  103:         ////////////////////////////////////////////////////////////////////////////
  104:  
  105:         /// <summary>
  106:         /// List service request types by service request id
  107:         /// </summary>
  108:         [HttpGet]
  109:         [Route("api/v1/service-request-types")]
  110:         public List<Ia.Ngn.Cl.Model.ServiceRequestType> ListByServiceRequestId2([FromUri] int serviceRequestId)
  111:         {
  112:             var list = Ia.Ngn.Cl.Model.Data.ServiceRequestType.ListByServiceRequestId(serviceRequestId);
  113:  
  114:             return list;
  115:         }
  116:  
  117:         ////////////////////////////////////////////////////////////////////////////
  118:         ////////////////////////////////////////////////////////////////////////////
  119:     }
  120: }