예제 #1
0
    protected void GridView_UnAssignedCriteria_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int iQuestionID  = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "ID").ToString());
                int Grading_Type = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grading_Type").ToString());

                RadioButtonList rdo        = (RadioButtonList)e.Row.FindControl("rdoOptions");
                TextBox         txtAnswer  = (TextBox)e.Row.FindControl("txtAnswer");
                TextBox         txtRemarks = (TextBox)e.Row.FindControl("txtRemarks");

                if (rdo != null)
                {
                    DataTable dt = BLL_Crew_Interview.Get_GradingOptions(Grading_Type);
                    rdo.DataSource = dt;
                    rdo.DataBind();
                }
            }
        }
        catch
        {
        }
    }
예제 #2
0
    protected void ddlGradingType_SelectedIndexChanged(object sender, EventArgs e)
    {
        int       Grade_ID = UDFLib.ConvertToInteger(ddlGradingType.SelectedValue);
        DataTable dt       = BLL_Crew_Interview.Get_GradingOptions(Grade_ID);

        rdoGradings.DataSource = dt;
        rdoGradings.DataBind();
    }
예제 #3
0
    protected void GridView_Grading_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int ID = UDFLib.ConvertToInteger(GridView_Grading.DataKeys[e.Row.RowIndex].Value.ToString());

                RadioButtonList rdo = (RadioButtonList)e.Row.FindControl("rdoOptions");
                DataTable       dt  = BLL_Crew_Interview.Get_GradingOptions(ID);

                rdo.DataSource = dt;
                rdo.DataBind();
            }
        }
        catch
        {
        }
    }
예제 #4
0
    protected void GridView_AssignedCriteria_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int iQuestionID  = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "QID").ToString());
                int Grading_Type = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grading_Type").ToString());
                // int iRankID = UDFLib.ConvertToInteger(ddlRank.SelectedValue);
                int iInterviewID = int.Parse(hdnInterviewID.Value);

                int iCrewID = GetCrewID();
                int iUserID = GetSessionUserID();

                string SelectedOptionID;

                RadioButtonList rdo = (RadioButtonList)e.Row.FindControl("rdoOptions");
                if (rdo != null)
                {
                    DataTable dt = BLL_Crew_Interview.Get_GradingOptions(Grading_Type);
                    rdo.DataSource = dt;
                    rdo.DataBind();

                    if (DataBinder.Eval(e.Row.DataItem, "SelectedOptionID") != null)
                    {
                        SelectedOptionID = DataBinder.Eval(e.Row.DataItem, "SelectedOptionID").ToString();
                        if (SelectedOptionID != "")
                        {
                            e.Row.CssClass = "crew-interview-grid-selected-row";
                            Select_Option(rdo, SelectedOptionID);
                        }
                    }
                }
            }
        }
        catch
        {
        }
    }
예제 #5
0
    protected void GridView_Criteria_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int ID         = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grading_Type").ToString());
                int Grade_Type = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grade_Type").ToString());

                RadioButtonList rdo = (RadioButtonList)e.Row.FindControl("rdoOptions");
                if (rdo != null)
                {
                    DataTable dt = BLL_Crew_Interview.Get_GradingOptions(ID);
                    rdo.DataSource = dt;
                    rdo.DataBind();
                }
                DropDownList ddlCategory_Name = (DropDownList)e.Row.FindControl("ddlCategory");
                if (ddlCategory_Name != null)
                {
                    DataTable dtCat = BLL_Crew_Interview.Get_CategoryList("");
                    ddlCategory_Name.DataSource = dtCat;
                    ddlCategory_Name.DataBind();
                    ddlCategory_Name.SelectedValue = DataBinder.Eval(e.Row.DataItem, "Category_ID").ToString();
                }

                if (Grade_Type == 2)
                {
                    TextBox txtAnswer = new TextBox();
                    txtAnswer.Text    = "Subjective Type";
                    txtAnswer.Enabled = false;
                    e.Row.Cells[3].Controls.Add(txtAnswer);
                }
            }
        }
        catch
        {
        }
    }