Ejemplo n.º 1
0
    protected void Button3_Click(object sender, EventArgs e)
    {
        Table m = Table1;



        List <string> questions = new List <string>();
        int           row_no    = Table1.Rows.Count;
        int           quest_no  = row_no;


        for (int i = 0; i < row_no;)
        {
            TextBox qu = (TextBox)Table1.Rows[i].Cells[1].Controls[0];
            questions.Add(qu.Text.ToString());
            i++;
        }
        Employee_pros pros    = new Employee_pros();
        int           form_id = pros.Add_Form(TextBox1.Text.ToString(), Int32.Parse(DropDownList1.SelectedItem.ToString()), Session["user"].ToString().TrimEnd());

        if (form_id == 0)
        {
            Label4.Visible = true;
            return;
        }
        pros.add_form_questions(questions, form_id);
        Panel1.Visible = false;
        Label4.Text    = "Form Has Been Added Successfully";
        Label4.Visible = true;
    }