)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
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:     /// </remarks> 
   17:     [Authorize]
   18:     public class AlarmController : Controller
   19:     {
   20:         private readonly UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> userManager;
   21:  
   22:         /////////////////////////////////////////////////////////////////////////////////
   23:  
   24:         /// <summary>
   25:         ///
   26:         /// </summary>
   27:         public AlarmController(UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> _userManager)
   28:         {
   29:             userManager = _userManager;
   30:         }
   31:  
   32:         /////////////////////////////////////////////////////////////////////////////////
   33:  
   34:         /// <summary>
   35:         ///
   36:         /// </summary>
   37:         public IActionResult Index()
   38:         {
   39:             var staffIdentityUser = userManager.GetUserAsync(this.User).Result;
   40:  
   41:             var alarmViewModel = new Ia.Ftn.Wa.Models.Alarm.AlarmViewModel()
   42:             {
   43:                 CurrentStaffIdentityUser = staffIdentityUser,
   44:                 UserManager = userManager
   45:             };
   46:  
   47:             return View(alarmViewModel);
   48:         }
   49:  
   50:         /////////////////////////////////////////////////////////////////////////////////
   51:  
   52:         /// <summary>
   53:         ///
   54:         /// </summary>
   55:         [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
   56:         public IActionResult Error()
   57:         {
   58:             return View(new Ia.Ftn.Wa.Models.ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
   59:         }
   60:  
   61:         /////////////////////////////////////////////////////////////////////////////////
   62:         /////////////////////////////////////////////////////////////////////////////////
   63:     }
   64:  
   65:     /////////////////////////////////////////////////////////////////////////////////
   66:     /////////////////////////////////////////////////////////////////////////////////
   67: }