Esempio n. 1
0
        private void FillTable()
        {
            Table1.Rows.Clear();
            TestRuns.SelectParameters["problem_id"].DefaultValue = _problemId;
            DataView  view         = (DataView)TestRuns.Select(new DataSourceSelectArguments());
            DataTable _groupsTable = view.ToTable();

            foreach (DataRow dataRow in _groupsTable.Rows)
            {
                ItemsRow itemRow = new ItemsRow(dataRow["input"].ToString(), dataRow["output"].ToString(), true);
                Table1.Rows.Add(itemRow.Row);
            }
        }
        private void InitializeTableRowsOnce()
        {
            if (rows.Count == 0)
            {
                //testRuns.SelectParameters["problem_id"].DefaultValue = _problemId;
                DataView  view         = (DataView)testRuns.Select(new DataSourceSelectArguments());
                DataTable _groupsTable = view.ToTable();

                foreach (DataRow dataRow in _groupsTable.Rows)
                {
                    ItemsRow itemRow = new ItemsRow(dataRow["input"].ToString(), dataRow["output"].ToString());
                    rows.Add(itemRow);
                }
                Session["rows"] = rows;

                Session["internally_redirected"] = 'y';
                Response.Redirect("Edit_Assignment.aspx?id=" + _problemId);
            }
        }