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

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

    1: using Microsoft.AspNetCore.Authorization;
    2: using Microsoft.AspNetCore.Identity;
    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 AlarmController : Controller
   29:     {
   30:         private readonly UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> userManager;
   31:  
   32:         /////////////////////////////////////////////////////////////////////////////////
   33:  
   34:         /// <summary>
   35:         ///
   36:         /// </summary>
   37:         public AlarmController(UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> _userManager)
   38:         {
   39:             userManager = _userManager;
   40:         }
   41:  
   42:         /////////////////////////////////////////////////////////////////////////////////
   43:  
   44:         /// <summary>
   45:         ///
   46:         /// </summary>
   47:         public IActionResult Index()
   48:         {
   49:             var staffIdentityUser = userManager.GetUserAsync(this.User).Result;
   50:  
   51:             var alarmViewModel = new Ia.Ftn.Wa.Models.Alarm.AlarmViewModel()
   52:             {
   53:                 CurrentStaffIdentityUser = staffIdentityUser,
   54:                 UserManager = userManager
   55:             };
   56:  
   57:             return View(alarmViewModel);
   58:         }
   59:  
   60:         /////////////////////////////////////////////////////////////////////////////////
   61:  
   62:         /// <summary>
   63:         ///
   64:         /// </summary>
   65:         [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
   66:         public IActionResult Error()
   67:         {
   68:             return View(new Ia.Ftn.Wa.Models.ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
   69:         }
   70:  
   71:         /////////////////////////////////////////////////////////////////////////////////
   72:         /////////////////////////////////////////////////////////////////////////////////
   73:     }
   74:  
   75:     /////////////////////////////////////////////////////////////////////////////////
   76:     /////////////////////////////////////////////////////////////////////////////////
   77: }