Ejemplo n.º 1
0
    public void fillForm()
    {
        Employee_pros pros = new Employee_pros();

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

        details = pros.getFormDetails(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   check = new TableCell();
            RadioButton ch    = new RadioButton();
            ch.GroupName = "ch";

            check.Controls.Add(ch);

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


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