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.

47 lines
1.1 KiB

3 years ago
using System;
using PetaPoco;
3 years ago
using Pingchuan.BeijingSafeguard.DAL;
3 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);
3 years ago
}
public static int Add(User user)
{
3 years ago
user.Enabled = 1;
3 years ago
user.ComputeCount = 0;
user.LastComputeTime = null;
3 years ago
user.LastLoginTime = null;
3 years ago
user.CreateTime = DateTime.Now;
3 years ago
return UserDAL.Add(user);
}
3 years ago
public static int Update(User user)
3 years ago
{
3 years ago
return UserDAL.Update(user);
3 years ago
}
public static int Delete(int id)
{
return UserDAL.Delete(id);
}
public static Pagination<User> Query(int orgId, int pageIndex, int pageSize)
3 years ago
{
return UserDAL.Query(orgId, pageIndex, pageSize);
3 years ago
}
3 years ago
3 years ago
}
}