用ASP.NET写你自己的代码生成器(12) } }
#endregion
#region Show All DataBase Button2_Click /// <summary> /// 显示所有数据库 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button2_Click(object sender, System.EventArgs e) { try { m_Scon.ConnectionString = "user id="+this.txtUserName.Text+ ";password="+this.txtPassword.Text+ ";data source="+this.txtServerName.Text; SqlCommand m_Scmd = new SqlCommand("sp_databases",m_Scon); m_Scmd.CommandType = CommandType.StoredProcedure; m_Scon.Open(); SqlDataReader m_Sdr = m_Scmd.ExecuteReader(); this.DropDownList1.Items.Clear();