Jump to content
Software FX Community

Gathering Data for Chart in Wizard


Armysniper
 Share

Recommended Posts

I have a wizard that gathers information and stores it through each step in an object that I have created. The object is stored in Session through each step of the wizard until all the data is gathered and the I go and display charts based on the entries. How can I get this object into the Chart? Can someone provide an example? Here is the code for the object that stores the data...

 using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Collections;

using System.Data;

/// <summary>

/// Summary description for EconomicWizardInfo

/// </summary>

public class EconomicWizardInfo

{

 public EconomicWizardInfo()

 {

 }

  ArrayList programExpenses = new ArrayList();

  public ArrayList ProgramExpenses

  {

  get { return programExpenses; }

  set { programExpenses = value; }

  }

 

  ArrayList programs = new ArrayList();

  public ArrayList ProgramNames

  {

  get { return programs; }

  set { programs = value; }

  }

  ArrayList revenues = new ArrayList();

  public ArrayList ProgramRevenues

  {

  get { return revenues; }

  set { revenues = value; }

  }

  ArrayList percentages = new ArrayList();

  public ArrayList ProgramTimeAllocation

  {

  get { return percentages; }

  set { percentages = value; }

  }

  int totalExpenses = 0;

  public int TotalExpenses

  {

  get { return totalExpenses; }

  set { totalExpenses = value; }

  }

  int fundRaisingExpenses = 0;

  public int FundRaisingExpenses

  {

  get { return fundRaisingExpenses; }

  set { fundRaisingExpenses = value; }

  }

  int generalAdminExpenses = 0;

  public int GeneralAdminExpenses

  {

  get { return generalAdminExpenses; }

  set { generalAdminExpenses = value; }

  }

  int totalRevenues = 0;

  public int TotalRevenues

  {

  get { return totalRevenues; }

  set { totalRevenues = value; }

  }

  int charitableContributions = 0;

  public int CharitableContributions

  {

  get { return charitableContributions; }

  set { charitableContributions = value; }

  }

  int unrestrictedGrants = 0;

  public int UnrestrictedGrants

  {

  get { return unrestrictedGrants; }

  set { unrestrictedGrants = value; }

  }

  int nonProgramAdminTime = 0;

  public int NonProgramAdminTime

  {

  get { return nonProgramAdminTime; }

  set { nonProgramAdminTime = value; }

  }

  public DataSet GetProgramNames()

  {

  DataSet ds = new DataSet();

  DataTable dt = new DataTable();

  dt.Rows.Add(programs);

  ds.Tables.Add(dt);

  return ds;

  }

  public DataSet GetProgramDataValues()

  {

  DataSet ds = new DataSet();

  DataTable dt = new DataTable("ProgramData");

  DataColumn prog = new DataColumn("ProgramName");

  DataColumn pExp = new DataColumn("ProgramExpense");

  DataColumn pRev = new DataColumn("ProgramRevenue");

  DataColumn pTime = new DataColumn("ProgramTimeAllocation");

  DataRow dr;

  object[] rowArray = new object[4];

  for (int x = 0; x < programs.Count; x++)

  {

  rowArray[0] = programs[x];

  rowArray[1] = programExpenses[x];

  rowArray[2] = revenues[x];

  rowArray[3] = percentages[x];

  dr = dt.NewRow();

  dr.ItemArray = rowArray;

  dt.Rows.Add(dr);

  }

  ds.Tables.Add(dt);

  return ds;

  }

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...