本文整理汇总了C#中BaseLib.clsDBQueryManager.SelectFollowData方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.SelectFollowData方法的具体用法?C# clsDBQueryManager.SelectFollowData怎么用?C# clsDBQueryManager.SelectFollowData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.SelectFollowData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNonFollowingsBeforeSpecifiedDate
public List<string> GetNonFollowingsBeforeSpecifiedDate(int noOfDays, ref TweetAccountManager AcManger)
{
TwitterDataScrapper followingScrapper = new TwitterDataScrapper();
string status = string.Empty;
followingScrapper.CounterDataNo = noOfUnfollows;
List<string> followers = followingScrapper.GetFollowers_New(AcManger.Screen_name, out status, ref AcManger.globusHttpHelper);
List<string> followings = followingScrapper.GetFollowings_New(AcManger.Screen_name, out status, ref AcManger.globusHttpHelper);
List<string> nonFollowings = followings.Except(followers).ToList();
List<string> requiredNonFollowingList = new List<string>();
///Get list of Already Followings
clsDBQueryManager queryManager = new clsDBQueryManager();
DataTable dt_AlreadyFollowed = queryManager.SelectFollowData(Username);
foreach (DataRow item in dt_AlreadyFollowed.Rows)
{
string user_AlreadyFollowed = item["following_id"].ToString();
if (nonFollowings.Exists(s => ((s.Split(':')[0]) == user_AlreadyFollowed)))
{
DateTime dt_Now = DateTime.Today;
string DateFollowed = item["DateFollowed"].ToString();
DateTime dt_DateFollowed1 = Convert.ToDateTime(DateFollowed);
//DateTime dt_DateFollowed = DateTime.Parse(String.Format("{0:d/M/yyyy HH:mm:ss}", dt_DateFollowed1));
DateTime dt_DateFollowed = dt_DateFollowed1;
TimeSpan dt_Difference = dt_Now.Subtract(dt_DateFollowed);
double dt_Difference1 = dt_Difference.Days;
if (dt_Difference.Days >= noOfDays)
{
requiredNonFollowingList.Add(user_AlreadyFollowed);
}
}
}
return requiredNonFollowingList;
}
示例2: StartUnFollowingMultithreaded
private void StartUnFollowingMultithreaded(object parameters)
{
try
{
Array paramsArray = new object[2];
paramsArray = (Array)parameters;
int NoOfFollwos = 0;
KeyValuePair<string, TweetAccountManager> keyValue = (KeyValuePair<string, TweetAccountManager>)paramsArray.GetValue(0);
string NofUnfollows = (string)paramsArray.GetValue(1);
if (!string.IsNullOrEmpty(NofUnfollows) && NumberHelper.ValidateNumber(NofUnfollows))
{
NoOfFollwos = Int32.Parse(NofUnfollows);
}
//string userIDToFollow = (string)paramsArray.GetValue(1);
List<string> list_userIDsToFollow = new List<string>();
TweetAccountManager tweetAccountManager = keyValue.Value;
AddToLog_Unfollow("[ " + DateTime.Now + " ] => [ Unfollowing Process Started For Account : " + keyValue.Key + " ]");
//Add to Threads Dictionary
AddThreadToDictionary(strModule(Module.Unfollow), tweetAccountManager.Username);
tweetAccountManager.unFollower.logEvents.addToLogger += new EventHandler(logEvents_UnFollower_addToLogger);
tweetAccountManager.logEvents.addToLogger += logEvents_UnFollower_addToLogger;
if (!tweetAccountManager.IsLoggedIn)
{
tweetAccountManager.Login();
}
if (!tweetAccountManager.IsLoggedIn)
{
AddToLog_Unfollow("[ " + DateTime.Now + " ] => [ Not Logged In With Account : " + keyValue.Key + " ]");
return;
}
//AddToLog_Unfollow("Checking for Persons Not Followed Back");
//Check Test box and anf useing feature box is checked
if (!string.IsNullOrWhiteSpace(txt_FilePathunfollowUserslist.Text))
{
AddToLog_Unfollow("[ " + DateTime.Now + " ] => [ Wait process is running. ]");
//get user deatils from list
clsDBQueryManager queryManager = new clsDBQueryManager();
DataTable dt_AlreadyFollowed = queryManager.SelectFollowData(tweetAccountManager.Username);
foreach (string item in frmMain_NewUI.lst_unfolloweruserlist)
{
try
{
if (chk_dontCheckDbForUnfollow.Checked == false)
{
try
{
if (GlobusRegex.ValidateNumber(item))
{
continue;
}
string Status = string.Empty;
String UserTimelinePageSource = tweetAccountManager.globusHttpHelper.getHtmlfromUrl(new Uri("https://twitter.com/" + item), "", "");
///Get user ID
///
string userID = string.Empty;
//try
//{
// int startIndx = UserTimelinePageSource.IndexOf("data-user-id=\"") + "data-user-id=\"".Length;
// int endIndx = UserTimelinePageSource.IndexOf("\"", startIndx);
// userID = UserTimelinePageSource.Substring(startIndx, endIndx - startIndx);
//}
//catch { }
try
{
userID = string.Empty;
#region commentedRegionForUserId
//string[] useridarr = System.Text.RegularExpressions.Regex.Split(UserTimelinePageSource, "data-user-id=");
//foreach (string useridarr_item in useridarr)
//{
// if (useridarr_item.Contains("profile-field"))
// {
// userID = useridarr_item.Substring(0 + 1, useridarr_item.IndexOf("<h1") - 3).Replace("\">\n", string.Empty).Trim();
// list_userIDsToFollow.Add(userID);
// break;
// }
//}
#endregion
try
{
int startindex = UserTimelinePageSource.IndexOf("profile_id");
string start = UserTimelinePageSource.Substring(startindex).Replace("profile_id", "");
int endindex = start.IndexOf(",");
string end = start.Substring(0, endindex).Replace(""", "").Replace("\"", "").Replace(":", "").Trim();
userID = end.Trim();
list_userIDsToFollow.Add(userID);
}
catch { }
}
catch { }
//.........这里部分代码省略.........