• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BaseLib.clsDBQueryManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



clsDBQueryManager类属于BaseLib命名空间,在下文中一共展示了clsDBQueryManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: LoadDecaptchaSettings

        public static void LoadDecaptchaSettings()
        {
            try
            {
                Globals.CapchaTag = true;

                clsDBQueryManager DataBase = new clsDBQueryManager();
                DataTable dt = DataBase.SelectSettingData();
                foreach (DataRow dRow in dt.Rows)
                {
                    if ("Captcha_ID" == dRow[1].ToString())
                    {
                        Globals.CapchaLoginID = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }
                    if ("Captcha_Password" == dRow[1].ToString())
                    {
                        Globals.CapchaLoginPassword = StringEncoderDecoder.Decode(dRow[2].ToString());
                    }
                }

            }
            catch
            {
            }
        }
开发者ID:brentscheidt,项目名称:inboard,代码行数:25,代码来源:FrmCaptchaLogin.cs


示例2: GetUserIDFromUsername

        public static string GetUserIDFromUsername(string username, out string Status)
        {
            string GetStatus = string.Empty;
            Globussoft.GlobusHttpHelper httpHelper = new Globussoft.GlobusHttpHelper();

            clsDBQueryManager DB = new clsDBQueryManager();
            DataSet ds = DB.GetUserId(username);
            string user_id = string.Empty;

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dataRow in ds.Tables["tb_UsernameDetails"].Rows)
                {
                    user_id = dataRow.ItemArray[0].ToString();
                    Status = "No Error";
                    return user_id;
                }
            }


            try
            {
                string id = string.Empty;

                ChilkatHttpHelpr httpHelper1 = new ChilkatHttpHelpr();
                string pagesource = httpHelper1.GetHtml("https://api.twitter.com/1/users/show.xml?screen_name=" + username);

                if (!pagesource.Contains("Rate limit exceeded. Clients may not make more than 150 requests per hour.") && !pagesource.Contains("Sorry, that page does not exist") && !pagesource.Contains("User has been suspended"))
                {
                    int length = pagesource.IndexOf("</id>");
                    id = pagesource.Substring(pagesource.IndexOf("<id>"), length - pagesource.IndexOf("<id>")).Replace("<id>", "");
                    user_id = id;
                    GetStatus = "No Error";
                }
                else if (pagesource.Contains("Rate limit exceeded. Clients may not make more than 150 requests per hour."))
                {
                    GetStatus = "Rate limit exceeded";
                }
                else if (pagesource.Contains("Sorry, that page does not exist"))
                {
                    GetStatus = "Sorry, that page does not exist";
                }
                else if (pagesource.Contains("User has been suspended"))
                {
                    GetStatus = "User has been suspended";
                }
            }
            catch (Exception ex)
            {
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetUserIDFromUsername() -- " + username + " --> " + ex.Message, Globals.Path_TwitterDataScrapper);
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetUserIDFromUsername() -- " + username + " --> " + ex.Message, Globals.Path_TwtErrorLogs);
                GetStatus = "Error";
            }
            Status = GetStatus;
            return user_id;
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:56,代码来源:RandomiserTwitterDataScrapper.cs


示例3: GetPublicProxies

        public List<string> GetPublicProxies()
        {
            List<string> lst_Proxies = new List<string>();
            try
            {
                clsDBQueryManager setting = new clsDBQueryManager();
                DataSet ds = setting.SelectPublicProxyData();
                if (ds.Tables != null && ds.Tables["tb_Proxies"].Rows.Count > 0)
                {
                    foreach (DataRow dRow in ds.Tables["tb_Proxies"].Rows)
                    {
                        string Proxy = dRow.ItemArray[0].ToString() + ":" + dRow.ItemArray[1].ToString() + ":" + dRow.ItemArray[2].ToString() + ":" + dRow.ItemArray[3].ToString();
                        lst_Proxies.Add(Proxy);
                    }
                }
            }
            catch { }

            return lst_Proxies;
        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:20,代码来源:ProxyUtilitiesFromDataBase.cs


示例4: btn_UpdateCampaign

        public void btn_UpdateCampaign()
        {
            try
            {
                string query = "UPDATE tb_CamapignJoinGroup SET AccountFilePath ='" + _AccountFilePath + "',SearchType='" + _SearchType + "',KeywordFilePath='" + _KeywordFilePath + "'"
                        + " , UrlFilePath= '" + _KeywordFilePath + "' , IsSheduleDaily='" + _IsScheduledDaily + "' ,DelayFrom='" + _DelayFrom + "',DelayTo='" + _DelayTo + "' WHERE CampaignName='" + _CmpName + "';";

                clsDBQueryManager queryManager = new clsDBQueryManager();

                queryManager.InsertCamapaignData(query, "tb_CamapignJoinGroup");

                AddLoggerManageConnection("[ " + DateTime.Now + " ] => [  " + _CmpName + " is Saved. ]");

                LoadCampaign();
                ///Clear campaign
                ClearCamapigns();
            }
            catch (Exception ex)
            {
            }
        }
开发者ID:brentscheidt,项目名称:inboard,代码行数:21,代码来源:frmCampaignJoinGroup.cs


示例5: LoadDBCSettings

        private void LoadDBCSettings()
        {
            clsDBQueryManager objclsSettingDB = new clsDBQueryManager();

            try
            {
                DataTable dt = objclsSettingDB.SelectSettingData();
                foreach (DataRow row in dt.Rows)
                {
                    if ("DeathByCaptcha" == row[1].ToString())
                    {
                        txtDBCUsername.Text = StringEncoderDecoder.Decode(row[0].ToString());
                        txtDBCPassword.Text = StringEncoderDecoder.Decode(row[2].ToString());
                        BaseLib.Globals.DBCUsername = StringEncoderDecoder.Decode(txtDBCUsername.Text);
                        BaseLib.Globals.DBCPassword = StringEncoderDecoder.Decode(txtDBCPassword.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:23,代码来源:FrmSettings.cs


示例6: btnSaveDBC_Click

        private void btnSaveDBC_Click(object sender, EventArgs e)
        {
            
            if (!string.IsNullOrEmpty(txtDBCUsername.Text.Trim()) && !string.IsNullOrEmpty(txtDBCPassword.Text.Trim()))
            {
                BaseLib.Globals.DBCUsername = txtDBCUsername.Text;
                BaseLib.Globals.DBCPassword = txtDBCPassword.Text;

                //***  Save tb_Setting**************************///////

                clsDBQueryManager objclsSettingDB = new clsDBQueryManager();

                try
                {
                    DataTable dt = objclsSettingDB.SelectSettingData();
                    foreach (DataRow row in dt.Rows)
                    {
                        if ("DeathByCaptcha" == row[1].ToString())
                        {
                            objclsSettingDB.DeleteDBCDecaptcherData("DeathByCaptcha");
                        }
                    }
                    objclsSettingDB.InsertDBCData(StringEncoderDecoder.Encode(txtDBCUsername.Text), "DeathByCaptcha", StringEncoderDecoder.Encode(txtDBCPassword.Text));
                    MessageBox.Show("Settings Saved");
                    this.Close();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.StackTrace);
                }
            }
            else
            {
                MessageBox.Show("Please fill all Death By Captcha Details");
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:36,代码来源:FrmSettings.cs


示例7: btnClearPublicProxies_Click

 private void btnClearPublicProxies_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Do you really want to delete all the Proxies from Database", "Proxy", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         clsDBQueryManager setting = new clsDBQueryManager();
         setting.DeletePublicProxyData();
         AddToProxysLogs("All Public Proxies Deleted from the DataBase");
         workingproxiesCount = 0;
         lbltotalworkingproxies.Invoke(new MethodInvoker(delegate
         {
             lbltotalworkingproxies.Text = "Total Working Proxies : " + workingproxiesCount.ToString();
         }));
     }
 }
开发者ID:prog-moh,项目名称:twtboard,代码行数:14,代码来源:frmMain-New+UI.cs


示例8: RetweetDataExtractor

        public void RetweetDataExtractor()
        {
            try
            {
                if (!string.IsNullOrEmpty(txtRetweetCount.Text) && NumberHelper.ValidateNumber(txtRetweetCount.Text))
                {
                    RetweetExtractCount = Convert.ToInt32(txtRetweetCount.Text);
                    TwitterDataScrapper.RetweetExtractcount = RetweetExtractCount;
                }
                else
                {
                    AddToTweetCreatorLogs("Entered Count incorrect.Setting Default Count 10");
                }

                TwitterDataScrapper DataScraper = new TwitterDataScrapper();
                foreach (string item in lstUserId_Retweet)
                {
                    AddToTweetCreatorLogs("Extracting ReTweets For " + item);
                    List<string> TweetData = DataScraper.GetRetweetData_Scrape(item);
                    AddToTweetCreatorLogs(TweetData.Count + " Retweet From User : " + item);
                    if (TweetData.Count > 0)
                    {

                        new Thread(() =>
                        {
                            foreach (string newItem in TweetData)
                            {
                                string[] arry = Regex.Split(newItem, ":");
                                if (arry.Length == 3)
                                {
                                    AddToTweetCreatorLogs("---------------------------------------------------------");
                                    AddToTweetCreatorLogs(arry[0] + " : " + arry[1]);
                                    AddToTweetCreatorLogs(arry[2]);
                                    clsDBQueryManager DataBase = new clsDBQueryManager();
                                    DataBase.InsertDataRetweet(arry[0], arry[1], arry[2]);
                                }
                                else
                                {

                                }
                            }
                        }).Start();
                    }
                    else
                    {
                        AddToTweetCreatorLogs("Sorry No ReTweets For " + item);
                    }
                }
                AddToTweetCreatorLogs("Finished Extracting ReTweets");
                AddToTweetCreatorLogs("ReTweets Stored In -" + Globals.Path_RETweetExtractor);
                if (txtRetweetSingle.InvokeRequired)
                {
                    txtRetweetSingle.Invoke(new MethodInvoker(delegate
                    {
                        txtRetweetSingle.Text = "";
                    }));
                }
                if (txtRetweetFile.InvokeRequired)
                {
                    txtRetweetFile.Invoke(new MethodInvoker(delegate
                    {
                        txtRetweetFile.Text = "";
                    }));
                }
            }
            catch (Exception ex)
            {
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> RetweetDataExtractor() --> " + ex.Message, Globals.Path_TweetCreatorErroLog);
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> RetweetDataExtractor() --> " + ex.Message, Globals.Path_TwtErrorLogs);
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:71,代码来源:frmMain-New+UI.cs


示例9: SignupPage

        public void SignupPage()
        {
            clsDBQueryManager SetDb = new clsDBQueryManager();
            DataSet ds = new DataSet();
            //bool UsePublicProxy = false;
            int counter_Username = 0;
            foreach (string EmailPassword in LstAccountcreationEmailPassword)
            {
            StartAgain:
                try
                {
                    GlobusHttpHelper httpHelper = new GlobusHttpHelper();
                    string[] array = Regex.Split(EmailPassword, ":");
                    string email = array[0];
                    string password = array[1];
                    string username = string.Empty;
                    string ProxyAdress = string.Empty;
                    string ProxyPort = string.Empty;
                    string Proxy = string.Empty;
                    AddToProxyAccountCreationLog("Clearing Cookies");
                    ClearCookies();
                    if (chkboxUsePublicProxies.Checked)
                    {
                        try
                        {
                            ds = SetDb.SelectPublicProxyData();
                            if (ds.Tables[0].Rows.Count != 0)
                            {
                                int index = RandomNumberGenerator.GenerateRandom(0, ds.Tables[0].Rows.Count);
                                DataRow dr = ds.Tables[0].Rows[countForInstance];
                                Proxy = dr.ItemArray[0].ToString() + ":" + dr.ItemArray[1].ToString() + ":" + dr.ItemArray[2].ToString() + ":" + dr.ItemArray[3].ToString();
                                string[] ProxyList = Regex.Split(Proxy, ":");
                                ProxyAdress = ProxyList[0];
                                ProxyPort = ProxyList[1];
                                
                                AddToProxyAccountCreationLog("Using Proxy Address : - " + ProxyAdress + ":" + ProxyPort);
                            }
                            else
                            {
                                AddToProxyAccountCreationLog("Please Uplaod Public Proxies");
                                break;
                            }
                        }
                        catch (Exception ex)
                        {

                        }
                    }

                    AddToProxyAccountCreationLog("Setting Proxy");

                    Thread.Sleep(2000);

                    SetProxy(ProxyAdress, ProxyPort);

                    Thread.Sleep(2000);

                    IE explorer = new IE();

                    Thread.Sleep(1000);

                    if (LstAccountcreationUsername.Count > 0)
                    {
                        if (counter_Username < LstAccountcreationUsername.Count)
                        {
                            username = LstAccountcreationUsername[counter_Username];
                            counter_Username++;
                        }
                        else
                        {
                            AddToProxyAccountCreationLog("*********** /n All Usernames have been taken /n ***********");
                            break;
                        }
                    }
                    else
                    {
                        AddToProxyAccountCreationLog("Please Upload Usernames To Create Twitter Accounts");
                        break;
                    }

                    string name = LstAccountCreationName[countForInstance];
                    string capcthaUrl = string.Empty;

                    try
                    {
                        explorer.GoTo("https://twitter.com/signup");

                        string PageSource = explorer.Html.ToString();
                        if (PageSource.Contains("Sign out"))
                        {
                            explorer.Link(Find.ById("signout-button")).Click();
                            Thread.Sleep(2000);
                            explorer.GoTo("https://twitter.com/signup");
                            Thread.Sleep(2000);
                        }
                    }
                    catch (Exception ex)
                    {
                        AddToProxyAccountCreationLog("Taking too Long To respond.Page Not Loaded Fully");
                        break;
//.........这里部分代码省略.........
开发者ID:prog-moh,项目名称:twtboard,代码行数:101,代码来源:frmMain-New+UI.cs


示例10: btnScheduleForLater_Tweeter_Click

        private void btnScheduleForLater_Tweeter_Click(object sender, EventArgs e)
        {
            //InsertUpdateSchedulerModule(strModule(Module.Tweet), dateTimePicker_Follower.Value.ToString());
            MessageBox.Show("Please Upload All Data To Start Tweeting");

            if (CheckTweeting())
            {
                string IsScheduledDaily = "0";
                if (chkScheduleDaily_Follow.Checked)
                {
                    IsScheduledDaily = "1";
                }
                clsDBQueryManager queryManager = new clsDBQueryManager();
                queryManager.InsertUpdateTBScheduler("", "Tweet_", dateTimePicker_tweeterStart.Value.ToString(), IsScheduledDaily);

                if (scheduler != null && scheduler.IsDisposed == false)
                {
                    scheduler.LoadDataGrid();
                }

                if (!string.IsNullOrEmpty(txtNoOfTweets.Text) && Globals.IdCheck.IsMatch(txtNoOfTweets.Text))
                {
                    TweetAccountManager.NoOfTweets = int.Parse(txtNoOfTweets.Text);
                }

                listTweetMessages = listTweetMessages.Distinct().ToList();

                foreach (string item in listTweetMessages)
                {
                    TweetAccountManager.que_TweetMessages.Enqueue(item);
                }

                GlobusFileHelper.WriteStringToTextfile(txtTweetMessageFile.Text, Globals.Path_TweetSettings);

                MessageBox.Show("Task Scheduled");
                AddToGeneralLogs("Task Scheduled");
                IsTweetScheduled = true;
            }
            else
            {
                AddToLog_Tweet("Please Add All Data");
            }



        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:46,代码来源:frmMain-New+UI.cs


示例11: StartDirectMessagingMultithreaded

        public void StartDirectMessagingMultithreaded(object parameter)
        {
            try
            {
                int MinimumDelay = 15;
                int MaximumDelay = 25;
                Array paramsArray = new object[1];

                paramsArray = (Array)parameter;

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

                TweetAccountManager AccountManager = item.Value;

                AccountManager.Username = item.Value.Username;
                AccountManager.Password = item.Value.Password;
                AccountManager.proxyAddress = item.Value.proxyAddress;
                AccountManager.proxyPort = item.Value.proxyPort;
                AccountManager.proxyUsername = item.Value.proxyUsername;
                AccountManager.proxyPassword = item.Value.proxyPassword;

                if (!AccountManager.IsLoggedIn)
                {
                    AccountManager.Login();
                }


                List<string> SelectedItem = new List<string>();

               
                    if (chklstDirectMessage.InvokeRequired)
                    {
                        chklstDirectMessage.Invoke(new MethodInvoker(delegate
                        {
                            foreach (string Userid in chklstDirectMessage.CheckedItems)
                            {
                                SelectedItem.Add(Userid);
                            }

                        }));
                    }
                
                int MaximumMsgPerDay = 10;
                if (!string.IsNullOrEmpty(txtMessagePerDay.Text) && NumberHelper.ValidateNumber(txtMessagePerDay.Text))
                {
                    MaximumMsgPerDay = Convert.ToInt32(txtMessagePerDay.Text);
                }
                clsDBQueryManager DbQueryManager = new clsDBQueryManager();
                DataSet Ds = DbQueryManager.SelectMessageData(item.Value.Username, "Message");

                int TodayMessage = Ds.Tables["tb_MessageRecord"].Rows.Count;
                AddToLog_Tweet(TodayMessage + " Already Messaged today");

                #region Delay
                if (!string.IsNullOrEmpty(txtMinDMDelay.Text) && NumberHelper.ValidateNumber(txtMinDMDelay.Text))
                {
                    MinimumDelay = Convert.ToInt32(txtMinDMDelay.Text);
                }
                else
                {
                    AddToDMLog("Minimum Delay Value Incorrect");
                    AddToDMLog("Assinging Defauly Value = 15");
                }

                if (!string.IsNullOrEmpty(txtMaxDMDelay.Text) && NumberHelper.ValidateNumber(txtMaxDMDelay.Text))
                {
                    MaximumDelay = Convert.ToInt32(txtMaxDMDelay.Text);
                }
                else
                {
                    AddToDMLog("Minimum Delay Value Incorrect");
                    AddToDMLog("Assinging Defauly Value = 25");
                }
                #endregion

                foreach (string Userid in SelectedItem)
                {
                    if (TodayMessage >= MaximumMsgPerDay)
                    {
                        AddToDMLog("Already Messaged " + TodayMessage);
                        break;
                    }
                    AddToDMLog("Direct Message To " + Userid);
                    int Delay = RandomNumberGenerator.GenerateRandom(MinimumDelay, MaximumDelay);
                    string MessagePosted = AccountManager.DirectMessage(Userid);
                    if (MessagePosted.Contains("Success"))
                    {
                        string[] Array = Regex.Split(MessagePosted, ":");
                        AddToDMLog("Message Posted :"+ Array[1]);
                    }
                    else if (MessagePosted.Contains("Error"))
                    {
                        AddToDMLog("Error in Post");
                    }
                    else
                    {
                        AddToDMLog("Message Not Posted");
                    }
                    AddToDMLog("Delay For : " + Delay);
                    Thread.Sleep(Delay);
//.........这里部分代码省略.........
开发者ID:prog-moh,项目名称:twtboard,代码行数:101,代码来源:frmMain-New+UI.cs


示例12: chk_AddConn_CheckDailyLimit_Checked

 private void chk_AddConn_CheckDailyLimit_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         if (chk_AddConn_CheckDailyLimit.IsChecked==true)
         {
             GlobalsAddConn.selectedDailyLimit = true;
             clsDBQueryManager obj_DBQueryManager = new clsDBQueryManager();
             if (!string.IsNullOrEmpty(txt_AddConn_DailyLimit.Text))
             {
                 obj_DBQueryManager.InsertOrUpdateDailyLimitSetting(Convert.ToInt32(txt_AddConn_DailyLimit.Text));
             }
         }
         else
         {
             GlobalsAddConn.selectedDailyLimit = false;
         }
     }
     catch (Exception ex)
     {
     }
 }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:22,代码来源:UserControlAddConnectionByKeyword.xaml.cs


示例13: btnScheduleForLater_Follower_Click

        private void btnScheduleForLater_Follower_Click(object sender, EventArgs e)
        {
            //ReadFollowSettings();

            MessageBox.Show("Please upload all Relevant Data used for running Follow Module. These Data will be used when scheduled task is run");

            if (FollowValidations())
            {

                try
                {
                    string IsScheduledDaily = "0";
                    if (chkScheduleDaily_Follow.Checked)
                    {
                        IsScheduledDaily = "1";
                    }
                    clsDBQueryManager queryManager = new clsDBQueryManager();
                    queryManager.InsertUpdateTBScheduler("", "Follow", dateTimePicker_Follow.Value.ToString(), IsScheduledDaily);

                    if (scheduler != null && scheduler.IsDisposed == false)
                    {
                        scheduler.LoadDataGrid();
                    }

                    //Save Settings in Text File
                    string strOtherUser = "false";
                    if (!string.IsNullOrEmpty(txtOtherfollow.Text) && !string.IsNullOrEmpty(txtUserOtherNumber.Text))
                    {
                        strOtherUser = "true";
                    }

                    string strChkFollowers = "0";
                    if (chkFollowers.Checked)
                    {
                        strChkFollowers = "1";
                    }
                    string strChkFollowings = "0";
                    if (chkFollowings.Checked)
                    {
                        strChkFollowings = "1";
                    }
                    string strchkUseDivide = "0";
                    if (chkUseDivide.Checked)
                    {
                        strchkUseDivide = "1";
                    }
                    string strrdBtnDivideEqually = "0";
                    if (rdBtnDivideEqually.Checked)
                    {
                        strrdBtnDivideEqually = "1";
                    }
                    string strrdBtnDivideByGivenNo = "0";
                    if (rdBtnDivideByGivenNo.Checked)
                    {
                        strrdBtnDivideByGivenNo = "1";
                    }

                    GlobusFileHelper.WriteStringToTextfile(txtUserIDtoFollow.Text + "<:>" + txtPathUserIDs.Text + "<:>" + txtOtherfollow.Text + "<:>" + txtUserOtherNumber.Text + "<:>" + strChkFollowers + "<:>" + strChkFollowings + "<:>" + strchkUseDivide + "<:>" + strrdBtnDivideEqually + "<:>" + strrdBtnDivideByGivenNo + "<:>" + txtScrapeNoOfUsers.Text + "<:>" + txtFollowMinDelay.Text + "<:>" + txtFollowMaxDelay.Text + "<:>" + txtNoOfFollowThreads.Text, Globals.Path_FollowSettings);

                    MessageBox.Show("Task Scheduled");
                    AddToGeneralLogs("Task Scheduled");
                    /////Updates new Paths in tb_Setting
                    //if (!string.IsNullOrEmpty(txtNames.Text) && !string.IsNullOrEmpty(txtUsernames.Text) && !string.IsNullOrEmpty(txtEmails.Text))
                    //{
                    //    objclsSettingDB.InsertOrUpdateSetting("Follow", "Name", StringEncoderDecoder.Encode(txtNames.Text));
                    //    objclsSettingDB.InsertOrUpdateSetting("Follow", "Username", StringEncoderDecoder.Encode(txtUsernames.Text));
                    //    objclsSettingDB.InsertOrUpdateSetting("Follow", "Email", StringEncoderDecoder.Encode(txtEmails.Text));
                    //}
                }
                catch (Exception ex)
                {
                    AddToLog_Follower("Error in Task Scheduling : " + ex.Message);
                    GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> btnScheduleForLater_Follower_Click() --> " + ex.Message, Globals.Path_FollowerErroLog);
                    GlobusFileHelper.AppendStringToTextfileNewLine("Error --> btnScheduleForLater_Follower_Click() --> " + ex.Message, Globals.Path_TwtErrorLogs);
                }
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:77,代码来源:frmMain-New+UI.cs


示例14: Start_GetMentionsMultithreaded

        private void Start_GetMentionsMultithreaded(object parameters)
        {
            try
            {
                Array paramsArray = new object[2];

                paramsArray = (Array)parameters;

                KeyValuePair<string, TweetAccountManager> keyValue = (KeyValuePair<string, TweetAccountManager>)paramsArray.GetValue(0);

                List<string> list_userIDsToFollow = new List<string>();//(List<string>)paramsArray.GetValue(1);

                TweetAccountManager tweetAccountManager = keyValue.Value;

                //tweetAccountManager.unFollower.logEvents.addToLogger += new EventHandler(logEvents_UnFollower_addToLogger);
                tweetAccountManager.logEvents.addToLogger += new EventHandler(Randomiser_AddToLogger);

                if (!tweetAccountManager.IsLoggedIn)
                {
                    tweetAccountManager.Login();
                }

                if (tweetAccountManager.AccountStatus == "Account Suspended")
                {
                    clsDBQueryManager database = new clsDBQueryManager();
                    database.UpdateSuspendedAcc(tweetAccountManager.Username);

                    AddToRandomiserLog("[ " + DateTime.Now + " ] => [ Account Suspended With User Name : " + tweetAccountManager.Username + " ]");
                    return;
                }

                tweetAccountManager.GetMentions();

                tweetAccountManager.logEvents.addToLogger -= Randomiser_AddToLogger;
            }
            catch
            {
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:39,代码来源:frmRandomiser.cs


示例15: GetUserNameFromUserId

        public static string GetUserNameFromUserId(string userid)
        {
            string username = string.Empty;

            ChilkatHttpHelpr httpHelper = new ChilkatHttpHelpr();
            clsDBQueryManager DB = new clsDBQueryManager();
            DataSet ds = DB.GetUserName(userid);
            string user_id = string.Empty;

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dataRow in ds.Tables["tb_UsernameDetails"].Rows)
                {
                    user_id = dataRow.ItemArray[0].ToString();
                    return user_id;
                }
            }
            try
            {
                string PageSource = string.Empty;
                if (!string.IsNullOrEmpty(userid) && NumberHelper.ValidateNumber(userid))
                {
                    PageSource = httpHelper.GetHtml("https://api.twitter.com/1/users/show.xml?user_id=" + userid + "&include_entities=true");
                    if (!PageSource.Contains("Rate limit exceeded. Clients may not make more than 150 requests per hour."))
                    {
                        try
                        {
                            int startIndex = PageSource.IndexOf("<screen_name>");
                            if (startIndex > 0)
                            {
                                string Start = PageSource.Substring(startIndex);
                                int endIndex = Start.IndexOf("</screen_name>");
                                string End = Start.Substring(0, endIndex);
                                username = End.Replace("<screen_name>", "");
                            }

                        }
                        catch (Exception ex)
                        {
                            Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetUserNameFromUserId() -- " + userid + " --> " + ex.Message, Globals.Path_TwitterDataScrapper);
                            Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetUserNameFromUserId() -- " + userid + " --> " + ex.Message, Globals.Path_TwtErrorLogs);
                        }
                    }

                    else
                    {
                        username = "Rate Limit Exceeded";
                    }
                }
            }
            catch (Exception ex)
            {
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> GetUserNameFromUserId() -- " + userid + " --> " + ex.Message, Globals.Path_TwitterDataScrapper);
                Globussoft.GlobusFileHelper.AppendStringToTextfileNewLine("Error --> GetUserNameFromUserId() -- " + userid + " --> " + ex.Message, Globals.Path_TwtErrorLogs);
            }

            return username;
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:58,代码来源:CampTwitterDataScrapper.cs


示例16: StartCampaignInBoardProGetDataWithPagination


//.........这里部分代码省略.........
                                catch { }
                            }
                            else if (ResponseWallPostForPremiumAcc.Contains("Account Type:</span> Executive"))
                            {
                                try
                                {
                                    PostRequestURL = "http://www.linkedin.com/search/hits";
                                    PostdataForPagination = "keywords=" + Uri.EscapeDataString(Keyword) + "&title=" + Uri.EscapeDataString(Title) + "&fname=" + FirstName + "&lname=" + LastName + "&searchLocationType=" + Location + "&f_FG=" + Groups + "&companyScope=" + CompanyValue + "&countryCode=" + Country + "&keepFacets=keepFacets&I=" + IndustryType + "&SE=" + SeniorLevel + "&pplSearchOrigin=ADVS&viewCriteria=2&sortCriteria=R&facetsOrder=N%2CCC%2CI%2CPC%2CED%2CL%2CFG%2CTE%2CFA%2CSE%2CP%2CCS%2CF%2CDR%2CG&page_num=" + i + "&openFacets=N%2CCC%2CI";

                                    PostResponce = HttpHelper.postFormData(new Uri(PostRequestURL), PostdataForPagination);
                                    //Temporosy code for client
                                    //GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Pagesource 3 >>>> " + PostResponce, Globals.Path_InBoardProGetDataPagesource);
                                }
                                catch { }
                            }
                            else if (ResponseWallPostForPremiumAcc.Contains("openAdvancedForm=true"))
                            {
                                PostRequestURL = "http://www.linkedin.com/vsearch/p?";
                                PostdataForPagination = "keywords=" + Uri.EscapeDataString(Keyword) + "&title=" + Uri.EscapeDataString(Title) + "&titleScope=" + TitleValue + "&firstName=" + FirstName + "&lastName=" + LastName + "&postalCode=" + PostalCode + "&openAdvancedForm=true&companyScope=" + CompanyValue + "&locationType=" + Location + "&f_FG=" + Groups + "&countryCode=" + Country + "&company=" + Company + "&distance=" + within + "&f_N=" + Relationship + "&f_G=" + LocationArea + "&f_I=" + IndustryType + "&f_TE=" + YearsOfExperience + "&f_FA=" + Function + "&f_SE=" + SeniorLevel + "&f_P=" + IntrestedIn + "&f_CS=" + CompanySize + "&f_F=" + Fortune1000 + "&f_DR=" + RecentlyJoined + "&orig=ADVS&page_num=" + i + "";
                                PostResponce = HttpHelper.postFormData(new Uri(PostRequestURL), PostdataForPagination);
                                //Temporosy code for client
                                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Pagesource 4 >>>> " + PostResponce, Globals.Path_InBoardProGetDataPagesource);
                            }
                            else
                            {
                                try
                                {
                                    PostRequestURL = "http://www.linkedin.com/search/hits";
                                    PostdataForPagination = "keywords=" + Uri.EscapeDataString(SearchCriteria.Keyword) + "&title=" + Uri.EscapeDataString(Title) + "&fname=" + FirstName + "&lname=" + LastName + "&searchLocationType=" + Location + "&f_FG=" + Groups + "&countryCode=" + Country + "&viewCriteria=1&sortCriteria=R&facetsOrder=CC%2CN%2CG%2CI%2CPC%2CED%2CL%2CFG%2CTE%2CFA%2CSE%2CP%2CCS%2CF%2CDR&page_num=" + i + "&openFacets=N%2CCC%2CG";
                                    PostResponce = HttpHelper.postFormData(new Uri(PostRequestURL), PostdataForPagination);
                                }
                                catch { }
                            }
                            clsDBQueryManager QM = new clsDBQueryManager();
                            if (PostResponce.Contains("/profile/view?id"))
                            {

                                List<string> PageSerchUrl = GettingAllUrl(PostResponce);
                                PageSerchUrl.Distinct();

                                if (PageSerchUrl.Count == 0)
                                {
                                    AddToLogger("[ " + DateTime.Now + " ] => [ On the basis of your Account you can able to see " + RecordURL.Count + " Results ]");
                                    break;
                                }

                                foreach (string item in PageSerchUrl)
                                {
                                    if (SearchCriteria.starter)
                                    {
                                        if (item.Contains("pp_profile_photo_link") || item.Contains("vsrp_people_res_name") || item.Contains("profile/view?"))
                                        {
                                            try
                                            {
                                                string urlSerch = item;
                                                if (urlSerch.Contains("vsrp_people_res_name"))
                                                {
                                                    RecordURL.Add(urlSerch);
                                                    try
                                                    {
                                                        string query = "Insert Into tb_CampaignScraperURL (Url, Account, Status) Values ('" + urlSerch + "','" + Account + "','" + "Not Scraped');";
                                                        QM.InsertUrl(query);
                                                    }
                                                    catch
                                                    { }
开发者ID:brentscheidt,项目名称:inboard,代码行数:66,代码来源:frmCampaignScraper.cs


示例17: frmCampaignScraper_Load

        private void frmCampaignScraper_Load(object sender, EventArgs e)
        {
            image = Properties.Resources.background;

            clsDBQueryManager DQ = new clsDBQueryManager();
            DataSet DS = new DataSet();
            DataTable DT = new DataTable();
            DataGridViewCheckBoxColumn chk = new DataGridViewCheckBoxColumn();
            try
            {
                DS = new clsDBQueryManager().getAllCampaignScraperData();

                DT = DS.Tables[0];

                dgv_CampaignScraper.DataSource = DT.DefaultView;
            }
            catch
     

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BaseLibID.InstagramUser类代码示例发布时间:2022-05-24
下一篇:
C# BaseLib.GlobusHttpHelper类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap