示例#1
0
        public List <ModelTaskList> GetTaskList(int Status)
        {
            List <Ts_Tasks> list = null;

            if (MyContext.Identity == "admin")
            {
                list = GetAllTask(Status);
            }
            else
            {
                list = GetAllTask(Status, MyContext.CurrentUser.UserId);
            }
            return(list.Select(task => new ModelTaskList(task, _ormTaskExec.Find(w => w.TaskGuid == task.Guid), _systemService.GetUserName(task.CreateUser))).ToList());
        }
示例#2
0
        public IdentityUser UserAuth(string userName, string passWord)
        {
            Tu_Users u = _ormUsers.Find(w => w.UserName == userName);

            if (u != null)
            {
                if (u.PassWord == passWord)
                {
                    //return GetUserInfo(userName);
                    IdentityUser id = new IdentityUser();
                    id.UserId   = u.UserId;
                    id.UserName = u.UserName;

                    return(id);
                }
            }
            throw new BOException("登录失败,账号或密码错误");
        }
示例#3
0
 public Ts_Servers GetServerId(string ServerName)
 {
     return(_ormServers.Find(w => w.ServerName == ServerName));
 }
示例#4
0
 public Ts_Tasks GetTaskByGuid(string TaskGuid)
 {
     return(_ormTasks.Find(w => w.Guid == TaskGuid));
 }