I am using 3 tier programming
So in my Data Access Layer I have the following code
In my business Logic Code I have this:
In my Presentation Layer I have the following code:
So here is the real problem start:
I want to display in this way
On my Y Axis Label( look at the attachment)
It will be the record date( 12/21/2012, 12/22/2012, 12/23/2012)
On my X Axis Label(look at the attachment)
It will be 1 to 100
My series 1 will be NoOfClick
My series 2 will be NoOfView
I tried the following but it said
The type of column with name Record Date is not numeric
So in my Data Access Layer I have the following code
public
List<AdvertisementDAL> displayChart()
{
List<AdvertisementDAL> dal =
new
List<AdvertisementDAL>();
string
sql =
"Select * From AdvertisementRecord"
;
SqlConnection conn =
new
SqlConnection(_connStr);
SqlCommand cmd =
new
SqlCommand(sql, conn);
conn.Open();
SqlDataReader dr = cmd.ExecuteReader();
while
(dr.Read())
{
_recordID =
int
.Parse(dr[
"RecordID"
].ToString());
_recordDate = dr[
"RecordDate"
].ToString();
_noOfClick =
int
.Parse(dr[
"NoOfClick"
].ToString());
_noOfView =
int
.Parse(dr[
"NoOfView"
].ToString());
_advertisementID =
int
.Parse(dr[
"FK_AdvertisementID"
].ToString());
dal.Add(
new
AdvertisementDAL(_recordID, _recordDate, _noOfClick, _noOfView, _advertisementID));
}
conn.Close();
dr.Close();
dr.Dispose();
return
dal;
}
In my business Logic Code I have this:
public
List<AdvertisementDAL> pieChart()
{
AdvertisementDAL dal =
new
AdvertisementDAL();
List<AdvertisementDAL> dll =
new
List<AdvertisementDAL>();
dll = dal.displayChart();
return
dll;
}
In my Presentation Layer I have the following code:
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
AdvertisementBLL bll =
new
AdvertisementBLL();
RadChart1.DataSource = bll.pieChart();
RadChart1.DataBind();
}
}
So here is the real problem start:
I want to display in this way
On my Y Axis Label( look at the attachment)
It will be the record date( 12/21/2012, 12/22/2012, 12/23/2012)
On my X Axis Label(look at the attachment)
It will be 1 to 100
My series 1 will be NoOfClick
My series 2 will be NoOfView
I tried the following but it said
The type of column with name Record Date is not numeric