Ejemplo n.º 1
0
        public async Task <IActionResult> Approve(string id)
        {
            var usermanipulation = new UserManipulation()
            {
                Id = id
            };
            await _userRepository.UpdateAsync(SD.UserManipulationPath + 1, usermanipulation, HttpContext.Session.GetString("JWToken"));

            return(RedirectToAction("ListUsers"));// View("GetListUsers");
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteUser(string id)
        {
            var usermanipulation = new UserManipulation()
            {
                Id = id
            };
            //await _userRepository.DeleteAsync(SD.GradesTaughtUrl, id, DeleteUserAsync, HttpContext.Session.GetString("JWToken"));

            var status = await _userRepository.DeleteUserAsync(SD.UserManipulationPath + 1, usermanipulation, HttpContext.Session.GetString("JWToken"));

            if (status)
            {
                return(Json(new { success = true, message = "Deleted Successfuly" }));
            }

            return(Json(new { success = true, message = "Delete Not Successful" }));
        }
Ejemplo n.º 3
0
 public void Initialize()
 {
     _userRepositoryMock     = Nsi.TestsCore.Mocks.Notifications.UserRepositoryMock.GetUserRepositoryMock();
     _languageRepositoryMock = LanguageRepositoryMock.GetLanguageRepositoryMock();
     _userManipulation       = new UserManipulation(_userRepositoryMock.Object, _languageRepositoryMock.Object);
 }