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


C# clsDBQueryManager.InsertAccountGroupName方法代码示例

本文整理汇总了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);
            }
        }
开发者ID:prog-moh,项目名称:twtboard,代码行数:53,代码来源:frmMain.cs

示例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);
            }
        }
开发者ID:ahmetDostr,项目名称:twtboard,代码行数:85,代码来源:frmMain_NewUI.cs


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