Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    
    {
    //  Control o=  base.FindControl("hidDBName");

        if (!IsPostBack)
        {
            string configDefaultDB = iConfigDB.GetOnlineDefaultDBName();
            defaultSelectDBType = Request["DBType"] != null ? Request["DBType"].ToString().Trim() : "OnlineDB";
            defaultSelectDB = Request["DBName"] != null ? Request["DBName"].ToString().Trim() : configDefaultDB;
            objDbInfo = iConfigDB.GetDBInfo();
            IniDBInfo();
         
        }
    }
Exemple #2
0
    private void IniDBInfo()
    {
        objDbInfo = iConfigDB.GetDBInfo();
        ddlDB.Items.Clear();
        string[] dbList = objDbInfo.OnLineDBList;
        foreach (string OnLineDB in dbList)
        {
            ddlDB.Items.Add(new ListItem(OnLineDB, OnLineDB));
        }
      
        SetddlDBTypeSelect();
        SetddlDBSelect();
        ddlDBType.Items[0].Value = "OnlineDB";
        ddlDBType.Items[1].Value = "History";
        _onLinesConnString= objDbInfo.OnLineConnectionString;
        _hisLinesConnString = objDbInfo.HistoryConnectionString;

        //ddlDB.Text = "HPIMES";
    }
Exemple #3
0
       public DBInfo GetDBInfo()
       {
           DBInfo dbInfo = new DBInfo();
           dbInfo.OnLineConnectionString = SQLHelper.OnLineConnectionString;
           dbInfo.HistoryConnectionString = SQLHelper.HistoryConnectionString;
           dbInfo.OnLineDBList = SQLHelper.DB_CFG_LIST;
           dbInfo.HistoryDBList = SQLHelper.DB_HISTROY;
           return dbInfo;

       }