protected void get_confidentiality_level_users(Guid?confidentialityId,
                                                       string searchText, int?count, long?lowerBoundary, ref string responseText)
        {
            //Privacy Check: OK
            if (!paramsContainer.GBEdit)
            {
                return;
            }

            if (!AuthorizationManager.has_right(AccessRoleName.ManageConfidentialityLevels, paramsContainer.CurrentUserID))
            {
                responseText = "{\"ErrorText\":\"" + Messages.AccessDenied + "\"}";
                return;
            }

            long totalCount = 0;

            List <User> users = !confidentialityId.HasValue ? new List <User>() :
                                UsersController.get_users(paramsContainer.Tenant.Id,
                                                          PrivacyController.get_confidentiality_level_user_ids(paramsContainer.Tenant.Id,
                                                                                                               confidentialityId.Value, searchText, count, lowerBoundary, ref totalCount));

            responseText = "{\"TotalCount\":" + totalCount.ToString() +
                           ",\"Users\":[" + ProviderUtil.list_to_string <string>(users.Select(
                                                                                     u => "{\"UserID\":\"" + u.UserID.ToString() + "\"" +
                                                                                     ",\"UserName\":\"" + Base64.encode(u.UserName) + "\"" +
                                                                                     ",\"FirstName\":\"" + Base64.encode(u.FirstName) + "\"" +
                                                                                     ",\"LastName\":\"" + Base64.encode(u.LastName) + "\"" +
                                                                                     ",\"ProfileImageURL\":\"" + DocumentUtilities.get_personal_image_address(
                                                                                         paramsContainer.Tenant.Id, u.UserID.Value) + "\"" +
                                                                                     "}"
                                                                                     ).ToList()) + "]" +
                           "}";
        }
示例#2
0
        public static void GetMessageReceivers(Guid applicationId,
                                               ref List <Message> refMsg, List <Guid> MessagesIds, int?count, int?lastId)
        {
            string spName = GetFullyQualifiedName("GetMessageReceivers");

            try
            {
                if (lastId <= 0)
                {
                    lastId = null;
                }
                if (count <= 0)
                {
                    count = null;
                }

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 ProviderUtil.list_to_string <Guid>(ref MessagesIds), ',', count, lastId);
                _parse_message_receivers(ref reader, ref refMsg);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.MSG);
            }
        }
示例#3
0
        protected override void BeginProcessing()
        {
            NodeDetail   thisNode = null;
            SessionState s1       = this.SessionState;

            string[] pathChunks = ProviderUtil.SplitPath(s1.Path.CurrentLocation.Path, (PSDriveInfo)s1.Drive.Current);
            if (s1.Drive.Current is NosDBPSDriveInfo)
            {
                if (ConfigurationConnection.ConfigCluster == null)
                {
                    throw new Exception(ProviderUtil.CONFIG_NOT_CONNECTED_EXCEPTION);
                }
                if (new NoSDbDetail(pathChunks, (PSDriveInfo)s1.Drive.Current).TryGetNodeDetail(out thisNode))
                {
                }

                if (thisNode.NodeType.Equals(PathType.Shards))
                {
                }
                else
                {
                    throw new System.Exception("invalid Context, to Remove-Shard you must be in \n NoSDB:\\databasecluster\\Shards \n ");
                }
            }

            else
            {
                throw new System.Exception("invalid Context, to Remove-Shard you must be in \n NoSDB:\\databasecluster\\Shards \n ");
            }
        }
示例#4
0
        public static void GetMessages(Guid applicationId, ref List <Message> retMessages, Guid userId, Guid?threadId,
                                       bool?sent, long?minId, int?count)
        {
            string spName = GetFullyQualifiedName("GetMessages");

            try
            {
                if (threadId == Guid.Empty)
                {
                    threadId = null;
                }
                if (minId <= 0)
                {
                    minId = null;
                }

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 userId, threadId, sent, count, minId);
                _parse_messages(ref reader, ref retMessages);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.MSG);
            }
        }
        public static void GetDashboardsCount(Guid applicationId, ref List <DashboardCount> counts, Guid userId,
                                              Guid?nodeTypeId, Guid?nodeId, string nodeAdditionalId, DashboardType type)
        {
            string spName = GetFullyQualifiedName("GetDashboardsCount");

            try
            {
                if (nodeId == Guid.Empty)
                {
                    nodeId = null;
                }
                if (nodeTypeId == Guid.Empty)
                {
                    nodeTypeId = null;
                }

                string strType = type == DashboardType.NotSet ? null : type.ToString();

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 userId, nodeTypeId, nodeId, nodeAdditionalId, strType);
                ProviderUtil.parse_dashboards_count(ref reader, ref counts);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN);
            }
        }
        public static bool SetMessageTemplate(Guid applicationId, MessageTemplate info)
        {
            string spName = GetFullyQualifiedName("SetMessageTemplate");

            try
            {
                if (info.AudienceType == AudienceType.NotSet)
                {
                    return(false);
                }
                if (info.AudienceRefOwnerID == Guid.Empty)
                {
                    info.AudienceRefOwnerID = null;
                }
                if (info.AudienceNodeID == Guid.Empty)
                {
                    info.AudienceNodeID = null;
                }
                if (!info.CreationDate.HasValue)
                {
                    info.CreationDate = DateTime.Now;
                }

                return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName, applicationId,
                                                                        info.TemplateID, info.OwnerID, info.BodyText, info.AudienceType.ToString(), info.AudienceRefOwnerID,
                                                                        info.AudienceNodeID, info.AudienceNodeAdmin, info.CreatorUserID, info.CreationDate)));
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN);
                return(false);
            }
        }
        public static bool ArithmeticDeleteNotifications(Guid applicationId, Notification info, List <string> actions)
        {
            string spName = GetFullyQualifiedName("ArithmeticDeleteNotifications");

            try
            {
                if (!string.IsNullOrEmpty(info.Action.ToString()))
                {
                    actions.Add(info.Action.ToString());
                }
                actions = actions.Distinct().ToList();

                if (info.SubjectID.HasValue)
                {
                    info.SubjectIDs.Add(info.SubjectID.Value);
                }
                if (info.RefItemID.HasValue)
                {
                    info.RefItemIDs.Add(info.RefItemID.Value);
                }

                return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName, applicationId,
                                                                        ProviderUtil.list_to_string <Guid>(info.SubjectIDs), ProviderUtil.list_to_string <Guid>(info.RefItemIDs),
                                                                        info.Sender.UserID, ProviderUtil.list_to_string <string>(ref actions), ',')));
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN);
                return(false);
            }
        }
        public static void GetUserNotifications(Guid applicationId, ref List <Notification> retNotifications,
                                                Guid userId, bool?seen, long?lastNotSeenId, long?lastSeenId,
                                                DateTime?lastViewDate, DateTime?lowerDateLimit, DateTime?upperDateLimit, int?count)
        {
            string spName = GetFullyQualifiedName("GetUserNotifications");

            try
            {
                if (lastSeenId == 0)
                {
                    lastSeenId = null;
                }
                if (lastNotSeenId == 0)
                {
                    lastNotSeenId = null;
                }

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 userId, seen, lastNotSeenId, lastSeenId, lastViewDate, lowerDateLimit, upperDateLimit, count);
                _parse_notifications(ref reader, ref retNotifications);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.NTFN);
            }
        }
 protected override void BeginProcessing()
 {
     if (string.IsNullOrEmpty(Server))
     {
         Server = ProviderUtil.GetLocalAddress();
     }
 }
示例#10
0
        public static void GetOwnerFiles(Guid applicationId,
                                         ref List <DocFileInfo> retFiles, ref List <Guid> ownerIds, FileOwnerTypes ownerType)
        {
            string spName = GetFullyQualifiedName("GetOwnerFiles");

            try
            {
                if (ownerIds.Count == 0)
                {
                    return;
                }
                string strOwnerType = null;
                if (ownerType != FileOwnerTypes.None)
                {
                    strOwnerType = ownerType.ToString();
                }

                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId,
                                                                 ProviderUtil.list_to_string <Guid>(ref ownerIds), ',', strOwnerType);
                _parse_files(applicationId, ref reader, ref retFiles);
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.DCT);
            }
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("IisTraceWebEventProvider", "Initializing: name=" + name);
            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
示例#12
0
        override public void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("MailWebEventProvider", "Initializing: name=" + name);

            ProviderUtil.GetAndRemoveRequiredNonEmptyStringAttribute(config, "from", name, ref _from);

            // Read "to", "cc" and "bcc"
            ProviderUtil.GetAndRemoveStringAttribute(config, "to", name, ref _to);
            ProviderUtil.GetAndRemoveStringAttribute(config, "cc", name, ref _cc);
            ProviderUtil.GetAndRemoveStringAttribute(config, "bcc", name, ref _bcc);

            if (String.IsNullOrEmpty(_to) &&
                String.IsNullOrEmpty(_cc) &&
                String.IsNullOrEmpty(_bcc))
            {
                throw new ConfigurationErrorsException(
                          SR.GetString(SR.MailWebEventProvider_no_recipient_error, this.GetType().ToString(),
                                       name));
            }

            ProviderUtil.GetAndRemoveStringAttribute(config, "subjectPrefix", name, ref _subjectPrefix);

            ProviderUtil.GetAndRemoveNonZeroPositiveOrInfiniteAttribute(config, "maxMessagesPerNotification", name, ref _maxMessagesPerNotification);

            ProviderUtil.GetAndRemoveNonZeroPositiveOrInfiniteAttribute(config, "maxEventsPerMessage", name, ref _maxEventsPerMessage);

            _smtpClient = CreateSmtpClientWithAssert();

            base.Initialize(name, config);
        }
示例#13
0
        public static bool RemoveMessages(Guid applicationId, Guid?userId, Guid?threadId, long?id)
        {
            string spName = GetFullyQualifiedName("RemoveMessages");

            try
            {
                if (userId == Guid.Empty)
                {
                    userId = null;
                }
                if (threadId == Guid.Empty)
                {
                    threadId = null;
                }
                if (id <= 0)
                {
                    id = null;
                }

                if (!id.HasValue && (!userId.HasValue || !threadId.HasValue))
                {
                    return(false);
                }

                return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName, applicationId, userId, threadId, id)));
            }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.MSG);
                return(false);
            }
        }
示例#14
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);
            }
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            string temp = null;

            Debug.Trace("SimpleMailWebEventProvider", "Initializing: name=" + name);

            ProviderUtil.GetAndRemoveStringAttribute(config, "bodyHeader", name, ref _bodyHeader);
            if (_bodyHeader != null)
            {
                _bodyHeader += "\n";
            }

            ProviderUtil.GetAndRemoveStringAttribute(config, "bodyFooter", name, ref _bodyFooter);
            if (_bodyFooter != null)
            {
                _bodyFooter += "\n";
            }

            ProviderUtil.GetAndRemoveStringAttribute(config, "separator", name, ref temp);
            if (temp != null)
            {
                _separator = temp + "\n";
            }

            ProviderUtil.GetAndRemovePositiveOrInfiniteAttribute(config, "maxEventLength", name, ref _maxEventLength);

            base.Initialize(name, config);
        }
示例#16
0
        protected override void BeginProcessing()
        {
            if (string.IsNullOrEmpty(Server))
            {
                Server = ProviderUtil.GetLocalAddress();
            }
            const string exceptionString = "Invalid context, to Add-Shard you must be in \n NoSDB:\\databasecluster\\Shards \n ";

            SessionState s1 = SessionState;

            string[] pathChunks = ProviderUtil.SplitPath(s1.Path.CurrentLocation.Path, s1.Drive.Current);

            if (!(s1.Drive.Current is NosDBPSDriveInfo))
            {
                throw new Exception(exceptionString);
            }

            if (ConfigurationConnection.ConfigCluster == null)
            {
                throw new Exception(ProviderUtil.CONFIG_NOT_CONNECTED_EXCEPTION);
            }

            NodeDetail thisNode;

            new NoSDbDetail(pathChunks, s1.Drive.Current).TryGetNodeDetail(out thisNode);

            if (!thisNode.NodeType.Equals(PathType.Shards))
            {
                throw new Exception(exceptionString);
            }
        }
示例#17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            paramsContainer   = new ParamsContainer(HttpContext.Current);
            initialJson.Value = PublicMethods.toJSON(RouteList.get_data_server_side(paramsContainer, RouteName.node));

            try
            {
                Guid?nodeId = PublicMethods.parse_guid(Request.Params["ID"], alternatvieValue:
                                                       PublicMethods.parse_guid(Request.Params["NodeID"]));

                if (Request.Url.ToString().ToLower().Contains("_escaped_fragment_=") && nodeId.HasValue)
                {
                    ParamsContainer paramsContainer = new ParamsContainer(HttpContext.Current);

                    Modules.CoreNetwork.Node _nd = CNController.get_node(paramsContainer.Tenant.Id, nodeId.Value, true);

                    string htmlContent = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" +
                                         "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>" + _nd.Name + " - " + RaaiVanSettings.SystemTitle(paramsContainer.Tenant.Id) + "</title></head><body>" +
                                         "<div>" + _nd.Name + "</div>" +
                                         "<div>" + ProviderUtil.list_to_string <string>(_nd.Tags, ' ') + "</div>" +
                                         "<div>" + PublicMethods.shuffle_text(PublicMethods.markup2plaintext(paramsContainer.Tenant.Id,
                                                                                                             _nd.Description, true)) + "</div>" +
                                         "<div>" + PublicMethods.markup2plaintext(paramsContainer.Tenant.Id,
                                                                                  Modules.Wiki.WikiController.get_wiki_content(paramsContainer.Tenant.Id, nodeId.Value), true) + "</div>" +
                                         "</body></html>";

                    paramsContainer.return_response(htmlContent);

                    return;
                }
            }
            catch { }
        }
示例#18
0
        public override void Initialize(string name, NameValueCollection attributes)
        {
            if (_initialized)
            {
                throw new InvalidOperationException(
                          SR.GetString(SR.XmlSiteMapProvider_Cannot_Be_Inited_Twice));
            }

            if (attributes != null)
            {
                if (string.IsNullOrEmpty(attributes["description"]))
                {
                    attributes.Remove("description");
                    attributes.Add("description", SR.GetString(SR.XmlSiteMapProvider_Description));
                }

                string siteMapFile = null;
                ProviderUtil.GetAndRemoveStringAttribute(attributes, _siteMapFileAttribute, name, ref siteMapFile);
                _virtualPath = VirtualPath.CreateAllowNull(siteMapFile);
            }

            base.Initialize(name, attributes);

            if (attributes != null)
            {
                ProviderUtil.CheckUnrecognizedAttributes(attributes, name);
            }

            _initialized = true;
        }
示例#19
0
        protected override void BeginProcessing()
        {
            string exceptionString =
                "Invalid context, to Move-Collection you must be in \n NoSDB:\\databasecluster\\Databases\\[DatabaseName]\\[CollectionName] \n ";
            NodeDetail   thisNode;
            SessionState sessionState = SessionState;

            string[] pathChunks = ProviderUtil.SplitPath(sessionState.Path.CurrentLocation.Path, sessionState.Drive.Current);

            if (!(sessionState.Drive.Current is NosDBPSDriveInfo))
            {
                throw new Exception(exceptionString);
            }

            if (!new NoSDbDetail(pathChunks, sessionState.Drive.Current).TryGetNodeDetail(out thisNode))
            {
                throw new Exception("Unable to Get Node Details :" + sessionState.Drive.Current);
            }

            if (!thisNode.NodeType.Equals(PathType.Collection))
            {
                throw new Exception(exceptionString);
            }

            _collectionName = thisNode.NodeName;
            _databaseName   = ((CollectionValueDetail)thisNode).Database;
        }
示例#20
0
        protected void get_thread_users(Guid?threadId, int?count, int?lastId, ref string responseText)
        {
            //Privacy Check: OK
            if (!paramsContainer.GBEdit)
            {
                return;
            }

            if (!lastId.HasValue)
            {
                lastId = -1;
            }

            if (!threadId.HasValue || !MSGController.has_message(paramsContainer.Tenant.Id,
                                                                 null, paramsContainer.CurrentUserID.Value, threadId, null))
            {
                responseText = "{\"ErrorText\":\"" + Messages.AccessDenied + "\"}";
                return;
            }

            List <User> users = MSGController.get_thread_users(paramsContainer.Tenant.Id,
                                                               threadId.Value, paramsContainer.CurrentUserID.Value, count, lastId);

            responseText = "{\"Users\":[" +
                           ProviderUtil.list_to_string <string>(users.Select(
                                                                    u => "{\"UserID\":\"" + u.UserID.ToString() + "\"" +
                                                                    ",\"UserName\":\"" + Base64.encode(u.UserName) + "\"" +
                                                                    ",\"FirstName\":\"" + Base64.encode(u.FirstName) + "\"" +
                                                                    ",\"LastName\":\"" + Base64.encode(u.LastName) + "\"" +
                                                                    ",\"ProfileImageURL\":\"" + DocumentUtilities.get_personal_image_address(paramsContainer.Tenant.Id,
                                                                                                                                             u.UserID.Value) + "\"}").ToList()) +
                           "]}";
        }
示例#21
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);
            }
        }
示例#22
0
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);

            _appName          = ProviderUtil.GetAppName(config);
            _connectionString = ProviderUtil.GetConnectionString(config);

            ProviderUtil.CheckUnrecognizedAttributes(config);
        }
示例#23
0
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);

            _connectionString = ProviderUtil.GetConnectionString(config);

            this.WorldName = ProviderUtil.GetAndRemoveStringAttribute(config, "worldName");

            ProviderUtil.CheckUnrecognizedAttributes(config);
        }
示例#24
0
        public override void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("WebEventLogEventProvider", "Initializing: name=" + name);

            _maxTruncatedParamLen = EventLogParameterMaxLength - _truncateWarning.Length;

            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
示例#25
0
        public static bool AddFiles(Guid applicationId,
                                    Guid ownerId, FileOwnerTypes ownerType, ref List <DocFileInfo> attachments, Guid currentUserId)
        {
            SqlConnection con = new SqlConnection(ProviderUtil.ConnectionString);
            SqlCommand    cmd = new SqlCommand();

            cmd.Connection = con;

            //Add Attachments
            DataTable attachmentsTable = new DataTable();

            attachmentsTable.Columns.Add("FileID", typeof(Guid));
            attachmentsTable.Columns.Add("FileName", typeof(string));
            attachmentsTable.Columns.Add("Extension", typeof(string));
            attachmentsTable.Columns.Add("MIME", typeof(string));
            attachmentsTable.Columns.Add("Size", typeof(long));
            attachmentsTable.Columns.Add("OwnerID", typeof(Guid));
            attachmentsTable.Columns.Add("OwnerType", typeof(string));

            foreach (DocFileInfo _att in attachments)
            {
                attachmentsTable.Rows.Add(_att.FileID, _att.FileName,
                                          _att.Extension, _att.MIME(), _att.Size, _att.OwnerID, _att.OwnerType);
            }

            SqlParameter attachmentsParam = new SqlParameter("@Attachments", SqlDbType.Structured);

            attachmentsParam.TypeName = "[dbo].[DocFileInfoTableType]";
            attachmentsParam.Value    = attachmentsTable;
            //end of Add Attachments

            cmd.Parameters.AddWithValue("@ApplicationID", applicationId);
            cmd.Parameters.AddWithValue("@OwnerID", ownerId);
            cmd.Parameters.AddWithValue("@OwnerType", ownerType.ToString());
            cmd.Parameters.Add(attachmentsParam);
            cmd.Parameters.AddWithValue("@CurrentUserID", currentUserId);
            cmd.Parameters.AddWithValue("@Now", DateTime.Now);

            string spName = GetFullyQualifiedName("AddFiles");

            string sep       = ", ";
            string arguments = "@ApplicationID" + sep + "@OwnerID" + sep + "@OwnerType" + sep +
                               "@Attachments" + sep + "@CurrentUserID" + sep + "@Now";

            cmd.CommandText = ("EXEC" + " " + spName + " " + arguments);

            con.Open();
            try { return(ProviderUtil.succeed((IDataReader)cmd.ExecuteReader())); }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.DCT);
                return(false);
            }
            finally { con.Close(); }
        }
        protected static bool save_phrase_local(string phrase, string dictionary, string version, string data)
        {
            string spName = "[dbo]." + "[EP_AddPhrase]";

            try
            {
                return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName,
                                                                        phrase, dictionary, version, data)));
            }
            catch (Exception ex) { return(false); }
        }
        protected static Dictionary <string, object> get_phrase_local(string phrase)
        {
            string spName = "[dbo]." + "[EP_GetPhrase]";

            try
            {
                IDataReader reader = ProviderUtil.execute_reader(spName, phrase);
                return(_parse_phrases(ref reader));
            }
            catch (Exception ex) { return(new Dictionary <string, object>()); }
        }
        protected static void gkm_questionaire_abstract(Guid applicationId, ref Dictionary <string, object> response)
        {
            string spName = "[dbo]." + "[EXT_RPT_GKMQuestionaireAbstract]";

            try
            {
                IDataReader reader = ProviderUtil.execute_reader(spName, applicationId);
                response = _parse_iso_questionaire_abstract(ref reader);
            }
            catch (Exception ex) { }
        }
示例#29
0
        public static bool ArithmeticDeleteComment(Guid applicationId, Guid?CommentID)
        {
            string spName = GetFullyQualifiedName("ArithmeticDeleteComment");

            try { return(ProviderUtil.succeed(ProviderUtil.execute_reader(spName, applicationId, CommentID))); }
            catch (Exception ex)
            {
                LogController.save_error_log(applicationId, null, spName, ex, ModuleIdentifier.SH);
                return(false);
            }
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            int num = UnsafeNativeMethods.InitializeWmiManager();

            if (num != 0)
            {
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Wmi_provider_cant_initialize", new object[] { "0x" + num.ToString("X8", CultureInfo.CurrentCulture) }));
            }
            base.Initialize(name, config);
            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }