Exemple #1
0
 public static IList <Staff> ListStaffsInGroup(int groupId)
 {
     return(StaffDAL.Get(
                s => s.Assignments.Any(a => a.GroupId == groupId),
                null,
                new List <Expression <Func <Staff, object> > >
     {
         s => s.Assignments,
     }
                ).ToList());
 }
Exemple #2
0
        public ApiMessage <staff> Get(string id)
        {
            var api   = new ApiMessage <staff>();
            var model = _dal.Get(id);

            if (model == null)
            {
                api.Success = false;
                api.Msg     = "该账户不存在";
            }
            else
            {
                api.Data = model;
            }

            return(api);
        }
Exemple #3
0
 public static IList <Staff> ListStaffsNotInGroup(int groupId)
 {
     return(StaffDAL.Get(
                s => s.Assignments.All(a => a.GroupId != groupId)
                ).ToList());
 }