Exemple #1
0
        protected void OpenDraftButton_Click(object sender, EventArgs e)
        {
            StoredProcedures sp = new StoredProcedures();

            if (DraftDropDownList.SelectedIndex != 0)
            {
                DataSet ds = sp.GetStoredDraftsById(int.Parse(DraftDropDownList.SelectedValue));

                byte[] tables = (byte[])ds.Tables[0].Rows[0][2];

                Utils Utilities = new Utils();

                List<object> listOfTables = (List<object>)Utilities.DeserializeFromByteArray(tables);

                ViewState["AllocatedCosts"] = listOfTables[0];
                ViewState["Expendatures"] = listOfTables[1];
                ViewState["NetCHG"] = listOfTables[2];
                ViewState["Assessments"] = listOfTables[3];
                ViewState["AssessmentMetrics"] = listOfTables[4];
                ViewState["DifferentialRevenue"] = listOfTables[5];

                MakeProjections();

                OpenedDraftHiddenField.Value = ds.Tables[0].Rows[0][0].ToString();
                DraftNameLabel.Visible = true;
                DraftNameLabel.Text = ds.Tables[0].Rows[0][1].ToString();

                NetCHGApplyButton_Click(sender, e);
                DifferentialRevenueApplyButton_Click(sender, e);
                AssessmentsApplyButton_Click( sender,  e);
                ApplyAllocatedCostsButton_Click( sender,  e);
                ApplyExpendaturesButton_Click(sender, e);

            }
            else
            {

            }
        }