public IActionResult ChangeUserLogin()
 {
     try
     {
         if (HttpContext.Session.GetString("session_CurrentActiveUserId") != null)
         {
             var currentUser = _oeUsersServ.GetUserByID(Convert.ToInt64(HttpContext.Session.GetString("session_CurrentActiveUserId")), he.WebRootPath);
             var user        = new IndexUsersVM_Users
             {
                 Id = currentUser.Users.Id
             };
             var model = new IndexUsersVM()
             {
                 users = user,
             };
             return(View("ChangeUserLogin/ChangeUserLogin", model));
         }
         else
         {
             return(RedirectToAction("Login", "Home", new { area = "" }));
         }
     }
     catch (Exception)
     {
         return(RedirectToAction("Login", "Home", new { area = "" }));
     }
 }
        public IActionResult Index()
        {
            try
            {
                string CurrentActiveUserId  = HttpContext.Session.GetString("session_CurrentActiveUserId");
                string CurrentActiveActorId = HttpContext.Session.GetString("session_currentActiveActorTab"); //[NOTE: 11=admin]
                if (!string.IsNullOrEmpty(CurrentActiveUserId) && (CurrentActiveActorId == "-1" || CurrentActiveActorId == "10" || CurrentActiveActorId == "11" || CurrentActiveActorId == "12" || CurrentActiveActorId == "13" || CurrentActiveActorId == "14"))
                {
                    var p    = _oeUsersServ.GetUserByID(Convert.ToInt64(HttpContext.Session.GetString("session_CurrentActiveUserId")), he.WebRootPath);
                    var temp = new IndexUsersVM_Users()
                    {
                        Id = p.Users.Id,

                        GenderId  = p.Users.GenderId,
                        IP300X200 = p.Users.IP300X200
                    };
                    var model = new IndexUsersVM()
                    {
                        users = temp
                    };

                    return(View("Index/Index", model));
                }
                else
                {
                    return(RedirectToAction("Login", "Home", new { area = "" }));
                }
            }
            catch (Exception)
            {
                return(RedirectToAction("Login", "Home", new { area = "" }));
            }
        }
        public IActionResult ChangePassword()
        {
            try
            {
                if (HttpContext.Session.GetString("session_CurrentActiveUserId") != null)
                {
                    var currentUser = _oeUsersServ.GetUserByID(Convert.ToInt64(HttpContext.Session.GetString("session_CurrentActiveUserId")), he.WebRootPath);
                    var userList    = new List <IndexUsersVM_Users>();
                    var u           = new IndexUsersVM_Users
                    {
                        Id = currentUser.Users.Id,

                        GenderId  = currentUser.Users.GenderId,
                        FirstName = currentUser?.Users?.FirstName,
                        LastName  = currentUser?.Users?.LastName,
                        IP300X200 = currentUser?.Users?.IP300X200,
                        IP600X400 = currentUser?.Users?.IP600X400,

                        OurEduId = currentUser?.Users?.OurEduId,
                        Password = currentUser?.Users?.Password
                    };

                    userList.Add(u);
                    var model = new IndexUsersVM()
                    {
                        OEUsersListVMs = userList
                    };
                    return(View("ChangePassword/ChangePassword", model));
                }
                else
                {
                    return(RedirectToAction("Login", "Home", new { area = "" }));
                }
            }
            catch (Exception)
            {
                return(RedirectToAction("Login", "Home", new { area = "" }));
            }
        }