Exemplo n.º 1
0
        public IEnumerable <Assignment> GetByCompany(string id)
        {
            id = this.ResolveUserId(id);
            // TODO: fix this, this is horrible. blame jonas
// werkt alleen as de sterre goe staan en das nu dus ni naart schijnt
//                return Assignments.Find(assignment => assignment.CompanyId == id).ToList();
            IEnumerable <Assignment> ass    = Assignments.Find(tag => true).ToList();
            List <Assignment>        retval = new List <Assignment>();

            foreach (Assignment a in ass)
            {
                if (a.CompanyId.Equals(id))
                {
                    retval.Add(a);
                }
            }
            return(retval);
        }
Exemplo n.º 2
0
 public Assignment GetById(string id)
 {
     return(Assignments.Find(assignment => assignment.Id == id).FirstOrDefault());
 }
Exemplo n.º 3
0
        public IEnumerable <Assignment> GetByCompanyAndStage(string id, AssignmentStage stage)
        {
            id = this.ResolveUserId(id);

            return(Assignments.Find(assignment => assignment.CompanyId == id && assignment.Stage == stage).ToList());
        }
Exemplo n.º 4
0
 public IEnumerable <Assignment> GetOpenByName(string name)
 {
     return(Assignments.Find(assignment => assignment.Stage == AssignmentStage.Open && assignment.Title == name).ToList());     // FIXME: title LIKE * name *
 }
Exemplo n.º 5
0
 public IEnumerable <Assignment> GetOpen()
 {
     return(Assignments.Find(assignment => assignment.Stage == AssignmentStage.Open).ToList());
 }
Exemplo n.º 6
0
 public IEnumerable <Assignment> GetAll()
 {
     return(Assignments.Find(tag => true).ToList());
 }