Example #1
0
        private void PopulateGrossExported()
        {
            String fiscalYear = (String)Session["FiscalYear"];

            RetrieveFromDB rtrvDB = new RetrieveFromDB();

            DataSet ds = rtrvDB.DisplayCHG(fiscalYear);
            DataSet ds2 = rtrvDB.DisplayTuitionDifferentialRevenueEdit(fiscalYear);

            TextBox tb = new TextBox();

            for (int row = 0; row < GrossCHGGridView.Rows.Count; row++)
            {

                tb = (TextBox)GrossCHGGridView.Rows[row].FindControl("UndergradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row + 8][3].ToString();

                tb = (TextBox)GrossCHGGridView.Rows[row].FindControl("UndergradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row + 8][4].ToString();

                tb = (TextBox)GrossCHGGridView.Rows[row].FindControl("GradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row + 12][3].ToString();

                tb = (TextBox)GrossCHGGridView.Rows[row].FindControl("GradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row + 12][4].ToString();
            }

            for (int row = 0; row < NetCHGGridView.Rows.Count; row++)
            {

                tb = (TextBox)NetCHGGridView.Rows[row].FindControl("UndergradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row][3].ToString();

                tb = (TextBox)NetCHGGridView.Rows[row].FindControl("UndergradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row][4].ToString();

                tb = (TextBox)NetCHGGridView.Rows[row].FindControl("GradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row + 4][3].ToString();

                tb = (TextBox)NetCHGGridView.Rows[row].FindControl("GradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row + 4][4].ToString();
            }

            for (int row = 0; row < ExportedCHGGridView.Rows.Count; row++)
            {

                tb = (TextBox)ExportedCHGGridView.Rows[row].FindControl("UndergradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row + 16][3].ToString();

                tb = (TextBox)ExportedCHGGridView.Rows[row].FindControl("UndergradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row + 16][4].ToString();

                tb = (TextBox)ExportedCHGGridView.Rows[row].FindControl("GradCHGTextBox");
                tb.Text = ds.Tables[0].Rows[row + 20][3].ToString();

                tb = (TextBox)ExportedCHGGridView.Rows[row].FindControl("GradRateTextBox");
                tb.Text = ds.Tables[0].Rows[row + 20][4].ToString();
            }

            tb = (TextBox)DifferentialRevenueGridView.Rows[0].FindControl("UndergradCHGTextBox");
            tb.Text = ds2.Tables[0].Rows[0][1].ToString();

            tb = (TextBox)DifferentialRevenueGridView.Rows[0].FindControl("UndergradRateTextBox");
            tb.Text = ds2.Tables[0].Rows[0][2].ToString();

            tb = (TextBox)DifferentialRevenueGridView.Rows[0].FindControl("NumberGradStudentsTextBox");
            tb.Text = ds2.Tables[0].Rows[1][1].ToString();

            tb = (TextBox)DifferentialRevenueGridView.Rows[0].FindControl("GradRateTextBox");
            tb.Text = ds2.Tables[0].Rows[1][2].ToString();
        }