示例#1
0
        public IEnumerable <Project> GetUserProjects()
        {
            if (user == null)
            {
                return(new Project[0]);
            }

            return(db.SelectObjects <Project> ("SELECT * FROM Project, UserProject WHERE Project.Id = UserProject.ProjectId AND UserProject.UserId = {0} AND UserProject.Permissions & {1} != 0 AND Project.ApplicationId={2}", user.Id, (int)ProjectPermission.Administer, application.Id));
        }
示例#2
0
 public IEnumerable <Application> GetApplications()
 {
     return(db.SelectObjects <Application> ());
 }