void GetSqlSentence() { SqlSentenceBL bl = new SqlSentenceBL(); List <SqlSentence> sqls = bl.GetSqls(); if (sqls.Count > 0) { foreach (SqlSentence sql in sqls) { SqlDict.Add(sql.SqlName, sql.SqlValue); } } }
private void kryBtnSel_Click(object sender, EventArgs e) { int selIndex = this.kryCbxSel.SelectedIndex; switch (selIndex) { case 0: { UserBL bl = new UserBL(); List <User> users = bl.GetUsers(); this.bindSrcUsers.DataSource = users; kryDgvMng.DataSource = this.bindSrcUsers; break; } case 1: { DbConnBL bl = new DbConnBL(); List <DbConn> conns = bl.GetDbConns(); this.bindSrcDbConns.DataSource = conns; kryDgvMng.DataSource = this.bindSrcDbConns; break; } case 2: { SqlSentenceBL bl = new SqlSentenceBL(); List <SqlSentence> sqls = bl.GetSqls(); this.bindSrcSqls.DataSource = sqls; kryDgvMng.DataSource = this.bindSrcSqls; break; } default: KryptonMessageBox.Show("请选择配置表!"); break; } }