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.
42 lines
944 B
42 lines
944 B
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.CreateTime = DateTime.Now;
|
|
return UserDAL.Add(user);
|
|
}
|
|
|
|
public static int Edit(User user)
|
|
{
|
|
return UserDAL.Edit(user);
|
|
}
|
|
|
|
public static int Delete(int id)
|
|
{
|
|
return UserDAL.Delete(id);
|
|
}
|
|
|
|
public static Page<User> Query(int pageIndex, int pageSize)
|
|
{
|
|
return UserDAL.Query(pageIndex, pageSize);
|
|
}
|
|
}
|
|
}
|