user login, register, hashed passwords, announcements start
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StudentHouseDashboard.Managers
|
||||
{
|
||||
public class AnnouncementManager
|
||||
{
|
||||
}
|
||||
}
|
41
StudentHouseDashboard/HouseData/Managers/UserManager.cs
Normal file
41
StudentHouseDashboard/HouseData/Managers/UserManager.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using StudentHouseDashboard.Models;
|
||||
using StudentHouseDashboard.Repositories;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace StudentHouseDashboard.Managers
|
||||
{
|
||||
public class UserManager
|
||||
{
|
||||
private UserRepository userRepository;
|
||||
public UserManager()
|
||||
{
|
||||
userRepository = new UserRepository();
|
||||
}
|
||||
public List<User> GetAllUsers()
|
||||
{
|
||||
return userRepository.GetAllUsers();
|
||||
}
|
||||
public User GetUserById(int id)
|
||||
{
|
||||
return userRepository.GetUserById(id);
|
||||
}
|
||||
public bool CreateUser(string name, string password, UserRole role)
|
||||
{
|
||||
return userRepository.CreateUser(name, password, role);
|
||||
}
|
||||
public void UpdateUser(int id, string name, string password, UserRole role)
|
||||
{
|
||||
userRepository.UpdateUser(id, name, password, role);
|
||||
}
|
||||
public void DisableUser(int id)
|
||||
{
|
||||
userRepository.DisableUser(id);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user