Example #1
0
    public SqlServerHelper(SetOfBookType sobType)
    {
        setOfBook = sobType;

        this._commandTimeout = 30;
        //this._sqlConnStr = ConfigurationSettings.AppSettings["SqlConnStr"].ToString();
        this._sqlConnStr = ConfigurationSettings.AppSettings[setOfBook.ToString()].ToString();

        if (ConfigurationSettings.AppSettings["CommandTimeout"] != null)
        {
            this._commandTimeout = int.Parse(ConfigurationSettings.AppSettings["CommandTimeout"].ToString());
        }

    }
Example #2
0
    public MySqlHelper(SetOfBookType sobType)
    {
        setOfBook = sobType;

        //this._sqlConnStr = ConfigurationSettings.AppSettings["SqlConnStr"].ToString();
        //if (ConfigurationSettings.AppSettings["CommandTimeout"] != null)
        //{
        //    this._commandTimeout = int.Parse(ConfigurationSettings.AppSettings["CommandTimeout"].ToString());
        //}

        //this._sqlConnStr = ConfigurationManager.AppSettings["LocalMySqlServer"].ToString(); ;
        //this._commandTimeout = int.Parse(ConfigurationSettings.AppSettings["CommandTimeout"].ToString());

        //this._sqlConnStr = ConfigurationManager.ConnectionStrings["LocalMySqlServer"].ToString();
        this._sqlConnStr = ConfigurationManager.ConnectionStrings[setOfBook.ToString()].ToString();
    }