示例#1
0
    protected void GridView_Criteria_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int    ID       = UDFLib.ConvertToInteger(GridView_Criteria.DataKeys[e.RowIndex].Value.ToString());
        string Criteria = e.NewValues["Question"].ToString();
        string Answer   = "";

        if (e.NewValues["Answer"] != null)
        {
            Answer = e.NewValues["Answer"].ToString();
        }



        int Cat_ID       = 0;
        int Grading_Type = UDFLib.ConvertToInteger(e.NewValues["Grading_Type"].ToString());

        DropDownList ddlCategory = (DropDownList)GridView_Criteria.Rows[e.RowIndex].FindControl("ddlCategory");

        if (ddlCategory != null)
        {
            Cat_ID = UDFLib.ConvertToInteger(ddlCategory.SelectedValue);
        }

        BLL_Crew_Interview.UPDATE_Criteria(ID, Criteria, Answer, Cat_ID, Grading_Type, GetSessionUserID());

        GridView_Criteria.EditIndex = -1;
        Bind_QuestionBank();
    }