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()); }
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("登录失败,账号或密码错误"); }
public Ts_Servers GetServerId(string ServerName) { return(_ormServers.Find(w => w.ServerName == ServerName)); }
public Ts_Tasks GetTaskByGuid(string TaskGuid) { return(_ormTasks.Find(w => w.Guid == TaskGuid)); }