0% found this document useful (0 votes)
14 views

Data Access Layer

This C# code defines a partial class called DataAccessLayer that inherits from System.Web.UI.Page. On page load, it initializes a table adapter for a rap_sources table. It then binds the data returned from a GetDataBySic_Code method, passing in the parameter "2621", to a GridView control for display.

Uploaded by

Hyo Dan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Data Access Layer

This C# code defines a partial class called DataAccessLayer that inherits from System.Web.UI.Page. On page load, it initializes a table adapter for a rap_sources table. It then binds the data returned from a GetDataBySic_Code method, passing in the parameter "2621", to a GridView control for display.

Uploaded by

Hyo Dan
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Data Access Layer

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class DataAccessLayer : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
CentralAirTableAdapters.rap_sourcesTableAdapter rap_sourcesAdapter = new
CentralAirTableAdapters.rap_sourcesTableAdapter();

//CentralAir.rap_sourcesDataTable rap_sourcesList = rap_sourcesAdapter.GetData();


//foreach (CentralAir.rap_sourcesRow i in rap_sourcesList)
//Response.Write("Rap Sources: " + i.name + "</br>");

GridView1.DataSource = rap_sourcesAdapter.GetDataBySic_Code("2621");
GridView1.DataBind();

You might also like