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