using System;
using System.Collections.Generic;
using System.Text;
using DAL;
namespace BLL
{
   public class check
    {
      
       /// <summary>
       /// 用户不存在或权限错误时跳转
       /// </summary>
       /// <param name="userName"></param>
       /// <returns></returns>
       public static string checkUserName(string userName)
       { 
           DALemployee employee=new DALemployee();
           return employee.loginUserLevel(userName);
       
       }

       
       /// <summary>
       /// 验证用户登录密码
       /// </summary>
       /// <param name="user">用户名</param>
       /// <param name="password">密码</param>
      
       /// <returns>"0"--用户名密码出错，“1”--普通员工，“2”--中层职位，“3”--高层职位</returns>
        public static string checkUser(string user, string password)
        {

            DALemployee employee = new DALemployee();
           string level=employee.loginUserLevel(user,password);
           
            return level;
        }

       /// <summary>
       /// 跟新在线状态
       /// </summary>
       /// <param name="state">“0”--下线，“1”--在线</param>
       /// <param name="name">姓名</param>
       public static void updateOnLine(string state,string name)
       {
           DAL.DALemployee employee = new DALemployee();
           employee.getOnline(state, name);
       }


    }
}
