You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB

4 years ago
using System;
using PetaPoco;
4 years ago
using Pingchuan.BeijingSafeguard.DAL;
4 years ago
using Pingchuan.BeijingSafeguard.Model;
namespace Pingchuan.BeijingSafeguard.BLL
{
public class UserBLL
{
public static User GetUser(string name,string password)
{
return UserDAL.Get(name, password);
}
public static User GetUserIdByRealName(string realName)
{
return UserDAL.Get(realName);
4 years ago
}
public static int Add(User user)
{
4 years ago
user.Enabled = 1;
4 years ago
user.ComputeCount = 0;
user.LastComputeTime = null;
3 years ago
user.LoginCount = 0;
4 years ago
user.LastLoginTime = null;
4 years ago
user.CreateTime = DateTime.Now;
4 years ago
return UserDAL.Add(user);
}
4 years ago
public static int Update(User user)
4 years ago
{
4 years ago
return UserDAL.Update(user);
4 years ago
}
public static int Delete(int id)
{
return UserDAL.Delete(id);
}
public static Pagination<UserDTO> Query(int orgId, int pageIndex, int pageSize)
4 years ago
{
return UserDAL.Query(orgId, pageIndex, pageSize);
4 years ago
}
4 years ago
4 years ago
}
}