Esempio n. 1
0
    protected void fillTest()
    {
        Employee_pros pros = new Employee_pros();

        List <List <string> > details = new List <List <string> >();

        details = pros.getTestDetails(Session["user"].ToString().TrimEnd());
        for (int i = 0; i < details.Count; i++)
        {
            TableRow  row    = new TableRow();
            TableCell number = new TableCell();
            number.Text         = (i + 1).ToString();
            row.HorizontalAlign = HorizontalAlign.Center;
            number.BackColor    = System.Drawing.Color.Silver;


            TableCell name = new TableCell();
            name.Text = details[i][0];

            TableCell quest = new TableCell();
            quest.Text      = details[i][1];
            quest.BackColor = System.Drawing.Color.Silver;
            TableCell dur = new TableCell();
            dur.Text = details[i][2];

            TableCell   check = new TableCell();
            RadioButton ch    = new RadioButton();
            ch.GroupName    = "ch";
            check.BackColor = System.Drawing.Color.Silver;
            check.Controls.Add(ch);

            row.Cells.Add(number);
            row.Cells.Add(name);
            row.Cells.Add(quest);
            row.Cells.Add(dur);

            row.Cells.Add(check);
            Table1.Rows.Add(row);
        }
    }