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


C# clsDBQueryManager.InsertCampaignScraperData方法代码示例

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


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

示例1: btn_SaveCampaignScraper_Click


//.........这里部分代码省略.........
                    FileName = (txtScraperExportFilename.Text).Replace("\"", string.Empty).Replace(",", string.Empty).ToString();
                    FirstName = txtScrperFirstname.Text;
                    LastName = txtScrperlastname.Text;
                    Keyword = txtKeyword.Text;
                    Title = txtTitle.Text;
                    if (Keyword.Contains("or") || (Keyword.Contains("and")) || (Keyword.Contains("not")))
                    {
                        try
                        {
                            Keyword = Keyword.Replace(" or ", " OR ");
                            Keyword = Keyword.Replace(" and ", " AND ");
                            Keyword = Keyword.Replace(" not ", " NOT ");
                        }
                        catch { }
                    }
                    if (Title.Contains("or") || (Title.Contains("and")) || (Title.Contains("not")))
                    {
                        try
                        {
                            Title = Title.Replace(" or ", " OR ");
                            Title = Title.Replace(" and ", " AND ");
                            Title = Title.Replace(" not ", " NOT ");
                        }
                        catch { }
                    }
                    if (!string.IsNullOrEmpty(txtPostalcode.Text))
                    {
                        PostalCode = txtPostalcode.Text;
                    }
                    if (!string.IsNullOrEmpty(txtCompnayName.Text))
                    {
                        Company = txtCompnayName.Text;
                    }

                    if (CombScraperCountry.SelectedItem.ToString() != null && CombScraperCountry.SelectedIndex > 0)
                    {
                        try
                        {
                            if (!string.IsNullOrEmpty(CombScraperCountry.SelectedItem.ToString()))
                            {
                                string countryValue = string.Empty;
                                string temCOuntry = CombScraperCountry.SelectedItem.ToString();
                                GetCountryNameValue(ref temCOuntry, ref countryValue);
                                Country = countryValue;
                            }
                        }
                        catch (Exception ex)
                        {
                            GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                            GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs);
                        }
                    }
                    CampaignName = txtBoxCampaignScraperName.Text;
                    string Account = comboBoxemail.SelectedItem.ToString();
                    clsDBQueryManager obj_clsDBQueryManager = new clsDBQueryManager();
                    DataTable DT = new DataTable();
                    DataSet DS = new DataSet();
                    DS = obj_clsDBQueryManager.getDataFromAccountsTable(Account);
                    DT = DS.Tables[0];
                    string Password = string.Empty;
                    string ProxyAddress = string.Empty;
                    string ProxyPort = string.Empty;
                    string ProxyUserName = string.Empty;
                    string ProxyPassword = string.Empty;
                    foreach (DataRow itemAccount in DT.Rows)
                    {
                        try
                        {
                            Password = itemAccount["Password"].ToString();
                            ProxyAddress = itemAccount["ProxyAddress"].ToString();
                            ProxyPort = itemAccount["ProxyPort"].ToString();
                            ProxyUserName = itemAccount["ProxyUserName"].ToString();
                            ProxyPassword = itemAccount["ProxyPassword"].ToString();
                        }
                        catch
                        { }
                    }

                    //database query to insert data
                    string query = "Insert into tb_CampaignScraper (CampaignName, Account, FirstName, LastName, Location, Country, AreaWiseLocation, PostalCode, Company, Keyword, Title, Industry, Relationship, Language, Groups, ExportedFileName, TitleValue, CompanyValue, within, YearsOfExperience, Function, SeniorLevel, IntrestedIn, CompanySize, Fortune1000, RecentlyJoined) Values ('" + CampaignName + "','" + Account + ":" + Password + ":" + ProxyAddress + ":" + ProxyPort + ":" + ":" + ProxyUserName + ":" + ProxyPassword + "','" + FirstName + "','" + LastName + "','" + Location + "','" + Country + "','" + LocationArea + "','" + PostalCode + "','" + Company + "','" + Keyword + "','" + Title + "','" + IndustryType + "','" + Relationship + "','" + language + "','" + Group + "','" + FileName + "','" + TitleValue + "','" + CompanyValue + "','" + within + "','" + YearsOfExperience + "','" + Function + "','" + SeniorLevel + "','" + IntrestedIn + "','" + CompanySize + "','" + Fortune1000 + "','" + RecentlyJoined + "');";

                    obj_clsDBQueryManager.InsertCampaignScraperData(query, "tb_CampaignScraper");

                    frmCampaignScraper obj_frmCampaignScraper = new frmCampaignScraper();
                    obj_frmCampaignScraper.Show();

                    AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Campaign Details saved with the campaign name :" + CampaignName + " ]");
                }
                catch (Exception ex)
                {
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnSearchScraper_Click() ---13--->>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinPreScrapperErrorLogs);
                }
            }
            else
            {
                MessageBox.Show("Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection...");
                AddLoggerScrapeUsers("[ " + DateTime.Now + " ] => [ Your Internet Connection is disabled ! or not working, Please Check Your Internet Connection... ]");
            }
        }
开发者ID:brentscheidt,项目名称:inboard,代码行数:101,代码来源:frmMain.cs


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