private void SaveBoxDbConfig(DbConfigEntity dbconfig, string conbox)
        {
            //string boxConn = $"Data Source={ip};port=10080;User ID=test;Password=123456;Initial Catalog=smartbox;";

            string[] strsplit = conbox.Split(new char[2] {
                '=', ';'
            });
            DbConnEntity boxcon = new DbConnEntity();

            boxcon.Ip       = strsplit[1];
            boxcon.Port     = Convert.ToInt32(strsplit[3]);
            boxcon.UserName = strsplit[5];
            boxcon.Password = strsplit[7];
            boxcon.DbName   = strsplit[9];
            dbconfig.BoxDbConnStrs.Add(boxcon);
        }
Beispiel #2
0
 private void SaveBoxDbConfigFile(DbConfigEntity dbconfig)
 {
     System.IO.File.WriteAllText("DbBoxConfig.ini", Newtonsoft.Json.JsonConvert.SerializeObject(dbconfig.BoxDbConnStrs), Encoding.UTF8);
 }