Exemplo n.º 1
0
        private void GetCurrentConfig()
        {
            XmlConfigController xc = new XmlConfigController();
            string dataSource      = xc.GetConnStr();

            this.txtCurrentDataSource.Text = dataSource;
            this.SetConfigByDataSource(dataSource);
            xc = null;
        }
Exemplo n.º 2
0
 private string GetKey()
 {
     if (string.IsNullOrEmpty(this._key))
     {
         XmlConfigController xc = new XmlConfigController();
         this._key = xc.GetKeyOfCryPd();
     }
     return(_key);
 }
Exemplo n.º 3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (Valid())
     {
         XmlConfigController xc = new XmlConfigController();
         xc.SetValueOfDataSource(this.txtCurrentDataSource.Text);
         MessageBox.Show("保存成功!");
     }
     else
     {
         MessageBox.Show("请检查你的输入!");
     }
 }
Exemplo n.º 4
0
        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();
                }
            }
        }