当前位置: 首页>>代码示例>>C#>>正文


C# clsDBQueryManager.SearchWithInvite方法代码示例

本文整理汇总了C#中BaseLib.clsDBQueryManager.SearchWithInvite方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.SearchWithInvite方法的具体用法?C# clsDBQueryManager.SearchWithInvite怎么用?C# clsDBQueryManager.SearchWithInvite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseLib.clsDBQueryManager的用法示例。


在下文中一共展示了clsDBQueryManager.SearchWithInvite方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendInviteUsingKeyWords

        public void SendInviteUsingKeyWords(object Parameter)
        {
            try
            {
                if (IsStop)
                {
                    return;
                }

                if (!IsStop)
                {
                    lstSearchconnectionThread.Add(Thread.CurrentThread);
                    lstSearchconnectionThread.Distinct().ToList();
                    Thread.CurrentThread.IsBackground = true;
                }
            }
            catch
            {
            }

            string Account = string.Empty;
            Array paramsArray = new object[1];
            paramsArray = (Array)Parameter;

            KeyValuePair<string, LinkedInMaster> item = (KeyValuePair<string, LinkedInMaster>)paramsArray.GetValue(0);

            int SearchMinDelay = Convert.ToInt32(paramsArray.GetValue(1));
            int SearchMaxDelay = Convert.ToInt32(paramsArray.GetValue(2));
            GlobusHttpHelper HttpHelper = new GlobusHttpHelper();
            LinkedinLogin Login = new LinkedinLogin();

            LinkedInMaster LinkedIn_Master = item.Value;
            string linkedInKey = item.Key;
            Account = item.Key;

            Login.logger.addToLogger += new EventHandler(loggerAddConnection_addToLogger);

            if (chk_InvitePerDay.Checked)
            {
                AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Checking Invites Per Day ]");
                SearchCriteria.NumberOfRequestPerKeyword = 0;
                SearchCriteria.NumberOfrequestPerDay = true;
                if (!string.IsNullOrEmpty(txt_campMaximumNoRetweet.Text) && NumberHelper.ValidateNumber(txt_campMaximumNoRetweet.Text))
                {
                    SearchCriteria.NumberOfRequestPerKeyword = Convert.ToInt32(txt_campMaximumNoRetweet.Text);
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ " + SearchCriteria.NumberOfRequestPerKeyword + " Maximum No Of Invites Per Day ]");
                }
                else
                {
                    SearchCriteria.NumberOfRequestPerKeyword = 10;
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Setting Maximum No Of Invites Per Day as 10 ]");
                }

                clsDBQueryManager DbQueryManager = new clsDBQueryManager();
                DataSet Ds = DbQueryManager.SearchWithInvite(Account, "SearchWithInvite");

                int TodayTweet = Ds.Tables["tb_SearchWithInvite"].Rows.Count;
                SearchCriteria.AlreadyRequestedUser = TodayTweet;
                AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ " + TodayTweet + " Already Invites today ]");

                if (TodayTweet >= SearchCriteria.NumberOfRequestPerKeyword)
                {
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ Already Invited : " + SearchCriteria.NumberOfRequestPerKeyword + " ]");
                    AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                    return;
                }
            }

            try
            {
                {
                    Queue<string> que_SearchKeywords = new Queue<string>();

                    foreach (string itemKeyword in _lstConnectionSearchKeyword)
                    {
                        que_SearchKeywords.Enqueue(itemKeyword);
                    }

                    ManageConnections.ConnectUsingSearchKeywod ConnectUsing_Search = new ConnectUsingSearchKeywod(item.Value._Username, item.Value._Password, item.Value._ProxyAddress, item.Value._ProxyPort, item.Value._ProxyUsername, item.Value._ProxyPassword, que_SearchKeywords);
                    ManageConnections.ConnectUsing_Search.SearchUsingkeywordForInvite(ref ConnectUsing_Search, SearchMinDelay, SearchMaxDelay);
                }

            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> SendInviteUsingKeyWords() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> Add Connection --> SendInviteUsingKeyWords() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinAddConnectionErrorLogs);
            }
            finally
            {
                counter_Search_connection--;
                if (counter_Search_connection == 0)
                {
                    if (btnSearchKeyword.InvokeRequired)
                    {
                        btnSearchKeyword.Invoke(new MethodInvoker(delegate
                        {
                            AddLoggerManageConnection("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
                            AddLoggerManageConnection("---------------------------------------------------------------------------------------------------------------------------");
                            btnSearchKeyword.Cursor = Cursors.Default;
//.........这里部分代码省略.........
开发者ID:brentscheidt,项目名称:inboard,代码行数:101,代码来源:frmSearchWithInvites.cs


注:本文中的BaseLib.clsDBQueryManager.SearchWithInvite方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。