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

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

    1: using Ia.Ftn.Wa.Models;
    2: using Microsoft.AspNetCore.Authorization;
    3: using Microsoft.AspNetCore.Mvc;
    4: using System.Diagnostics;
    5:  
    6: namespace Ia.Ftn.Wa.Controllers
    7: {
    8:     ////////////////////////////////////////////////////////////////////////////
    9:  
   10:     /// <summary publish="true">
   11:     ///
   12:     /// </summary>
   13:     /// 
   14:     /// <remarks> 
   15:     /// Copyright � 2006-2025 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   16:     ///
   17:     /// 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
   18:     /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
   19:     ///
   20:     /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
   21:     /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   22:     /// 
   23:     /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
   24:     /// 
   25:     /// Copyright notice: This notice may not be removed or altered from any source distribution.
   26:     /// </remarks> 
   27:     [Authorize]
   28:     public class MaintenanceScriptController : Controller
   29:     {
   30:         ////////////////////////////////////////////////////////////////////////////
   31:  
   32:         /// <summary>
   33:         /// 
   34:         /// </summary>
   35:         [HttpGet]
   36:         [Route("/maintenance/script")]
   37:         public IActionResult Index()
   38:         {
   39:             var scriptViewModel = new Ia.Ftn.Wa.Models.Maintenance.ScriptViewModel();
   40:  
   41:             Ia.Ftn.Wa.Models.Maintenance.Script.ViewModel(ref scriptViewModel);
   42:  
   43:             return View("Index", scriptViewModel);
   44:         }
   45:  
   46:         ////////////////////////////////////////////////////////////////////////////
   47:  
   48:         /// <summary>
   49:         /// 
   50:         /// </summary>
   51:         [HttpPost]
   52:         [Route("/maintenance/script")]
   53:         public IActionResult Index(Ia.Ftn.Wa.Models.Maintenance.ScriptViewModel scriptViewModel, string commandArgument)
   54:         {
   55:             Ia.Ftn.Wa.Models.Maintenance.Script.Post(ref scriptViewModel, commandArgument);
   56:  
   57:             Ia.Ftn.Wa.Models.Maintenance.Script.ViewModel(ref scriptViewModel);
   58:  
   59:             return View("Index", scriptViewModel);
   60:         }
   61:  
   62:         ////////////////////////////////////////////////////////////////////////////
   63:         ////////////////////////////////////////////////////////////////////////////
   64:  
   65:         /// <summary>
   66:         /// 
   67:         /// </summary>
   68:         [HttpGet]
   69:         [Route("/maintenance/script/access")]
   70:         public IActionResult Access()
   71:         {
   72:             var scriptViewModel = new Ia.Ftn.Wa.Models.Maintenance.ScriptViewModel();
   73:  
   74:             Ia.Ftn.Wa.Models.Maintenance.Script.AccessViewModel(ref scriptViewModel);
   75:  
   76:             return View("Access", scriptViewModel);
   77:         }
   78:  
   79:         ////////////////////////////////////////////////////////////////////////////
   80:  
   81:         /// <summary>
   82:         /// 
   83:         /// </summary>
   84:         [HttpPost]
   85:         [Route("/maintenance/script/access")]
   86:         public IActionResult Access(Ia.Ftn.Wa.Models.Maintenance.ScriptViewModel scriptViewModel, string commandName)
   87:         {
   88:             Ia.Ftn.Wa.Models.Maintenance.Script.Post(ref scriptViewModel, commandName);
   89:  
   90:             Ia.Ftn.Wa.Models.Maintenance.Script.AccessViewModel(ref scriptViewModel);
   91:  
   92:             return View("Access", scriptViewModel);
   93:         }
   94:  
   95:         ////////////////////////////////////////////////////////////////////////////
   96:         ////////////////////////////////////////////////////////////////////////////
   97:  
   98:         /// <summary>
   99:         /// 
  100:         /// </summary>
  101:         [HttpGet]
  102:         [Route("/maintenance/script/telegram")]
  103:         public IActionResult Telegram()
  104:         {
  105:             return View();
  106:         }
  107:  
  108:         ////////////////////////////////////////////////////////////////////////////
  109:         ////////////////////////////////////////////////////////////////////////////
  110:  
  111:         /// <summary>
  112:         /// 
  113:         /// </summary>
  114:         [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
  115:         public IActionResult Error()
  116:         {
  117:             return View(new Ia.Ftn.Wa.Models.ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
  118:         }
  119:  
  120:         ////////////////////////////////////////////////////////////////////////////
  121:         ////////////////////////////////////////////////////////////////////////////
  122:     }
  123:  
  124:     ////////////////////////////////////////////////////////////////////////////
  125:     ////////////////////////////////////////////////////////////////////////////
  126: }