本文整理汇总了C#中BaseLib.clsDBQueryManager.InsertAccountGroupName方法的典型用法代码示例。如果您正苦于以下问题:C# clsDBQueryManager.InsertAccountGroupName方法的具体用法?C# clsDBQueryManager.InsertAccountGroupName怎么用?C# clsDBQueryManager.InsertAccountGroupName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseLib.clsDBQueryManager
的用法示例。
在下文中一共展示了clsDBQueryManager.InsertAccountGroupName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssignGroupsToAccounts
public void AssignGroupsToAccounts()
{
try
{
int CountPerGroup = 0;
int counter = 0;
int listCounter = 0;
if (!string.IsNullOrEmpty(txtAccountPerGroup.Text) && NumberHelper.ValidateNumber(txtAccountPerGroup.Text))
{
CountPerGroup = Convert.ToInt32(txtAccountPerGroup.Text);
}
if (TweetAccountContainer.dictionary_TweetAccount.Count > 0)
{
foreach (KeyValuePair<string, TweetAccountManager> item in TweetAccountContainer.dictionary_TweetAccount)
{
if (listCounter <= lstGroupNames.Count-1)
{
if (counter < CountPerGroup)
{
}
else
{
counter = 0;
listCounter++;
if (listCounter == lstGroupNames.Count)
{
break;
}
}
string GroupName = string.Empty;
GroupName = lstGroupNames[listCounter];
clsDBQueryManager Db = new clsDBQueryManager();
Db.InsertAccountGroupName(item.Key, GroupName);
counter++;
}
}
}
else
{
AddToLog_Checker("Please Upload Accounts To Assign Accounts");
}
AddToLog_Checker("Finished Adding Groups To Accounts.");
}
catch (Exception ex)
{
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> AssignGroupsToAccounts() --> " + ex.Message, Globals.Path_AccountCheckerErroLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> AssignGroupsToAccounts() --> " + ex.Message, Globals.Path_TwtErrorLogs);
}
}
示例2: AssignGroupsToAccounts
public void AssignGroupsToAccounts()
{
try
{
Lst_AssignGroupThreads.Add(Thread.CurrentThread);
AssignGroupThreadStart = true;
Thread.CurrentThread.IsBackground = true;
}
catch { };
try
{
int CountPerGroup = 0;
int counter = 0;
int listCounter = 0;
bool IscounterPerGroup = true;
txtAccountPerGroup.Invoke(new MethodInvoker(delegate
{
if (!string.IsNullOrEmpty(txtAccountPerGroup.Text) && NumberHelper.ValidateNumber(txtAccountPerGroup.Text))
{
CountPerGroup = Convert.ToInt32(txtAccountPerGroup.Text);
}
else
{
IscounterPerGroup = false;
}
}));
if (IscounterPerGroup)
{
if (TweetAccountContainer.dictionary_TweetAccount.Count > 0)
{
foreach (KeyValuePair<string, TweetAccountManager> item in TweetAccountContainer.dictionary_TweetAccount)
{
if (listCounter <= lstGroupNames.Count - 1)
{
if (counter < CountPerGroup)
{
}
else
{
counter = 0;
listCounter++;
if (listCounter == lstGroupNames.Count)
{
break;
}
}
string GroupName = string.Empty;
GroupName = lstGroupNames[listCounter];
clsDBQueryManager Db = new clsDBQueryManager();
Db.InsertAccountGroupName(item.Key, GroupName);
try
{
GlobusFileHelper.AppendStringToTextfileNewLine(item.Key + " , " + GroupName, Globals.path_Group_Name);
}
catch { };
counter++;
}
}
}
else
{
AddToLog_Checker("[ " + DateTime.Now + " ] => [ Please Upload Accounts To Assign Accounts ]");
}
}
else
{
MessageBox.Show("Please enter valid number in assign accounts per group.");
AddToLog_Checker("[ " + DateTime.Now + " ] => [ Please enter valid number in assign accounts per group. ]");
return;
}
AddToLog_Checker("[ " + DateTime.Now + " ] => [ Finished Adding Groups To Accounts ]");
AddToLog_Checker("[ " + DateTime.Now + " ] => [ PROCESS COMPLETED ]");
AddToLog_Checker("-----------------------------------------------------------------------------------------------------------------------");
}
catch (Exception ex)
{
GlobusFileHelper.AppendStringToTextfileNewLine(DateTime.Now + " --> Error --> AssignGroupsToAccounts() --> " + ex.Message, Globals.Path_AccountCheckerErroLog);
GlobusFileHelper.AppendStringToTextfileNewLine("Error --> AssignGroupsToAccounts() --> " + ex.Message, Globals.Path_TwtErrorLogs);
}
}