Esempio n. 1
0
        public static void SearchUsers(Guid applicationId, ref List <User> retUsers, string searchText,
                                       ref List <Guid> departmentIds, ref List <Guid> expertiseKDIds, ref List <Guid> projectIds,
                                       ref List <Guid> processIds, ref List <Guid> communityIds, ref List <Guid> knowledgeKds,
                                       int?count, Guid?minId)
        {
            string spName = GetFullyQualifiedName("SearchUsers");

            try
            {
                List <Guid> _userIds = new List <Guid>();

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId, count, minId,
                                                                 ProviderUtil.get_search_text(searchText), ProviderUtil.list_to_string <Guid>(ref departmentIds),
                                                                 ProviderUtil.list_to_string <Guid>(ref expertiseKDIds), ProviderUtil.list_to_string <Guid>(ref projectIds),
                                                                 ProviderUtil.list_to_string <Guid>(ref processIds), ProviderUtil.list_to_string <Guid>(ref communityIds),
                                                                 ProviderUtil.list_to_string <Guid>(ref knowledgeKds), ',');

                ProviderUtil.parse_guids(ref reader, ref _userIds);
                retUsers = UsersController.get_users(applicationId, _userIds);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.SRCH);
            }
        }
Esempio n. 2
0
        public static void GetConfidentialityLevelUserIDs(Guid applicationId, ref List <Guid> retUserIds,
                                                          Guid confidentialityId, string searchText, int?count, long?lowerBoundary, ref long totalCount)
        {
            string spName = GetFullyQualifiedName("GetConfidentialityLevelUserIDs");

            try
            {
                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 confidentialityId, ProviderUtil.get_search_text(searchText), count, lowerBoundary);
                _parse_user_ids(ref reader, ref retUserIds, ref totalCount);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.PRVC);
            }
        }
Esempio n. 3
0
        public static List <Guid> GetDashboards(Guid applicationId, ref List <Dashboard> retDashboards, Guid?userId,
                                                Guid?nodeTypeId, Guid?nodeId, string nodeAdditionalId, DashboardType dashboardType, DashboardSubType subType,
                                                string subTypeTitle, bool?done, DateTime?dateFrom, DateTime?dateTo, string searchText, bool?getDistinctItems,
                                                bool?inWorkFlowState, int?lowerBoundary, int?count, ref long totalCount)
        {
            string spName = GetFullyQualifiedName("GetDashboards");

            List <Guid> retList = new List <Guid>();

            try
            {
                if (userId == Guid.Empty)
                {
                    userId = null;
                }
                if (nodeTypeId == Guid.Empty)
                {
                    nodeTypeId = null;
                }
                if (nodeId == Guid.Empty)
                {
                    nodeId = null;
                }
                if (lowerBoundary == 0)
                {
                    lowerBoundary = null;
                }
                if (!count.HasValue || count <= 0)
                {
                    count = 50;
                }

                if (!string.IsNullOrEmpty(nodeAdditionalId))
                {
                    nodeAdditionalId = nodeAdditionalId.Trim();
                }
                if (string.IsNullOrEmpty(nodeAdditionalId))
                {
                    nodeAdditionalId = null;
                }

                string strDashboardType = dashboardType == DashboardType.NotSet ? null : dashboardType.ToString();
                string strSubType       = subType == DashboardSubType.NotSet ?
                                          (string.IsNullOrEmpty(subTypeTitle) ? null : subTypeTitle) : subType.ToString();

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 userId, nodeTypeId, nodeId, nodeAdditionalId, strDashboardType, strSubType, done,
                                                                 dateFrom, dateTo, ProviderUtil.get_search_text(searchText), getDistinctItems, inWorkFlowState, lowerBoundary, count);

                if (!getDistinctItems.HasValue || !getDistinctItems.Value)
                {
                    ProviderUtil.parse_dashboards(ref reader, ref retDashboards, ref totalCount);
                }
                else
                {
                    ProviderUtil.parse_guids(ref reader, ref retList, ref totalCount);
                }

                return(retList);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN);
                return(new List <Guid>());
            }
        }
Esempio n. 4
0
        public static void GetChildNodes(Guid applicationId, ref List <TreeNode> retTreeNodes,
                                         Guid?parentNodeId, Guid?treeId, string searchText)
        {
            string spName = GetFullyQualifiedName("GetChildNodes");

            try
            {
                if (parentNodeId == Guid.Empty)
                {
                    parentNodeId = null;
                }
                if (treeId == Guid.Empty)
                {
                    treeId = null;
                }

                if (!parentNodeId.HasValue && !treeId.HasValue)
                {
                    return;
                }

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 parentNodeId, treeId, ProviderUtil.get_search_text(searchText));
                _parse_tree_nodes(ref reader, ref retTreeNodes);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.DCT);
            }
        }