private static void ConnectToDb() { try { sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionString); } catch (Exception ex) { } }
public LogErrorToDb() { try { sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler); } catch (Exception ex) { } }
public void SaveError(string code, string url, int configID, string detail) { try { if (sqlDb == null) { sqlDb = new Data.SqlDb(QT.Entities.Server.ConnectionStringCrawler); } sqlDb.RunQuery("INSERT INTO [dbo].[LogErrorCrawl] ([id],[code],[detail],[configId], [url]) values (@id, @code, @detail, @configid, @url)", System.Data.CommandType.Text, new SqlParameter[] { sqlDb.CreateParamteter("id", Guid.NewGuid().ToString(), System.Data.SqlDbType.NVarChar), sqlDb.CreateParamteter("code", code, System.Data.SqlDbType.NVarChar), sqlDb.CreateParamteter("url", url, System.Data.SqlDbType.NVarChar), sqlDb.CreateParamteter("detail", detail, System.Data.SqlDbType.NVarChar), sqlDb.CreateParamteter("configid", configID, System.Data.SqlDbType.NVarChar), }); } catch (Exception ex) { log.ErrorFormat("{0}", ex.Message); } }
public CrawlerProductAdapter(Data.SqlDb sqlDb) { // TODO: Complete member initialization this.sqlDb = sqlDb; }
public RaoVatSQLAdapter(QT.Entities.Data.SqlDb sqlDb) { this.sqlDb = sqlDb; }
public PriceLogAdapter(Data.SqlDb sqlDb) { // TODO: Complete member initialization this.sqlDb = sqlDb; }