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

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

Service Request Type API Controller class of Fixed Telecommunications Network (FTN) model.

    1: using Microsoft.AspNetCore.Mvc;
    2: using System.Collections;
    3: using System.Data;
    4:  
    5: namespace Ia.Ftn.Api.Wa.Controllers
    6: {
    7:     ////////////////////////////////////////////////////////////////////////////
    8:  
    9:     /// <summary publish="true">
   10:     /// Service Request Type API Controller class of Fixed Telecommunications Network (FTN) model.
   11:     /// </summary>
   12:     /// 
   13:     /// <remarks> 
   14:     /// Copyright © 2021-2024 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:     [ApiController]
   27:     // [Authorize]
   28:     public partial class ServiceRequestTypeController : ControllerBase
   29:     {
   30:         //private static readonly object objectLock = new object();
   31:  
   32:         ////////////////////////////////////////////////////////////////////////////
   33:  
   34:         /// <summary>
   35:         /// Service Request: List service request type values within the Fixed Telecommunications Network
   36:         /// </summary>
   37:         public ServiceRequestTypeController() { }
   38:  
   39:         ////////////////////////////////////////////////////////////////////////////
   40:  
   41:         /// <summary>
   42:         /// List of service request type type (sic) list
   43:         /// </summary>
   44:         [HttpGet]
   45:         [Route("api/v1/service-request-types/types")]
   46:         public SortedList GetServiceRequestTypeTypeList()
   47:         {
   48:             return Ia.Ftn.Cl.Models.Data.ServiceRequestType.ServiceRequestTypeTypeList;
   49:         }
   50:  
   51:         ////////////////////////////////////////////////////////////////////////////
   52:  
   53:         /// <summary>
   54:         /// Put/update a service request type
   55:         /// </summary>
   56:         [HttpPut]
   57:         [Route("api/v1/service-request-types")]
   58:         public string PostServiceRequestType(int SRV_REQ_ID, int SRV_NO, int TECH_TYPE_ID, string VAL)
   59:         {
   60:             DataTable dataTable;
   61:             string service;
   62:             //bool isUpdated;
   63:  
   64:             //Ia.Cl.Model.Result result;
   65:  
   66:             service = SRV_NO.ToString();
   67:  
   68:             dataTable = new DataTable
   69:             {
   70:                 TableName = @"SRV_REQ_FIPER.SRV_NO = " + service + " and SRV_REQ_FIPER_TECH.SRV_REQ_ID"
   71:             };
   72:  
   73:             dataTable.Columns.Add("SRV_REQ_ID", typeof(int));
   74:             dataTable.Columns.Add("SRV_NO", typeof(int));
   75:             dataTable.Columns.Add("TECH_TYPE_ID", typeof(int));
   76:             dataTable.Columns.Add("VAL", typeof(string));
   77:  
   78:             dataTable.Rows.Add(SRV_REQ_ID, SRV_NO, TECH_TYPE_ID, VAL);
   79:  
   80:             //Ia.Ftn.Cl.Models.Data.ServiceRequestType.UpdateForServiceRequestTypeWithOutputDataTableService(dataTable, service, out isUpdated, out result);
   81:  
   82:             return "Update deactivated"; // result.Message;
   83:         }
   84:  
   85:         ////////////////////////////////////////////////////////////////////////////
   86:  
   87:         /// <summary>
   88:         /// List service request types by service request id
   89:         /// </summary>
   90:         [HttpGet]
   91:         [Route("api/v1/service-request-types/{serviceRequestId}")]
   92:         public List<Ia.Ftn.Cl.Models.ServiceRequestType> ListByServiceRequestId(int serviceRequestId)
   93:         {
   94:             var list = Ia.Ftn.Cl.Models.Data.ServiceRequestType.ListByServiceRequestId(serviceRequestId);
   95:  
   96:             return list;
   97:         }
   98:  
   99:         ////////////////////////////////////////////////////////////////////////////
  100:  
  101:         /// <summary>
  102:         /// List service request types by service request id
  103:         /// </summary>
  104:         [HttpGet]
  105:         [Route("api/v1/service-request-types")]
  106:         public List<Ia.Ftn.Cl.Models.ServiceRequestType> ListByServiceRequestId2(int serviceRequestId)
  107:         {
  108:             var list = Ia.Ftn.Cl.Models.Data.ServiceRequestType.ListByServiceRequestId(serviceRequestId);
  109:  
  110:             return list;
  111:         }
  112:  
  113:         ////////////////////////////////////////////////////////////////////////////
  114:         ////////////////////////////////////////////////////////////////////////////
  115:     }
  116: }