Exemplo n.º 1
0
        void FormulateFormView(SimulationSystem SS)
        {
            TextBoxes["Number of NewsPapers"].Text = SS.NumOfNewspapers.ToString();
            TextBoxes["Number Of Records"].Text    = SS.NumOfRecords.ToString();
            TextBoxes["Purchase Price"].Text       = SS.PurchasePrice.ToString();
            TextBoxes["Scrap Price"].Text          = SS.ScrapPrice.ToString();
            TextBoxes["SellingPrice"].Text         = SS.SellingPrice.ToString();
            TextBoxes["Good Distrubtion"].Text     = SS.DayTypeDistributions[0].Probability.ToString();
            TextBoxes["Fair Distrubtion"].Text     = SS.DayTypeDistributions[1].Probability.ToString();
            TextBoxes["Poor Distrubtion"].Text     = SS.DayTypeDistributions[2].Probability.ToString();

            DemandGridView.DataSource = null;

            foreach (DemandDistribution DD in SS.DemandDistributions)
            {
                DataGridViewRow DVR = new DataGridViewRow();

                DVR.CreateCells(DemandGridView);

                DVR.Cells[0].Value = DD.Demand;
                DVR.Cells[1].Value = DD.DayTypeDistributions[0].Probability;
                DVR.Cells[2].Value = DD.DayTypeDistributions[1].Probability;
                DVR.Cells[3].Value = DD.DayTypeDistributions[2].Probability;
                DemandGridView.Rows.Add(DVR);
            }
            DemandGridView.Refresh();
        }
Exemplo n.º 2
0
 public void  BindGridView()
 {
     DemandGridView.DataSource = new DemandService().FetchDemand();
     DemandGridView.DataBind();
 }