Bob Cat

Bob Cat

  • NA
  • 7
  • 0

How to display data returned from MS Access?

Jun 14 2007 6:00 PM

2 Question (Even 1 will help a lot):

(1) How can I display the real time data (which my methods return in a C# console application) in the ASP GridView?

 

(2) Once the data is displayed in the GridView, how can I draw a plot of that data and display in ASP?

 

Detail of my project:

Guys, I am working on a C# console application and am stuck on the above 2 questions. I will really appreciate some help asap.

 

The data is sitting in the MS Access database which is updated daily. I have methods that return objects of data. The main class code looks like this:

 

using System;

using System.Collections.Generic;

using System.Text;

using MuniDataAccess.Yields;

 

namespace MuniDataAccess

{

    class Program

    {

        static void Main(string[] args)

        {

            DateTime dt = new DateTime(2007, 6, 13);

            int tm = 30;

            YieldData yld = new YieldData();

            Console.WriteLine("Getting data for " + tm.ToString() + "; " + dt.ToShortDateString());

            Console.WriteLine("The MMD yield is: " + yld.GetAaaMMD(dt, tm));

            Console.WriteLine("The Tsy yield is: " + yld.GetAaaTsy(dt, tm));

            Console.WriteLine("The Libor Yield is:" + yld.GetAaaLibor(dt, tm));

            Console.WriteLine("The BMA Yield is:" + yld.GetAaaBMA(dt, tm));

            SortedList<int, MMDYield> lst = yld.GetMMDAll(dt);

            for (int i=0; i < lst.Count; i++)

            {

                MMDYield y = lst.Values[i];

                Console.WriteLine("The " + y.Term.ToString("0")

                    + "yr MMD yield is: " + y.Aaa.ToString("0.00"));

            }

            Console.Read();

        }

    }

}

 

 

 


Answers (1)