Exemplo n.º 1
0
    protected void Load_CategoryList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_CategoryList(txtfilter.Text);

        GridView_Category.DataSource = dt;
        GridView_Category.DataBind();
    }
Exemplo n.º 2
0
    protected void Load_CategoryList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_CategoryList(txtfilter.Text);

        ddlCategory.DataSource = dt;
        ddlCategory.DataBind();
        ddlCategory.Items.Insert(0, new ListItem("-Select All-", "0"));


        ddlCatName.DataSource = dt;
        ddlCatName.DataBind();
    }
Exemplo n.º 3
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");
                DataTable       dt  = BLL_Crew_Evaluation.Get_GradingOptions(ID);

                DropDownList ddlCategory_Name = (DropDownList)e.Row.FindControl("ddlCategory_Name");
                if (ddlCategory_Name != null)
                {
                    DataTable dtCat = BLL_Crew_Evaluation.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);
                }
                rdo.DataSource = dt;
                rdo.DataBind();
            }
        }
        catch
        {
        }
    }