Exemplo n.º 1
0
        protected void StoreButton_Click(object sender, EventArgs e)
        {
            PopulateSaveDraftTables();

            StoredProcedures sp = new StoredProcedures();

            Utils Utilities = new Utils();
            DataTable allocatedCosts = (DataTable)ViewState["AllocatedCosts"];
            DataSet expendatures = (DataSet)ViewState["Expendatures"];
            DataSet netCHG = (DataSet)ViewState["NetCHG"];
            DataSet assessments = (DataSet)ViewState["Assessments"];
            DataSet assessmentMetrics = (DataSet)ViewState["AssessmentMetrics"];
            DataSet differentilRevenue = (DataSet)ViewState["DifferentialRevenue"];

            List<object> list = new List<object>();
            list.Add(allocatedCosts);
            list.Add(expendatures);
            list.Add(netCHG);
            list.Add(assessments);
            list.Add(assessmentMetrics);
            list.Add(differentilRevenue);

            MemoryStream modelData = Utilities.SerializeToMemoryStream(list);
            byte[] tables = modelData.ToArray();
            sp.SaveModelDraft(DraftNameTextBox.Text, tables);

            PopulateSavedDraftsDropDown();
        }