static internal List <Project> GetTemplates() { string templatesList = UserProjectSecurity.GetUserTemplateList(); string filter = $"ProjectObjectId IN ({templatesList}) " + $"AND Status <> 'X' AND ExtData LIKE '%isTemplate%'"; return(BaseObject.GetList <Project>(filter, "ItemPosition, Name")); }
static internal FixedList <Contact> GetProjectAssignees(Project project) { string AssigneeList = UserProjectSecurity.GetUserAssigneeList(); string sql = $"SELECT * FROM Contacts " + $"WHERE ContactId IN ({AssigneeList})" + $"ORDER BY Nickname, ShortName"; var op = DataOperation.Parse(sql); return(DataReader.GetFixedList <Contact>(op)); }
static internal FixedList <ProjectItem> GetAllActivities() { string projectList = UserProjectSecurity.GetUserProjectList(); string sql = $"SELECT * FROM PMProjectObjects " + $"WHERE BaseProjectId IN ({projectList}) AND ProjectObjectTypeId <> 1203 AND Status <> 'X' AND " + $"BaseProjectId NOT IN (SELECT ProjectObjectId FROM PMProjectObjects WHERE Status = 'X' OR ExtData LIKE '%isTemplate%')"; var op = DataOperation.Parse(sql); return(DataReader.GetList <ProjectItem>(op).ToFixedList()); }
static internal FixedList <Contact> GetProjectInvolvedContacts(Project project) { string[] stringList = UserProjectSecurity.GetUserAssigneeList().Split(','); var list = new Contact[stringList.Length]; for (int i = 0; i < stringList.Length; i++) { list[i] = Contact.Parse(int.Parse(stringList[i])); } return(new FixedList <Contact>(list)); }