Exemplo n.º 1
0
        private List <string> decry(DataSet ds, string Type)
        {
            List <string> ls = new List <string>();

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    ls.Add(db.Decrypt(dr[Type].ToString()));
                }
            }
            return(ls);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 画面初始化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DBSet_Load(object sender, EventArgs e)
        {
            switch (DBType)
            {
            case DatabaseType.PivasDB:
                tbDataSource.Text = db.IniReadValuePivas("Database", "Data Source");
                tbDBName.Text     = db.IniReadValuePivas("Database", "Initial Catalog");
                tbUserID.Text     = db.Decrypt(db.IniReadValuePivas("Database", "User ID"));
                tbPassword.Text   = db.Decrypt(db.IniReadValuePivas("Database", "Password"));
                break;

            case DatabaseType.HISDB:
                btnTestConnect.Visible = false;  //HIS数据库暂不支持测试
                btnSaveConfig.Enabled  = true;   //保存按钮可用
                tbDataSource.Text      = db.IniReadValueHIS("Database", "Data Source");
                tbDBName.Text          = db.IniReadValueHIS("Database", "Initial Catalog");
                tbUserID.Text          = db.Decrypt(db.IniReadValueHIS("Database", "User ID"));
                tbPassword.Text        = db.Decrypt(db.IniReadValueHIS("Database", "Password"));
                break;

            default:
                break;
            }
        }