private void GetCurrentConfig() { XmlConfigController xc = new XmlConfigController(); string dataSource = xc.GetConnStr(); this.txtCurrentDataSource.Text = dataSource; this.SetConfigByDataSource(dataSource); xc = null; }
private string GetKey() { if (string.IsNullOrEmpty(this._key)) { XmlConfigController xc = new XmlConfigController(); this._key = xc.GetKeyOfCryPd(); } return(_key); }
private void btnSave_Click(object sender, EventArgs e) { if (Valid()) { XmlConfigController xc = new XmlConfigController(); xc.SetValueOfDataSource(this.txtCurrentDataSource.Text); MessageBox.Show("保存成功!"); } else { MessageBox.Show("请检查你的输入!"); } }
public CdrManager() { XmlConfigController xc = new XmlConfigController(); string databaseType = xc.GetDataBaseType(); if (!string.IsNullOrEmpty(databaseType)) { if ("oracle".Equals(databaseType)) { iconnection = new oracleFactory(); iconnection.SetConnectionStr(); } else if ("sqlserver".Equals(databaseType)) { //未完待续 //iconnection = new sqlserverFactory(); } } }