Dynaverse.Net ... your friend for SFC3 and SFC2. We support all versions of these great games!
0 Members and 1 Guest are viewing this topic.
If you are interested in Programming skills, I Say Please Download this. the C sharp Beta is very very good, and I can't think Jerry enough for It.Stephen
using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Data.OleDb;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace MyPages{ /// <summary> /// Summary description for teststuff. /// /// How to have fun coding and testing different controls /// /// J. Hammond 2005 and beyond /// </summary> public class teststuff : System.Web.UI.Page { protected System.Web.UI.WebControls.Button btnVB; protected System.Web.UI.WebControls.Button btnGameProgramming; protected System.Web.UI.WebControls.Button btnDirectX; protected System.Web.UI.WebControls.Button btnCplusplus; protected System.Web.UI.WebControls.Button btnCSharp; protected System.Web.UI.WebControls.Button btnASP; protected System.Web.UI.WebControls.Button btnAll; protected System.Web.UI.WebControls.Button btnSQL; protected System.Web.UI.WebControls.Label lblLibrary; protected System.Web.UI.WebControls.DataGrid dgTestIt; private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here /*string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM ASPNET"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); */ } #region Web Form Designer generated code override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); //Set the properties of dgTestIt datagrid control dgTestIt.AlternatingItemStyle.BackColor=System.Drawing.Color.LightBlue; dgTestIt.ItemStyle.BackColor=System.Drawing.Color.LightGreen; dgTestIt.AllowSorting=true; dgTestIt.ShowFooter=true; dgTestIt.ShowHeader=true; dgTestIt.Width=800; dgTestIt.BackColor=System.Drawing.Color.LightGray; dgTestIt.BorderColor=System.Drawing.Color.Green; dgTestIt.BorderStyle=BorderStyle.Solid; dgTestIt.BorderWidth=3; btnSQL.BackColor=System.Drawing.Color.LightGreen; btnSQL.BorderColor=System.Drawing.Color.ForestGreen; btnSQL.BorderStyle=BorderStyle.Ridge; btnAll.BackColor=System.Drawing.Color.LightGreen; btnAll.BorderColor=System.Drawing.Color.ForestGreen; btnAll.BorderStyle=BorderStyle.Ridge; btnASP.BackColor=System.Drawing.Color.LightGreen; btnASP.BorderColor=System.Drawing.Color.ForestGreen; btnASP.BorderStyle=BorderStyle.Ridge; btnCSharp.BackColor=System.Drawing.Color.LightGreen; btnCSharp.BorderColor=System.Drawing.Color.ForestGreen; btnCSharp.BorderStyle=BorderStyle.Ridge; btnVB.BackColor=System.Drawing.Color.LightGreen; btnVB.BorderColor=System.Drawing.Color.ForestGreen; btnVB.BorderStyle=BorderStyle.Ridge; btnGameProgramming.BackColor=System.Drawing.Color.LightGreen; btnGameProgramming.BorderColor=System.Drawing.Color.ForestGreen; btnGameProgramming.BorderStyle=BorderStyle.Ridge; btnDirectX.BackColor=System.Drawing.Color.LightGreen; btnDirectX.BorderColor=System.Drawing.Color.ForestGreen; btnDirectX.BorderStyle=BorderStyle.Ridge; btnCplusplus.BackColor=System.Drawing.Color.LightGreen; btnCplusplus.BorderColor=System.Drawing.Color.ForestGreen; btnCplusplus.BorderStyle=BorderStyle.Ridge; lblLibrary.BackColor=System.Drawing.Color.LightGreen; lblLibrary.BorderColor=System.Drawing.Color.ForestGreen; lblLibrary.BorderStyle=BorderStyle.Ridge; lblLibrary.Font.Size=12; lblLibrary.Text="Welcome to My Programming Library. Please click one of the buttons below to choose which library you would like to view."; } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.btnSQL.Click += new System.EventHandler(this.btnSQL_Click); this.btnAll.Click += new System.EventHandler(this.btnAll_Click); this.btnASP.Click += new System.EventHandler(this.btnASP_Click); this.btnCSharp.Click += new System.EventHandler(this.btnCSharp_Click); this.btnCplusplus.Click += new System.EventHandler(this.btnCplusplus_Click); this.btnDirectX.Click += new System.EventHandler(this.btnDirectX_Click); this.btnGameProgramming.Click += new System.EventHandler(this.btnGameProgramming_Click); this.btnVB.Click += new System.EventHandler(this.btnVB_Click); this.Load += new System.EventHandler(this.Page_Load); } #endregion private void Button1_Click(object sender, System.EventArgs e) { //Response.Redirect("http://www.toasty0.net"); Response.Close(); } private void btnAll_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM ASPNET UNION SELECT * FROM VB UNION SELECT * FROM Cpp UNION SELECT * FROM Game UNION SELECT * FROM CSharp UNION SELECT * FROM SeQuil UNION SELECT * FROM DX ORDER BY Title "; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnASP_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM ASPNET ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnCSharp_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM CSharp ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnCplusplus_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM Cpp ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnDirectX_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM DX ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnGameProgramming_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM Game"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnVB_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM VB ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } private void btnSQL_Click(object sender, System.EventArgs e) { string DbPath = Server.MapPath("bin/LibBooksProg.mdb"); //string ConnStr; string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;"+ @"Data Source="+DbPath+";"; OleDbConnection MyOleDbConn = new OleDbConnection(ConnStr); string SQL= "SELECT * FROM SeQuil ORDER BY Title"; OleDbCommand Commandobj = new OleDbCommand( SQL,MyOleDbConn); MyOleDbConn.Open(); dgTestIt.DataSource= Commandobj.ExecuteReader(); dgTestIt.DataBind(); MyOleDbConn.Close(); } /*private void dgTestIt_SelectedIndexChanged(object sender, System.EventArgs e) { } private void dgTestIt_SortCommand(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e) { dataView1.sort=e.SortExpression; dgTestIt.DataBind(); }*/ }}